#include <optionServer.h>
Inheritance diagram for optionServer:

Public Methods | |
| optionServer () | |
| constructor. | |
| virtual | ~optionServer () |
| destructor. | |
| void | setOptionFileName (std::string name) |
| void | setOption () |
| set a collection of options from a external file (set in m_optionFileName);. | |
| virtual bool | search (std::string name) const |
| virtual method that returns true if the named object is in the server. | |
| virtual void | addToServer (std::string name, optionVI* op) |
| method to include a optionVI class in the server. | |
| virtual void | writeOutOptionsServer () const |
| method to writeOut the option information of all the classes in the server. | |
| virtual void | writeOut () const |
| metho to writeOut information about this class. | |
Protected Methods | |
| optionVI* | getOption (std::string name) const |
| returns the optionVI of the object with name. | |
| void | setOption (std::string className, std::string par, std::string con) |
| set a string option in an object named className inserted in the server. | |
| void | setOption (std::string className, std::string par, double d) |
| set a double option in an object named className. | |
| void | setOption (std::string className, std::string par, int i) |
| set a int option in an object named className. | |
Protected Attributes | |
| std::string | m_optionFileName |
| default ASCII file with the list of options. | |
| serverVI<optionVI>* | m_server |
| Server with the classes where optionVI can be apply(). | |
Friends | |
| class | optionManager |
OptionServer sets options to classed derived from optionVI and previously declared into its server.
OptionServer reads and sets options from an external file.
addToServer(). Every object should have a unique name into the server. setOption() method allows to set a collection of options from a external file. The options should be listed in the file in the following way: "objectName parName parType parContent", where parType can be "S" for string, "D" for double or "I" for integer. A line started with "//" in the file will be ignored and it can be use to put comments). setOptionFileName() to set the name of the file with the list of options to apply. setOption(objectName, parName, parContent). The option is called parName and the content is parContent.
Definition at line 33 of file optionServer.h.
|
|
|
|
|
virtual method that returns true if the named object is in the server.
Definition at line 50 of file optionServer.h.
|
|
|
set a string option in an object named className inserted in the server.
Definition at line 70 of file optionServer.cpp.
|
set a collection of options from a external file (set in m_optionFileName);.
Definition at line 18 of file optionServer.cpp.
|
Definition at line 45 of file optionServer.h.
|
|
method to writeOut the option information of all the classes in the server.
Definition at line 134 of file optionServer.cpp.
|
Definition at line 36 of file optionServer.h.
|
|
Server with the classes where optionVI can be apply().
Definition at line 77 of file optionServer.h.
1.1.3 written by Dimitri van Heesch,
© 1997-2000