|
Public Types |
typedef list< string > | ModulesConfIndex |
typedef map< const string,
ModuleEntry > | ModuleEntryMap |
typedef map< const string,
ModuleEntryMap > | ModulesConfMap |
Public Member Functions |
| ModulesConf (const string &fname) |
| ~ModulesConf () |
ModulesConfMap | getDirectives () |
ModuleEntryMap | getModules (const string directive) |
ModuleEntry::EntryArg | getOptions (const string module) |
string | getOptionsAsString (const string module) |
string | getOption (const string module, const string option) |
string | getArgument (const string directive, const string module) |
string | getComment (const string directive, const string module) |
bool | setOption (const string module, const string option, const string value, ModuleEntry::Mode m) |
bool | setOptions (const string module, const ModuleEntry::EntryArg arg, ModuleEntry::Mode m) |
bool | setArgument (const string directive, const string module, const string arg, ModuleEntry::Mode m) |
bool | setComment (const string directive, const string module, const string arg, ModuleEntry::Mode m) |
bool | removeEntry (const string directive, const string module) |
bool | writeFile (const string fname="") |
Private Types |
typedef time_t | TimeStamp |
Private Member Functions |
TimeStamp | getTimeStamp (const string &fname) |
bool | isDirective (const string directive) const |
bool | isModule (const string directive, const string module) |
bool | isOption (const string module, const string option) |
bool | updateIfModified () |
bool | updateTimeStamp () |
bool | updateIndex (const string directive, const string module) |
bool | parseLine (const string &line, ModuleLine &l) const |
bool | parseFile (const string &file_name, ModuleEntry::Mode m, const bool with_comment=true) |
Private Attributes |
string | file_name |
ModulesConfMap | modules_conf_map |
ModulesConfIndex | modules_conf_index |
bool | modified |
TimeStamp | time_stamp |
Classes |
struct | ModuleLine |
This class contains the modules.conf file.