#include <CConfigurationManager.h>
Public Member Functions | |
CConfigurationManager () | |
Default construtor. | |
CConfigurationManager (STD(list)< CTypeFreeBinding * > &rBindings) | |
Prestocked configuration. | |
~CConfigurationManager () | |
Destruction requires nothing special. | |
CConfigurationManager (const CConfigurationManager &rhs) | |
Copy constructor. | |
CConfigurationManager & | operator= (const CConfigurationManager &rhs) |
Assignment operator. | |
int | operator== (const CConfigurationManager &rhs) |
int | operator!= (const CConfigurationManager &rhs) |
STD (list)< CTypeFreeBinding * > getBindings() const | |
void | setBindings (STD(list)< CTypeFreeBinding * > newBindings) |
Replace all bindings. | |
void | AddBinding (CTypeFreeBinding &rBinding) |
void | AddBinding (STD(list)< CTypeFreeBinding * > addlist) |
void | ReadConfigFile (const char *pName) |
void | ReadConfigFile (const STD(string)&rName) |
void | ReadConfigFile (int fd) |
void | Read1stConfigFile (const STD(vector)< STD(string)> &Names) |
void | Read1stConfigFile (const STD(vector)< STD(string)> &Paths, const char *pName) |
void | Read1stConfigFile (const STD(vector)< STD(string)> &Paths, const STD(string)&rName) |
void | ReadAllConfigFiles (const STD(vector)< STD(string)> &Name) |
void | ReadAllConfigFiles (const STD(vector)< STD(string)> &Paths, const char *pName) |
void | ReadAllConfigFiles (const STD(vector)< STD(string)> &Paths, const STD(string)&rName) |
void | WriteConfigFile (const char *pName) |
void | WriteConfigFile (const STD(string)&rName) |
void | WriteConfigFile (int fd) |
Protected Member Functions | |
void | InternalReadConfigFile (CTCLInterpreter &rInterp, int fd) |
Private Member Functions | |
STD (list)< CTypeFreeBinding * > m_lBindings | |
List of configuration bindings. |
The following bindings are supported:
All of the bindings types are templated types. However due to TCL restrictions, only some type parameterizations are allowed:
All of these type parameterizations are straightforward with the exception of char* char* variables are filled in with pointers to malloc'd copies of the contents of the variable after configuration is done. In practice this is only an issue if multiple configurations reads members are performed (e.g. reconfiguration after complete configuration).
The major member functions supported by this class are:
Definition at line 357 of file CConfigurationManager.h.
|
Default construtor.
Definition at line 365 of file CConfigurationManager.h. |
|
Prestocked configuration.
Definition at line 366 of file CConfigurationManager.h. |
|
Destruction requires nothing special.
Definition at line 368 of file CConfigurationManager.h. |
|
Copy constructor.
Definition at line 374 of file CConfigurationManager.h. |
|
Definition at line 401 of file CConfigurationManager.h. |
|
< Append to list of bindings Definition at line 398 of file CConfigurationManager.h. |
|
Internal function to read a configuration file and execute it. since the lowest common denominator is a file descriptor and Tcl/Tk doesn't have a function to process a script given an fd, we'll read the entire file into a buffer and process the file from that string. In practice, configuration files will not be too large so this will not be a serious problem.
Definition at line 682 of file CConfigurationManager.cpp. Referenced by ReadConfigFile(). |
|
< Inequality compare Definition at line 382 of file CConfigurationManager.h. |
|
Assignment operator.
Definition at line 376 of file CConfigurationManager.h. |
|
< Equality compare Definition at line 379 of file CConfigurationManager.h. |
|
|
|
|
|
|
|
|
|
|
|
|
|
Reads a configuration file given that it is open on a file descriptor. The file is interpreted from its current location until end of file.
Definition at line 403 of file CConfigurationManager.cpp. References InternalReadConfigFile(). |
|
|
|
Reads a single configuration file. This involves:
Definition at line 368 of file CConfigurationManager.cpp. |
|
Replace all bindings.
Definition at line 395 of file CConfigurationManager.h. |
|
< Get a copy of bindings. Definition at line 388 of file CConfigurationManager.h. |
|
List of configuration bindings.
|
|
Writes a configuration file which can be re-read to duplicate the current state of the configuration variables. The configuration file will contain a comment which will give the following information:
Definition at line 605 of file CConfigurationManager.cpp. |
|
|
|
Writes a configuraiton file which can be re-read to duplicate the current configuration. The file is specified by a null terminated array of characters (C-string). This function attempts to open the specified file for write and on success delegates the actual write operation to the previous overload of this function.
Definition at line 645 of file CConfigurationManager.cpp. |