![]() |
![]() |
Public Member Functions | |
KeyFile () | |
Creates a new, empty KeyFile object. | |
~KeyFile () | |
Destructor. | |
KeyFile (GKeyFile* castitem, bool takes_ownership=false) | |
Creates a glibmm KeyFile wrapper for a GKeyFile object. | |
bool | load_from_file (const std::string& filename, KeyFileFlags flags, std::auto_ptr<Glib::Error>& error) |
Loads a key file into an empty G::KeyFile structure. | |
bool | load_from_data (const Glib::ustring& data, KeyFileFlags flags=Glib::KEY_FILE_NONE) |
Loads a KeyFile from memory. | |
bool | load_from_data_dirs (const std::string& file, std::string& full_path, KeyFileFlags flags=Glib::KEY_FILE_NONE) |
Looks for a KeyFile named file in the paths returned from g_get_user_data_dir() and g_get_system_data_dirs() and loads them into the keyfile object, placing the full path to the file in full_path. | |
Glib::ustring | to_data () |
Outputs the KeyFile as a string. | |
Glib::ustring | get_start_group () const |
Returns the name of the start group of the file. | |
Glib::ArrayHandle<Glib::ustring> | get_groups () const |
Gets a list of all groups in the KeyFile. | |
Glib::ArrayHandle<Glib::ustring> | get_keys (const Glib::ustring& group_name) const |
Gets a list of all keys from the group group_name. | |
bool | has_group (const Glib::ustring& group_name) const |
Looks whether the key file has the group group_name . | |
bool | has_key (const Glib::ustring& group_name, const Glib::ustring& key, std::auto_ptr<Glib::Error>& error) const |
Looks whether the key file has the key key in the group group_name . | |
Glib::ustring | get_value (const Glib::ustring& group_name, const Glib::ustring& key, std::auto_ptr<Glib::Error>& error) const |
Returns the value associated with key under group_name . | |
Glib::ustring | get_string (const Glib::ustring& group_name, const Glib::ustring& key, std::auto_ptr<Glib::Error>& error) const |
Returns the value associated with key under group_name . | |
Glib::ustring | get_locale_string (const Glib::ustring& group_name, const Glib::ustring& key) const |
Gets the value associated with key under group_name translated into the current locale. | |
Glib::ustring | get_locale_string (const Glib::ustring& group_name, const Glib::ustring& key, const Glib::ustring& locale, std::auto_ptr<Glib::Error>& error) const |
Returns the value associated with key under group_name translated in the given locale if available. | |
bool | get_boolean (const Glib::ustring& group_name, const Glib::ustring& key, std::auto_ptr<Glib::Error>& error) const |
Returns the value associated with key under group_name as a boolean. | |
int | get_integer (const Glib::ustring& key) const |
Gets the value in the first group, under key, interpreting it as an integer. | |
int | get_integer (const Glib::ustring& group_name, const Glib::ustring& key, std::auto_ptr<Glib::Error>& error) const |
Returns the value associated with key under group_name as an integer. | |
Glib::ArrayHandle<Glib::ustring> | get_string_list (const Glib::ustring& group_name, const Glib::ustring& key) const |
Returns the values associated with key under group_name. | |
Glib::ArrayHandle<Glib::ustring> | get_locale_string_list (const Glib::ustring& group_name, const Glib::ustring& key) const |
Returns the values associated with key under group_name translated into the current locale, if available. | |
Glib::ArrayHandle<Glib::ustring> | get_locale_string_list (const Glib::ustring& group_name, const Glib::ustring& key, const Glib::ustring& locale) const |
Returns the values associated with key under group_name translated into locale, if available. | |
Glib::ArrayHandle<bool> | get_boolean_list (const Glib::ustring& group_name, const Glib::ustring& key) const |
Returns the values associated with key under group_name. | |
Glib::ArrayHandle<int> | get_integer_list (const Glib::ustring& group_name, const Glib::ustring& key) const |
Returns the values associated with key under group_name. | |
Glib::ustring | get_comment () const |
Get comment from top of file. | |
Glib::ustring | get_comment (const Glib::ustring& group_name) const |
Get comment from above a group. | |
Glib::ustring | get_comment (const Glib::ustring& group_name, const Glib::ustring& key, std::auto_ptr<Glib::Error>& error) const |
Retrieves a comment above key from group_name . | |
void | set_list_separator (gchar separator) |
Sets the character which is used to separate values in lists. | |
void | set_value (const Glib::ustring& group_name, const Glib::ustring& key, const Glib::ustring& value) |
Associates a new value with key under group_name . | |
void | set_string (const Glib::ustring& group_name, const Glib::ustring& key, const Glib::ustring& string) |
Associates a new string value with key under group_name . | |
void | set_locale_string (const Glib::ustring& group_name, const Glib::ustring& key, const Glib::ustring& locale, const Glib::ustring& string) |
Associates a string value for key and locale under group_name . | |
void | set_boolean (const Glib::ustring& group_name, const Glib::ustring& key, bool value) |
Associates a new boolean value with key under group_name . | |
void | set_integer (const Glib::ustring& group_name, const Glib::ustring& key, int value) |
Associates a new integer value with key under group_name . | |
void | set_string_list (const Glib::ustring& group_name, const Glib::ustring& key, const Glib::ArrayHandle<Glib::ustring>& list) |
Sets a list of string values for key under group_name. | |
void | set_locale_string_list (const Glib::ustring& group_name, const Glib::ustring& key, const Glib::ustring& locale, const Glib::ArrayHandle<Glib::ustring>& list) |
Sets a list of string values for the key under group_name and marks them as being for locale. | |
void | set_boolean_list (const Glib::ustring& group_name, const Glib::ustring& key, Glib::ArrayHandle<bool>& list) |
Sets a list of booleans for the key under group_name. | |
void | set_integer_list (const Glib::ustring& group_name, const Glib::ustring& key, Glib::ArrayHandle<int>& list) |
Sets a list of integers for the key under group_name. | |
void | set_comment (const Glib::ustring& comment) |
Places comment at the start of the file, before the first group. | |
void | set_comment (const Glib::ustring& group_name, const Glib::ustring& comment) |
Places comment above group_name. | |
void | set_comment (const Glib::ustring& group_name, const Glib::ustring& key, const Glib::ustring& comment, std::auto_ptr<Glib::Error>& error) |
Places a comment above key from group_name . | |
void | remove_comment (const Glib::ustring& group_name, const Glib::ustring& key, std::auto_ptr<Glib::Error>& error) |
Removes a comment above key from group_name . | |
void | remove_key (const Glib::ustring& group_name, const Glib::ustring& key, std::auto_ptr<Glib::Error>& error) |
Removes key in group_name from the key file. | |
void | remove_group (const Glib::ustring& group_name, std::auto_ptr<Glib::Error>& error) |
Removes the specified group, group_name , from the key file. | |
GKeyFile* | gobj () |
const GKeyFile* | gobj () const |
Protected Attributes | |
GKeyFile* | gobject_ |
bool | owns_gobject_ |
|
Creates a new, empty KeyFile object.
|
|
Destructor.
|
|
Creates a glibmm KeyFile wrapper for a GKeyFile object. Note, when using this that when the wrapper is deleted, it will not automatically deleted the GKeyFile unless you set the delete_c_instance boolean to true.
|
|
Returns the value associated with key under group_name as a boolean. If key cannot be found then the return value is undefined and error is set to G::KEY_FILE_ERROR_KEY_NOT_FOUND. Likewise, if the value associated with key cannot be interpreted as a boolean then the return value is also undefined and error is set to G::KEY_FILE_ERROR_INVALID_VALUE.
|
|
Returns the values associated with key under group_name.
|
|
Retrieves a comment above key from group_name .
group_name . If key is
|
|
Get comment from above a group.
|
|
Get comment from top of file.
|
|
Gets a list of all groups in the KeyFile.
|
|
Returns the value associated with key under group_name as an integer.
If group_name is If key cannot be found then the return value is undefined and error is set to G::KEY_FILE_ERROR_KEY_NOT_FOUND. Likewise, if the value associated with key cannot be interpreted as an integer then the return value is also undefined and error is set to G::KEY_FILE_ERROR_INVALID_VALUE.
|
|
Gets the value in the first group, under key, interpreting it as an integer.
|
|
Returns the values associated with key under group_name.
|
|
Gets a list of all keys from the group group_name.
|
|
Returns the value associated with key under group_name translated in the given locale if available.
If locale is
If key cannot be found then
|
|
Gets the value associated with key under group_name translated into the current locale.
|
|
Returns the values associated with key under group_name translated into locale, if available.
|
|
Returns the values associated with key under group_name translated into the current locale, if available.
|
|
Returns the name of the start group of the file.
|
|
Returns the value associated with key under group_name .
In the event the key cannot be found,
|
|
Returns the values associated with key under group_name.
|
|
Returns the value associated with key under group_name .
In the event the key cannot be found,
|
|
|
|
|
|
Looks whether the key file has the group group_name .
|
|
Looks whether the key file has the key key in the group group_name .
|
|
Loads a KeyFile from memory.
|
|
Looks for a KeyFile named file in the paths returned from g_get_user_data_dir() and g_get_system_data_dirs() and loads them into the keyfile object, placing the full path to the file in full_path.
|
|
Loads a key file into an empty G::KeyFile structure. If the file could not be loaded then error is set to either a G::FileError or G::KeyFileError.
|
|
Removes a comment above key from group_name .
group_name . If key is
|
|
Removes the specified group, group_name , from the key file.
|
|
Removes key in group_name from the key file.
|
|
Associates a new boolean value with key under group_name . If key cannot be found then it is created.
|
|
Sets a list of booleans for the key under group_name. If either the key or group_name cannot be found they are created
|
|
Places a comment above key from group_name .
group_name . If key is
|
|
Places comment above group_name.
|
|
Places comment at the start of the file, before the first group.
|
|
Associates a new integer value with key under group_name . If key cannot be found then it is created.
|
|
Sets a list of integers for the key under group_name. If either the key or group_name cannot be found they are created
|
|
Sets the character which is used to separate values in lists. Typically ';' or ',' are used as separators. The default list separator is ';'.
|
|
Associates a string value for key and locale under group_name . If the translation for key cannot be found then it is created.
|
|
Sets a list of string values for the key under group_name and marks them as being for locale. If the key or group_name cannot be found, they are created.
|
|
Associates a new string value with key under group_name . If key cannot be found then it is created. If group_name cannot be found then it is created.
|
|
Sets a list of string values for key under group_name. If key cannot be found it is created. If group_name cannot be found it is created.
|
|
Associates a new value with key under group_name . If key cannot be found then it is created. If group_name cannot be found then it is created.
|
|
Outputs the KeyFile as a string.
|
|
|
|
|