#include <InterfaceRegistry.h>
Public Methods | |
| InterfaceProxy (const char *cname, hasht chash) | |
| Constructor. | |
| InterfaceProxy (const char *cname, hasht(*chash)()) | |
| virtual | ~InterfaceProxy () |
| virtual Object * | createObject () const |
| Create a new instance of the corresponding object. | |
| virtual hasht | getClassHash () const |
| Get the class hash of the corresponding object. | |
| virtual const char * | getClassName () const |
| Get the class name of the corresponding object. | |
| const TypeAdapter | get (Object *o, std::string const &varname) const |
| Get the value of an interface variable. | |
| void | set (Object *o, std::string const &varname, const TypeAdapter &v) |
| Set the value of an interface variable. | |
| void | push_back (Object *o, std::string const &varname, const TypeAdapter &v) |
| Append a value to an interface variable list. | |
| void | set_enum (Object *o, std::string const &varname, std::string const &v) |
| Assign an Enum value to an object member variable. | |
| void | clear (Object *o, std::string const &varname) |
| Remove all members of an object member variable container. | |
| bool | variableExists (std::string const &varname) const |
| Test if a member variable is defined in the object interface. | |
| bool | variableRequired (std::string const &varname) const |
| Test if a member variable in the object interface must be assigned a value in XML Object definitions of the object. | |
| std::string | variableType (std::string const &varname) const |
| Get a string representation of the type of an interface variable. | |
| std::vector< std::string > | getVariableNames () const |
| Get the names of all variables in the interface. | |
| std::vector< std::string > | getRequiredNames () const |
| Get the names of all required variables in the interface. | |
| bool | isSubclass (std::string const &cname) const |
| Test if this object interface is a subclass of the specified class. | |
| bool | isSubclass (hasht const &chash) const |
| Test if this object interface is a subclass of the specified class. | |
| virtual bool | isStatic () const |
| Test if the object class of this interface is static. | |
Protected Methods | |
| void | addInterface (ObjectInterfaceBase *objectinterface, std::string const &classname, hasht const &classhash) |
| Add an ObjectInterface. | |
| ObjectInterfaceBase * | findInterface (std::string const &varname, bool required) const |
| Find the ObjectInterface corresponding to a given variable name. | |
Stores a reference to the actual interface and provides accessor methods to create and manipulate objects dynamically at runtime. See Object Interfaces and Interface Proxies for details.
|
||||||||||||
|
Constructor. Construct a new interface proxy, and register it with the global interface registry.
|
|
||||||||||||
|
|
|
|
|
|
||||||||||||||||
|
Add an ObjectInterface. Used internally to register ObjectInterface instances. Each InterfaceProxy constructor creates a ObjectInterface instance for the variables accessible in the corresponding Object subclass. These interfaces are stored in the InterfaceProxy base class and used to access all variables in the Object hierarchy.
|
|
||||||||||||
|
Remove all members of an object member variable container.
|
|
|
Create a new instance of the corresponding object.
|
|
||||||||||||
|
Find the ObjectInterface corresponding to a given variable name.
|
|
||||||||||||
|
Get the value of an interface variable.
|
|
|
Get the class hash of the corresponding object.
|
|
|
Get the class name of the corresponding object.
|
|
|
Get the names of all required variables in the interface.
|
|
|
Get the names of all variables in the interface.
|
|
|
Test if the object class of this interface is static. Instances of static object classes are cached when loaded from a data archive and shared by all users of the object. See Object.h for details. |
|
|
Test if this object interface is a subclass of the specified class.
This method is the same as
|
|
|
Test if this object interface is a subclass of the specified class. This method only checks the interface hierarchy of the object classes in question, not the full class hierarchy of the object. Non-object base classes will not test true, nor will object classes that do not extend the interface.
|
|
||||||||||||||||
|
Append a value to an interface variable list.
|
|
||||||||||||||||
|
Set the value of an interface variable.
|
|
||||||||||||||||
|
Assign an Enum value to an object member variable.
|
|
|
Test if a member variable is defined in the object interface.
|
|
|
Test if a member variable in the object interface must be assigned a value in XML Object definitions of the object.
|
|
|
Get a string representation of the type of an interface variable.
|
|
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. |