Main Page   Modules   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Namespace Members   Compound Members   File Members   Related Pages  

ObjectInterface< C > Class Template Reference

Class-specialized object interface. More...

#include <ObjectInterface.h>

Inheritance diagram for ObjectInterface< C >:

ObjectInterfaceBase List of all members.

Public Methods

 ObjectInterface ()
virtual ~ObjectInterface ()
template<typename T> Self & def (std::string const &name, T C::*pm, bool required) throw (InterfaceError)
 Method to bind a string identifier to a member variable and store the association.

template<typename T> Self & def (std::string const &name, T C::*pm, int mask, bool required) throw (InterfaceError)
Self & pass ()
virtual bool variableExists (std::string const &name) const
 Test if a given variable name exists in the interface.

virtual bool variableRequired (std::string const &name) const
 Test if a given variable is tagged as 'required'.

virtual std::string variableType (std::string const &name) const
 Get a type identifier string for a variable.

virtual std::vector< std::string > getVariableNames () const
 Get the names of all variables defined in the interface.

virtual std::vector< std::string > getRequiredNames () const
 Get the names of required variables defined in the interface.

virtual const TypeAdapter get (Object *o, std::string const &name) const
 Get the value of an interface variable.

virtual void set (Object *o, std::string const &name, const TypeAdapter &v) const
 Set the value of an interface variable.

virtual void push_back (Object *o, std::string const &name, const TypeAdapter &v) const
 Append a value to an interface variable list.

virtual void clear (Object *o, std::string const &name) const
 Clear an interface variable list.


Detailed Description

template<class C>
class ObjectInterface< C >

Class-specialized object interface.


Constructor & Destructor Documentation

template<class C>
ObjectInterface< C >::ObjectInterface   [inline]
 

template<class C>
virtual ObjectInterface< C >::~ObjectInterface   [inline, virtual]
 


Member Function Documentation

template<class C>
virtual void ObjectInterface< C >::clear Object   o,
std::string const &    name
const [inline, virtual]
 

Clear an interface variable list.

Implements ObjectInterfaceBase.

template<class C>
template<typename T>
Self& ObjectInterface< C >::def std::string const &    name,
T C::*    pm,
int    mask,
bool    required
throw (InterfaceError) [inline]
 

template<class C>
template<typename T>
Self& ObjectInterface< C >::def std::string const &    name,
T C::*    pm,
bool    required
throw (InterfaceError) [inline]
 

Method to bind a string identifier to a member variable and store the association.

Note:
Do not call this method directly: use the SIMDATA_XML() macro instead.

template<class C>
virtual const TypeAdapter ObjectInterface< C >::get Object   o,
std::string const &    name
const [inline, virtual]
 

Get the value of an interface variable.

Implements ObjectInterfaceBase.

template<class C>
virtual std::vector<std::string> ObjectInterface< C >::getRequiredNames   const [inline, virtual]
 

Get the names of required variables defined in the interface.

Implements ObjectInterfaceBase.

template<class C>
virtual std::vector<std::string> ObjectInterface< C >::getVariableNames   const [inline, virtual]
 

Get the names of all variables defined in the interface.

Implements ObjectInterfaceBase.

template<class C>
Self& ObjectInterface< C >::pass   [inline]
 

template<class C>
virtual void ObjectInterface< C >::push_back Object   o,
std::string const &    name,
const TypeAdapter   v
const [inline, virtual]
 

Append a value to an interface variable list.

Implements ObjectInterfaceBase.

template<class C>
virtual void ObjectInterface< C >::set Object   o,
std::string const &    name,
const TypeAdapter   v
const [inline, virtual]
 

Set the value of an interface variable.

Implements ObjectInterfaceBase.

template<class C>
virtual bool ObjectInterface< C >::variableExists std::string const &    name const [inline, virtual]
 

Test if a given variable name exists in the interface.

Returns:
Returns true if the variable name exists in the interface.

Implements ObjectInterfaceBase.

template<class C>
virtual bool ObjectInterface< C >::variableRequired std::string const &    name const [inline, virtual]
 

Test if a given variable is tagged as 'required'.

Returns:
Returns false if the variable is not marked as 'required' or does not exist in the interface.

Implements ObjectInterfaceBase.

template<class C>
virtual std::string ObjectInterface< C >::variableType std::string const &    name const [inline, virtual]
 

Get a type identifier string for a variable.

Returns:
Returns the type identifier string.

Implements ObjectInterfaceBase.


The documentation for this class was generated from the following file:
SimData version pre-0.4.0. For more information on SimData, visit the SimData Homepage.

Generated on Tue Oct 14 12:06:41 2003, using Doxygen 1.2.18.

[SF.net]