36 #include <boost/filesystem.hpp>
41 boost::filesystem::path config_file = boost::filesystem::current_path();
47 if(boost::filesystem::is_regular_file(config_file))
49 load(config_file.string());
56 if(!app_data_dir.empty())
58 config_file = app_data_dir;
64 if(boost::filesystem::is_regular_file(config_file))
66 load(config_file.string());
76 config_file = mgis_dir;
82 if(boost::filesystem::is_regular_file(config_file))
84 load(config_file.string());
#define TERRALIB_CONFIG_DIR
Folder location with application config files.
void load(const std::string &settingsFile)
It initializes the application settings.
This class is designed to declare objects to be thrown as exceptions by TerraLib. ...
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. ...
A singleton for managing application settings applied to the whole system (all users).
#define TR_COMMON(message)
It marks a string in order to get translated. This is the mark used in the Common module of TerraLib...
void load()
It tries to find a default config file based on system macros and default condigurations.
~SystemApplicationSettings()
Destructor.
SystemApplicationSettings()
It initializes the singleton.
static OSSettingsDir & getInstance()
It returns a reference to the singleton instance.
const std::string & getSystemSettingsPath() const
It returns the folder location to store application data applied to all users.
This class is designed for dealing with multi-language text translation in TerraLib.
#define TERRALIB_SYSTEM_SETTINGS_FILE