18 NO_SETTING_ERROR = 0, CANT_CREATE_DIR, CANT_CREATE_FILE
87 const std::string getConfDir()
const {
91 void setConfDir(
const std::string &dir) {
95 const std::string getConfFileName()
const {
99 const std::string getTestFileName()
const {
103 void setTestFileName(
const std::string &name) {
107 const std::string getDataDir()
const {
111 void setDataDir(
const std::string &ddir) {
SettingError
an error dealing with setting configuration file
Definition: settings.h:17
bool readDataDir()
Reads the datadir from the configuration file.
Definition: settings.cpp:107
SettingError save()
Saves the setting (for datadir) in the conf file.
Definition: settings.cpp:128
bool checkForTestFile()
Checks whether the test file is in the datadir.
Definition: settings.cpp:93
std::string testFileName
test file to search for in the datadir (default: lang.map)
Definition: settings.h:79
C++ class: doctemplate.h.
Definition: bufferedoutput.cpp:13
Handles the settings for source-highlight (and its library).
Definition: settings.h:68
std::string confFileName
the name of the configuration file (default: source-highlight.conf)
Definition: settings.h:76
std::string confDir
the directory for configuration file (default: $HOME/.source-highlight/)
Definition: settings.h:73
static const std::string retrieveDataDir(bool reload=false)
Retrieves the value for the data dir.
Definition: settings.cpp:152
bool checkForConfFile()
Checks whether the conf file exists.
Definition: settings.cpp:100
static bool checkSettings()
Checks whether the current retrieved data dir is a valid data dir value for source-highlight.
Definition: settings.cpp:193
std::string homeDir
the home directory of the user
Definition: settings.h:70
static void setGlobalDataDir(const std::string &dataDir)
Sets the global data dir value.
Definition: settings.cpp:189
static const std::string getDefaultDataDir()
Definition: settings.cpp:185
std::string dataDir
the data dir (used for .lang, .outlang, lang.map, etc), this is read from the configuration file ...
Definition: settings.h:82