Reflex::Object Class Reference
[Reflex]

#include <Reflex/Object.h>

Inheritance diagram for Reflex::Object:

Reflex::ValueObject List of all members.

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

Detailed Description

Author:
Stefan Roiser
Date:
24/06/2004

Definition at line 29 of file Object.h.


Constructor & Destructor Documentation

Reflex::Object::Object ( const Type type = Type(),
void *  mem = 0 
) [inline]

constructor

Definition at line 249 of file Object.h.

Referenced by CastObject().

Reflex::Object::Object ( const Object  )  [inline]

constructor

Definition at line 258 of file Object.h.

Reflex::Object::~Object (  )  [inline]

destructor

Definition at line 41 of file Object.h.


Member Function Documentation

template<typename T>
static Object Reflex::Object::Create ( T v  )  [inline, static]

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]

operator assigment

Definition at line 267 of file Object.h.

References fAddress, and fType.

bool Reflex::Object::operator== ( const Object obj  )  [inline]

operator ==

Definition at line 277 of file Object.h.

References fAddress, and fType.

bool Reflex::Object::operator!= ( const Object obj  )  [inline]

inequal operator

Definition at line 285 of file Object.h.

References fAddress, and fType.

Reflex::Object::operator bool (  )  const [inline]

operator bool

Definition at line 293 of file Object.h.

References fAddress, and fType.

void * Reflex::Object::Address (  )  const [inline]

Address will return the memory address of the object

Returns:
memory address of object

Definition at line 304 of file Object.h.

References fAddress.

Reflex::Object Reflex::Object::CastObject ( const Type to  )  const [inline]

CastObject an object from this class type to another one

Parameters:
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)

Returns:
the actual class of the object

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

Parameters:
dm name of the data member to get
Returns:
member value as object

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

Parameters:
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
Returns:
the return value of the function as object

template<typename T>
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

Parameters:
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
Returns:
the return value of the function as object

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

Parameters:
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
Returns:
the return value of the function as object

template<typename T>
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

Parameters:
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
Returns:
the return value of the function as object

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]

Set will set a data member value of this object

Parameters:
dm the name of the data member
value the memory address of the value to set

Definition at line 342 of file Object.h.

References Set2().

template<class T>
void Reflex::Object::Set ( const std::string dm,
const T value 
) const [inline]

Set will set a data member value of this object

Parameters:
dm the name of the data member
value the memory address of the value to set

Definition at line 352 of file Object.h.

References Set2().

Reflex::Type Reflex::Object::TypeOf (  )  const [inline]

TypeOf will return the type of the object

Returns:
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().


Friends And Related Function Documentation

friend class ValueObject [friend]

Definition at line 201 of file Object.h.


Member Data Documentation

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().


The documentation for this class was generated from the following file:
Generated on Tue Jul 5 16:56:47 2011 for ROOT_528-00b_version by  doxygen 1.5.1