221 template<class type_t>
222 type_t
read(const
xtd::
string& key, const type_t& default_value) {
245 template<
class type_t>
void save()
Save application settings.
void write(const xtd::string &key, const xtd::string &value)
Writes a specified value for specified key.
const xtd::string & file_path() const noexcept
Gets the file path of the application settings.
xtd::string read(const xtd::string &key, const xtd::string &default_value)
Reads a value for specified key. If not found default value is used.
settings()
Initializes a new instance of settings class.
void write(const xtd::string &key, type_t &&value)
Writes a specified value for specified key.
Definition settings.hpp:246
void reset()
Reset application settings.
object()=default
Create a new instance of the ultimate base class object.
Contains core_export_ keyword.
#define core_export_
Define shared library export.
Definition core_export.hpp:13
xtd::basic_string< char > string
Represents text as a sequence of UTF-8 code units.
Definition __string_definitions.hpp:43
xtd::shared_ptr_object< type_t > sptr
The xtd::sptr object is a shared pointer.
Definition sptr.hpp:25
value_t parse(const std::string &str)
Convert a string into a type.
Definition parse.hpp:34
Contains the types that provide the programming model for handling configuration data.
Definition file_settings.hpp:17
The xtd namespace contains all fundamental classes to access Hardware, Os, System,...
Definition abstract_object.hpp:8
constexpr const_pointer data() const noexcept
Gets direct access to the underlying contiguous storage.
Definition read_only_span.hpp:201
Contains xtd::object class.
Contains xtd::string alias.