37 #include <boost/filesystem.hpp>
43 if(user_conf_file_name.empty())
47 boost::filesystem::path user_settings_file = boost::filesystem::current_path();
51 user_settings_file /= user_conf_file_name;
53 if(boost::filesystem::is_regular_file(user_settings_file))
55 load(user_settings_file.string());
62 if(!user_data_dir.empty())
64 user_settings_file = user_data_dir;
68 user_settings_file /= user_conf_file_name;
70 if(boost::filesystem::is_regular_file(user_settings_file))
72 load(user_settings_file.string());
82 user_settings_file = mgis_dir;
86 user_settings_file /= user_conf_file_name;
88 if(boost::filesystem::is_regular_file(user_settings_file))
90 load(user_settings_file.string());
A singleton for managing application settings applied to a single user.
#define TERRALIB_CONFIG_DIR
Folder location with application config files.
void load(const std::string &settingsFile)
It initializes the application settings.
const std::string & getUserSettingsPath() const
It returns the folder location to store per user data.
A singleton class for discovering the Operational System settings directories.
#define TERRALIB_DIR
The folder name on the system where terralib data is stored (on windows: app/terralib).
#define TERRALIB_DIR_ENVVAR
Environment variable name with the TerraLib install path.
This class is designed to declare objects to be thrown as exceptions by TerraLib. ...
#define TERRALIB_USER_SETTINGS_FILE
User settings file name.
A singleton for managing application settings applied to the whole system (all users).
~UserApplicationSettings()
Destructor.
static T & getInstance()
It returns a reference to the singleton instance.
void load()
It tries to find a default config file based on system macros and default condigurations.
UserApplicationSettings()
It initializes the singleton.
This class is designed for dealing with multi-language text translation in TerraLib.