Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Namespace Members | Class Members | File Members

oxygen::ParamStorer Class Reference

This class implements the spades::ParamReader::ParamStorer interface. More...

#include <paramstorer.h>

Collaboration diagram for oxygen::ParamStorer:

Collaboration graph
[legend]
List of all members.

Public Member Functions

 ParamStorer (oxygen::ParamReader *paramReader)
virtual int readArgsFrom (const std::string &, const char *, const char *, std::istream &, bool)
virtual void print (std::ostream &) const
virtual int readCmdLineArgs (const std::string &key, int argc, const char *const *argv)

Protected Attributes

oxygen::ParamReadermParamReader
 The ParamReader we use to do the parsing.

Detailed Description

This class implements the spades::ParamReader::ParamStorer interface.

It's purpose is to enable the user to set ruby variables using the command line.

A note about the implementation: ParamStorer uses the ParamReader class to do the real parsing. This has the following reason.

In order to access the ScriptServer to modify ruby variables the ParamStorer must be a ZeitGeist class. This involves that the corresponding class object holds a shared pointer to every instance of this class.

However spades is not aware of these shared pointers and destructs a registered ParamStorer instance using delete without notifying the shared pointers. This would result in dangling references.

In order to play well with spades this class is not derived from Zeitgeist::object. In order to access the ScriptServer this class uses the ParamReader instance.

Definition at line 51 of file paramstorer.h.


Constructor & Destructor Documentation

oxygen::ParamStorer::ParamStorer oxygen::ParamReader paramReader  )  [inline]
 

Definition at line 54 of file paramstorer.h.


Member Function Documentation

virtual void oxygen::ParamStorer::print std::ostream &   )  const [inline, virtual]
 

Definition at line 65 of file paramstorer.h.

virtual int oxygen::ParamStorer::readArgsFrom const std::string &  ,
const char *  ,
const char *  ,
std::istream &  ,
bool 
[inline, virtual]
 

Definition at line 57 of file paramstorer.h.

int ParamStorer::readCmdLineArgs const std::string &  key,
int  argc,
const char *const *  argv
[virtual]
 

Definition at line 27 of file paramstorer.cpp.

References mParamReader, and oxygen::ParamReader::readCmdLineArgs().

Here is the call graph for this function:


Member Data Documentation

oxygen::ParamReader* oxygen::ParamStorer::mParamReader [protected]
 

The ParamReader we use to do the parsing.

Definition at line 77 of file paramstorer.h.

Referenced by readCmdLineArgs().


The documentation for this class was generated from the following files:
Generated on Thu Apr 6 15:47:59 2006 for rcssserver3d by  doxygen 1.4.4