REST-for-Physics
v2.3
Rare Event Searches ToolKit for Physics
|
This namespace serves for the reflection functionality. More...
Data Structures | |
struct | DataType_Info |
class | TRestReflector |
Functions | |
TRestReflector | Assembly (const std::string &typeName) |
Assembly an object of type: typeName, returning the allocated memory address and size. More... | |
void | CloneAny (const TRestReflector &from, const TRestReflector &to) |
Deep copy the content of object from to to More... | |
template<typename T > | |
TClass * | GetClassQuick () |
Get the type of a "class" object, returning the wrapped type identifier "TClass". More... | |
TClass * | GetClassQuick (std::string type) |
template<typename T > | |
std::string | GetTypeName () |
Get the type name of an object. More... | |
template<class T > | |
std::string | GetTypeName (T obj) |
Get the type name of an object. More... | |
TRestReflector | WrapType (const std::string &typeName) |
Wrap information an object of type: typeName, memory is not allocated. More... | |
Variables | |
EXTERN_DEF std::map< void *, TClass * > | RESTListOfClasses_typeid |
EXTERN_DEF std::map< std::string, TClass * > | RESTListOfClasses_typename |
This namespace serves for the reflection functionality.
TRestReflector REST_Reflection::Assembly | ( | const std::string & | typeName | ) |
Assembly an object of type: typeName, returning the allocated memory address and size.
Definition at line 260 of file TRestReflector.cxx.
void REST_Reflection::CloneAny | ( | const TRestReflector & | from, |
const TRestReflector & | to | ||
) |
Deep copy the content of object from
to to
Calls RESTVirtualConverter::CloneObj(). The actual methods are registered in converter.cpp If not registered, you can add it manually with AddConverter() macro
Definition at line 268 of file TRestReflector.cxx.
TClass * REST_Reflection::GetClassQuick | ( | ) |
Get the type of a "class" object, returning the wrapped type identifier "TClass".
Quicker than TClass::GetClass() since it stores limited objects in the std::map, no need to iterate all the valid types. Do not call this method before main function.
Definition at line 258 of file TRestReflector.h.
|
inline |
Wrap the std::string type name into ROOT type identifier "TClass"
Quicker than TClass::GetClass() since it stores limited objects in the std::map, no need to iterate all the valid types. Do not call this method before main function.
Definition at line 239 of file TRestReflector.h.
std::string REST_Reflection::GetTypeName | ( | ) |
Get the type name of an object.
Definition at line 273 of file TRestReflector.h.
std::string REST_Reflection::GetTypeName | ( | T | obj | ) |
Get the type name of an object.
Definition at line 282 of file TRestReflector.h.
TRestReflector REST_Reflection::WrapType | ( | const std::string & | typeName | ) |
Wrap information an object of type: typeName, memory is not allocated.
Definition at line 266 of file TRestReflector.cxx.
EXTERN_DEF std::map<void*, TClass*> REST_Reflection::RESTListOfClasses_typeid |
Definition at line 231 of file TRestReflector.h.
EXTERN_DEF std::map<std::string, TClass*> REST_Reflection::RESTListOfClasses_typename |
Definition at line 232 of file TRestReflector.h.