#include <retinalobjs.h>
Collaboration diagram for RetinalObjectStringArgs:

Public Types | |
| typedef std::map<string,string> | DefaultsMap |
| Map for default values. More... | |
| typedef std::vector<string> | ParamList |
| Allows object to declare the parameters it expects. More... | |
Public Methods | |
| RetinalObjectStringArgs ( StringArgs arglist, VGenFactory<Retinal_Object::Variable>& vgf, DefaultsMap dm=DefaultsMap(), Retinal_Object* m=0) | |
| The constructor requires the actual string arguments, a ValueGeneratorFactory to be used to construct the variables, a map (possibly empty) of default values, and a pointer to the object to whose values we should link, if any. More... | |
| Retinal_Object::VarMap | vars (const ParamList& params) |
| Returns a set of ValueGenerators constructed by parsing the list of string arguments using the list of expected parameters and the map of defaults. More... | |
Extended interface | |
Not all applications need these functions. | |
| string | get_default (const string& name) const |
| Safe lookup function for DefaultsMap. More... | |
| void | set_default (const string& name, const string& value) |
| Overrides defaults in the map passed in at construction. More... | |
| void | error (const string& s) const |
| Signals an error using the StringParser's error facility. More... | |
| const string | parsed_get_default (const string& name) const |
| Looks up and returns a parse of the default with the given name. More... | |
| const string | parsed_next (const string& name) |
| Consumes the next argument using the given name to find the default. More... | |
| Retinal_Object::Variable& | parse (const string& s, Retinal_Object::Variable& x) const |
| Simple numeric parsing. More... | |
Friends | |
| class | RetinalObjectFactory |
Definition at line 213 of file retinalobjs.h.
|
|
Map for default values.
Definition at line 216 of file retinalobjs.h. |
|
|
Allows object to declare the parameters it expects.
Definition at line 218 of file retinalobjs.h. |
|
|
The constructor requires the actual string arguments, a ValueGeneratorFactory to be used to construct the variables, a map (possibly empty) of default values, and a pointer to the object to whose values we should link, if any.
Definition at line 226 of file retinalobjs.h. |
|
|
Signals an error using the StringParser's error facility.
Definition at line 260 of file retinalobjs.h. Referenced by RetinalObjectFactory::create(), and vars(). |
|
|
Safe lookup function for DefaultsMap. Defaults to empty string when not found; this usually evaluates to zero and/or a warning when parsed. Definition at line 250 of file retinalobjs.h. Referenced by parsed_get_default(), parsed_next(), and vars(). |
|
|
Simple numeric parsing.
Definition at line 271 of file retinalobjs.h. |
|
|
Looks up and returns a parse of the default with the given name.
Definition at line 263 of file retinalobjs.h. |
|
|
Consumes the next argument using the given name to find the default.
Definition at line 267 of file retinalobjs.h. Referenced by RetinalObjectFactory::create(). |
|
|
Overrides defaults in the map passed in at construction.
Definition at line 256 of file retinalobjs.h. |
|
|
Returns a set of ValueGenerators constructed by parsing the list of string arguments using the list of expected parameters and the map of defaults. This should be all that is needed for simple argument lists consisting only of ValueGenerators. Definition at line 87 of file retinalobjs.c. |
|
|
Definition at line 284 of file retinalobjs.h. |
1.2.1 written by Dimitri van Heesch,
© 1997-2000