Graphite
Version 3
An experimental 3D geometry processing program
|
Utility functions to manipulate preferences. More...
Functions | |
void | save_preferences () |
Saves the preferences. More... | |
void | declare_preference_variable (const std::string &name) |
Declares a variable as a preference variables. More... | |
void | declare_preference_variable (const std::string &name, const char *value, const std::string &help="") |
Declares a variable as a preference variables. More... | |
bool | preference_variable_is_declared (const std::string &name) |
Tests whether a variable is declared as a preference variable. More... | |
void | declare_preference_variable (const std::string &name, int value, const std::string &help="") |
Declares a variable as a preference variables. More... | |
void | declare_preference_variable (const std::string &name, bool value, const std::string &help="") |
Declares a variable as a preference variables. More... | |
Utility functions to manipulate preferences.
void OGF::Preferences::declare_preference_variable | ( | const std::string & | name | ) |
Declares a variable as a preference variables.
Preference variables are stored in the GEO::Environment. Variables that are declared as preference variables are loaded/saved from/into the preferences file.
[in] | name | the name of the variable, that should have already been declared using CmdLine::declare_arg() |
void OGF::Preferences::declare_preference_variable | ( | const std::string & | name, |
bool | value, | ||
const std::string & | help = "" |
||
) |
Declares a variable as a preference variables.
Preference variables are stored in the GEO::Environment. Variables that are declared as preference variables are loaded/saved from/into the preferences file.
[in] | name | name of the preference variable |
[in] | value | the initial value of the preference variable |
[in] | help | an optional description to be displayed when invoking graphite /? or graphite -h |
void OGF::Preferences::declare_preference_variable | ( | const std::string & | name, |
const char * | value, | ||
const std::string & | help = "" |
||
) |
Declares a variable as a preference variables.
Preference variables are stored in the GEO::Environment. Variables that are declared as preference variables are loaded/saved from/into the preferences file. Note: value argument is declared as const char* rather than const std::string& because this function is used with string literals and the C++ compiler finds that it is easier to convert a string literal to a boolean than to a std::string.
[in] | name | name of the preference variable |
[in] | value | the initial value of the preference variable |
[in] | help | an optional description to be displayed when invoking graphite /? or graphite -h |
void OGF::Preferences::declare_preference_variable | ( | const std::string & | name, |
int | value, | ||
const std::string & | help = "" |
||
) |
Declares a variable as a preference variables.
Preference variables are stored in the GEO::Environment. Variables that are declared as preference variables are loaded/saved from/into the preferences file.
[in] | name | name of the preference variable |
[in] | value | the initial value of the preference variable |
[in] | help | an optional description to be displayed when invoking graphite /? or graphite -h |
bool OGF::Preferences::preference_variable_is_declared | ( | const std::string & | name | ) |
Tests whether a variable is declared as a preference variable.
[in] | name | name of the preference variable |
true | if the preference variable is declared. |
false | otherwise. |
void OGF::Preferences::save_preferences | ( | ) |
Saves the preferences.
Preferences are saved to home directory/graphite.ini