MIRA
|
The class proxy assures that the pointer to the class object is always valid. More...
#include <factory/Class.h>
Public Member Functions | |
ClassProxy () | |
ClassProxy (ClassProxy const &other) | |
bool | operator== (ClassProxy const &other) const |
bool | operator!= (ClassProxy const &other) const |
bool | operator< (ClassProxy const &other) const |
std::string const & | getIdentifier () const |
Return identifier for the class. More... | |
std::string const & | getName () const |
Return name of the class. More... | |
int | getTypeId () const |
Return unique id for the class. More... | |
Typename | getTypename () const |
Returns the platform independent C++ typename of the class. More... | |
std::map< std::string, std::string > const & | getMetaInfo () const |
Return map with meta information. More... | |
std::string const & | getMetaInfo (const std::string &meta) const |
Returns meta information for the given meta key. More... | |
Object * | newInstance () const |
Return a new instance of the class associated with the class object. More... | |
template<class CLASS > | |
CLASS * | newInstance () const |
Return a new instance of the class associated with the class object. More... | |
Object * | newInstance (int paramCount,...) const |
Return a new instance of the class associated with the class object. More... | |
Object * | newInstance (std::string const &childIdentifier) const |
Return a new instance of the child class with the given identifier. More... | |
template<class CLASS > | |
CLASS * | newInstance (std::string const &childIdentifier) const |
Return a new instance of the child class with the given identifier. More... | |
Object * | newInstance (std::string const &childIdentifier, int paramCount,...) const |
Return a new instance of the child class with the given identifier. More... | |
bool | isClassRegistered (std::string const &classIdentifier) const |
Return true if a class with the desired identifier is registered. More... | |
void | eraseChild (Class const *const iClass) |
Remove the given child class from the class. More... | |
void | eraseParent (Class const *const iClass) |
Remove the given class from the list of parents. More... | |
ClassProxy | getClassByIdentifier (std::string const &classIdentifier) const |
Return the Class object for the desired Class. More... | |
std::vector< ClassProxy > | getClassByMeta (std::string const &metaKey, std::string const &metaValue) const |
Return vector of Class objects matching the meta criterion. More... | |
template<class T > | |
std::vector< ClassProxy > | getClassByMeta (T funcPtr) const |
Return vector of Class objects returning true for the given. More... | |
std::map< std::string, ClassProxy > | getDerivedClasses () const |
Return registered children for the associated class to the given map. More... | |
std::map< std::string, ClassProxy > | getDirectParents () const |
Return map with the direct parents of this class. More... | |
bool | isBaseOf (Class const *const derived) const |
Return true if given class is registered and derived from this class. More... | |
bool | isBaseOf (ClassProxy derived) const |
Return true if given class is registered and derived from this class. More... | |
bool | isBaseOf (std::string const &identifier) const |
Return true if given class is registered and derived from this class. More... | |
bool | isDerivedFrom (Class const *const base) const |
Return true if given class is registered and parent of this class. More... | |
bool | isDerivedFrom (ClassProxy base) const |
Return true if given class is registered and parent of this class. More... | |
bool | isDirectlyDerivedFrom (Class const *const base) const |
Return true if the given class is a direct parent. More... | |
bool | isDirectlyDerivedFrom (ClassProxy base) const |
Return true if the given class is a direct parent. More... | |
bool | isAbstract () const |
Return true if the associated class is abstract. More... | |
bool | isLibraryLoaded () const |
Return true if the library which contains the associated class is loaded. More... | |
Protected Member Functions | |
Object * | newVAInstance (int paramCount, std::va_list list) const |
ClassProxy (boost::shared_ptr< Class > *iClass) | |
void | setClass (boost::shared_ptr< Class > *iClass) |
Protected Attributes | |
boost::shared_ptr< Class > * | mClass |
boost::recursive_mutex * | mThreadMutex |
Friends | |
class | ClassFactory |
class | VacantClass |
class | Class |
template<typename CLASS > | |
class | TClass |
The class proxy assures that the pointer to the class object is always valid.
This class supports the transparent change of a vacant class to a TClass object. Furthermore, it is necessary for thread-safe access.
|
inline |
|
inline |
|
protected |
|
inline |
|
inline |
|
inline |
std::string const& getIdentifier | ( | ) | const |
Return identifier for the class.
std::string const& getName | ( | ) | const |
Return name of the class.
int getTypeId | ( | ) | const |
Return unique id for the class.
Typename getTypename | ( | ) | const |
Returns the platform independent C++ typename of the class.
std::map<std::string, std::string> const& getMetaInfo | ( | ) | const |
Return map with meta information.
std::string const& getMetaInfo | ( | const std::string & | meta | ) | const |
Returns meta information for the given meta key.
Object* newInstance | ( | ) | const |
Return a new instance of the class associated with the class object.
|
inline |
Return a new instance of the class associated with the class object.
Object* newInstance | ( | int | paramCount, |
... | |||
) | const |
Return a new instance of the class associated with the class object.
Object* newInstance | ( | std::string const & | childIdentifier | ) | const |
Return a new instance of the child class with the given identifier.
|
inline |
Return a new instance of the child class with the given identifier.
Object* newInstance | ( | std::string const & | childIdentifier, |
int | paramCount, | ||
... | |||
) | const |
Return a new instance of the child class with the given identifier.
bool isClassRegistered | ( | std::string const & | classIdentifier | ) | const |
Return true if a class with the desired identifier is registered.
void eraseChild | ( | Class const *const | iClass | ) |
Remove the given child class from the class.
Calls eraseChild on all parents and removed the given class from its own child list.
void eraseParent | ( | Class const *const | iClass | ) |
Remove the given class from the list of parents.
Calls eraseParent on all children and removes the given class from its own parent list.
ClassProxy getClassByIdentifier | ( | std::string const & | classIdentifier | ) | const |
std::vector<ClassProxy> getClassByMeta | ( | std::string const & | metaKey, |
std::string const & | metaValue | ||
) | const |
Return vector of Class objects matching the meta criterion.
|
inline |
Return vector of Class objects returning true for the given.
std::map<std::string, ClassProxy > getDerivedClasses | ( | ) | const |
Return registered children for the associated class to the given map.
std::map<std::string, ClassProxy > getDirectParents | ( | ) | const |
Return map with the direct parents of this class.
bool isBaseOf | ( | Class const *const | derived | ) | const |
Return true if given class is registered and derived from this class.
bool isBaseOf | ( | ClassProxy | derived | ) | const |
Return true if given class is registered and derived from this class.
bool isBaseOf | ( | std::string const & | identifier | ) | const |
Return true if given class is registered and derived from this class.
bool isDerivedFrom | ( | Class const *const | base | ) | const |
Return true if given class is registered and parent of this class.
bool isDerivedFrom | ( | ClassProxy | base | ) | const |
Return true if given class is registered and parent of this class.
bool isDirectlyDerivedFrom | ( | Class const *const | base | ) | const |
Return true if the given class is a direct parent.
bool isDirectlyDerivedFrom | ( | ClassProxy | base | ) | const |
Return true if the given class is a direct parent.
bool isAbstract | ( | ) | const |
Return true if the associated class is abstract.
bool isLibraryLoaded | ( | ) | const |
Return true if the library which contains the associated class is loaded.
TClass classes will return true and Vacant class classes will return false.
|
protected |
|
protected |
|
friend |
|
friend |
|
friend |
|
friend |
|
protected |
|
protected |