#include <Reflex/Object.h>
Inheritance diagram for Reflex::Object:
Public Member Functions | |
Object (const Type &type=Type(), void *mem=0) | |
Object (const Object &) | |
~Object () | |
Object | operator= (const Object &obj) |
bool | operator== (const Object &obj) |
bool | operator!= (const Object &obj) |
operator bool () const | |
void * | Address () const |
Object | CastObject (const Type &to) const |
void | Destruct () const |
Type | DynamicType () const |
Object | Get (const std::string &dm) const |
void | Invoke (const std::string &fm, Object *ret=0, const std::vector< void * > &args=std::vector< void * >()) const |
template<typename T> | |
void | Invoke (const std::string &fm, T &ret, const std::vector< void * > &args=std::vector< void * >()) const |
void | Invoke (const std::string &fm, const Type &sign, Object *ret=0, const std::vector< void * > &args=std::vector< void * >()) const |
template<typename T> | |
void | Invoke (const std::string &fm, const Type &sign, T &ret, const std::vector< void * > &args=std::vector< void * >()) const |
void | Set (const std::string &dm, const void *value) const |
template<class T> | |
void | Set (const std::string &dm, const T &value) const |
Type | TypeOf () const |
Static Public Member Functions | |
template<typename T> | |
static Object | Create (T &v) |
Private Member Functions | |
void | Set2 (const std::string &dm, const void *value) const |
Private Attributes | |
Type | fType |
void * | fAddress |
Friends | |
class | ValueObject |
Definition at line 29 of file Object.h.
Reflex::Object::Object | ( | const Object & | ) | [inline] |
Definition at line 46 of file Object.h.
References Reflex::Type::ByTypeInfo(), Reflex::Dummy::Object(), and T.
Reflex::Object Reflex::Object::operator= | ( | const Object & | obj | ) | [inline] |
bool Reflex::Object::operator== | ( | const Object & | obj | ) | [inline] |
bool Reflex::Object::operator!= | ( | const Object & | obj | ) | [inline] |
Reflex::Object::operator bool | ( | ) | const [inline] |
void * Reflex::Object::Address | ( | ) | const [inline] |
Reflex::Object Reflex::Object::CastObject | ( | const Type & | to | ) | const [inline] |
CastObject an object from this class type to another one
to | is the class type to cast into | |
obj | the memory address of the object to be casted |
Definition at line 312 of file Object.h.
References Reflex::Type::CastObject(), fType, and Object().
void Reflex::Object::Destruct | ( | ) | const [inline] |
Destruct will call the destructor of a type and remove its memory allocation if desired
Definition at line 323 of file Object.h.
References Reflex::Type::Destruct(), fAddress, and fType.
Reflex::Type Reflex::Object::DynamicType | ( | ) | const [inline] |
DynamicType is used to discover the dynamic type (useful in case of polymorphism)
Definition at line 334 of file Object.h.
References Reflex::Type::DynamicType(), and fType.
Object Reflex::Object::Get | ( | const std::string & | dm | ) | const |
Get the data member value
dm | name of the data member to get |
void Reflex::Object::Invoke | ( | const std::string & | fm, | |
Object * | ret = 0 , |
|||
const std::vector< void * > & | args = std::vector< void * >() | |||
) | const |
Invoke a member function of the object
fm | name of the member function | |
ret | Object to put the return value into (can be 0 for function returning void) | |
args | a vector of memory addresses to parameter values |
void Reflex::Object::Invoke | ( | const std::string & | fm, | |
T & | ret, | |||
const std::vector< void * > & | args = std::vector<void*>() | |||
) | const [inline] |
Invoke a member function of the object
fm | name of the member function | |
ret | Object to put the return value into (can be 0 for function returning void) | |
args | a vector of memory addresses to parameter values |
Definition at line 134 of file Object.h.
References Reflex::Type::ByTypeInfo(), and T.
void Reflex::Object::Invoke | ( | const std::string & | fm, | |
const Type & | sign, | |||
Object * | ret = 0 , |
|||
const std::vector< void * > & | args = std::vector< void * >() | |||
) | const |
Invoke a member function of the object
fm | name of the member function | |
sign | the signature of the member function (for overloads) | |
ret | Object to put the return value into (can be 0 for function returning void) | |
args | a vector of memory addresses to parameter values |
void Reflex::Object::Invoke | ( | const std::string & | fm, | |
const Type & | sign, | |||
T & | ret, | |||
const std::vector< void * > & | args = std::vector<void*>() | |||
) | const [inline] |
Invoke a member function of the object
fm | name of the member function | |
sign | the signature of the member function (for overloads) | |
ret | Object to put the return value into (can be 0 for function returning void) | |
args | a vector of memory addresses to parameter values |
Definition at line 166 of file Object.h.
References Reflex::Type::ByTypeInfo(), RootCsg::sign(), and T.
void Reflex::Object::Set | ( | const std::string & | dm, | |
const void * | value | |||
) | const [inline] |
void Reflex::Object::Set | ( | const std::string & | dm, | |
const T & | value | |||
) | const [inline] |
Reflex::Type Reflex::Object::TypeOf | ( | ) | const [inline] |
TypeOf will return the type of the object
Definition at line 361 of file Object.h.
References fType.
Referenced by Reflex::ValueObject::Assign(), and Reflex::ValueObject::ValueObject().
void Reflex::Object::Set2 | ( | const std::string & | dm, | |
const void * | value | |||
) | const [private] |
Referenced by Set().
friend class ValueObject [friend] |
Type Reflex::Object::fType [private] |
the type of the object 1 1 object type
Definition at line 214 of file Object.h.
Referenced by Reflex::ValueObject::Assign(), CastObject(), Destruct(), DynamicType(), operator bool(), operator!=(), operator=(), operator==(), and TypeOf().
void* Reflex::Object::fAddress [mutable, private] |
the address of the object
Definition at line 221 of file Object.h.
Referenced by Address(), Reflex::ValueObject::Assign(), Destruct(), operator bool(), operator!=(), operator=(), operator==(), Reflex::ValueObject::Value(), and Reflex::ValueObject::ValueObject().