CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
ClassUtils.h
Go to the documentation of this file.
1 #ifndef INCLUDE_ORA_CLASSUTILS_H
2 #define INCLUDE_ORA_CLASSUTILS_H
3 
4 // externals
5 #include "Reflex/Type.h"
6 
7 namespace ora {
8 
9  class RflxDeleter{
10 
11  public:
12  RflxDeleter( const Reflex::Type& type );
13 
14  RflxDeleter( const RflxDeleter& rhs );
15 
16  ~RflxDeleter();
17 
18  void operator()( void* ptr );
19 
20  private:
22 
23  };
24 
25  namespace ClassUtils {
26 
27  void loadDictionary( const std::string& className );
28 
29  void* upCast( const Reflex::Type& type, void* ptr, const Reflex::Type& asType );
30 
31  bool isType( const Reflex::Type& type, const Reflex::Type& baseType );
32 
33  bool findBaseType( Reflex::Type& type, Reflex::Type& baseType, Reflex::OffsetFunction& func );
34 
35  std::string demangledName( const std::type_info& typeInfo );
36 
37  Reflex::Type lookupDictionary( const std::type_info& typeInfo, bool throwFlag = true );
38 
39  Reflex::Type lookupDictionary( const std::string& className, bool throwFlag = true );
40 
41  void* constructObject( const Reflex::Type& typ );
42 
43  bool isTypeString(const Reflex::Type& typ);
44 
45  bool isTypePrimitive(const Reflex::Type& typ);
46 
47  bool isTypeContainer(const Reflex::Type& typ);
48 
49  bool isTypeKeyedContainer(const Reflex::Type& typ);
50 
51  bool isTypeNonKeyedContainer(const Reflex::Type& typ);
52 
54 
56 
58 
60 
62 
63  Reflex::Type containerSubType(const Reflex::Type& typ, const std::string& subTypeName);
64 
66 
67  bool isTypeOraReference( const Reflex::Type& typ);
68 
69  bool isTypeNamedReference( const Reflex::Type& typ);
70 
71  bool isTypeOraPointer( const Reflex::Type& typ);
72 
73  bool isTypeUniqueReference( const Reflex::Type& typ);
74 
75  bool isTypePVector( const Reflex::Type& typ);
76 
77  bool isTypeQueryableVector( const Reflex::Type& typ);
78 
79  bool isTypeObject( const Reflex::Type& typ);
80 
81  }
82 
83 }
84 
85 #endif
type
Definition: HCALResponse.h:22
bool isTypeOraPointer(const Reflex::Type &typ)
Definition: ClassUtils.cc:241
bool isTypeNonKeyedContainer(const Reflex::Type &typ)
Definition: ClassUtils.cc:184
bool isTypeAssociativeContainer(const Reflex::Type &typ)
Definition: ClassUtils.cc:202
bool isTypeString(const Reflex::Type &typ)
Definition: ClassUtils.cc:128
void * constructObject(const Reflex::Type &typ)
Definition: ClassUtils.cc:118
bool isTypePVector(const Reflex::Type &typ)
Definition: ClassUtils.cc:275
bool isTypeOraReference(const Reflex::Type &typ)
Definition: ClassUtils.cc:254
void operator()(void *ptr)
Definition: ClassUtils.cc:23
bool findBaseType(Reflex::Type &type, Reflex::Type &baseType, Reflex::OffsetFunction &func)
Definition: ClassUtils.cc:58
bool isTypeUniqueReference(const Reflex::Type &typ)
Definition: ClassUtils.cc:262
std::string demangledName(const std::type_info &typeInfo)
Definition: ClassUtils.cc:73
Reflex::Type containerSubType(const Reflex::Type &typ, const std::string &subTypeName)
Definition: ClassUtils.cc:365
Reflex::Type containerDataType(const Reflex::Type &typ)
Definition: ClassUtils.cc:349
void loadDictionary(const std::string &className)
Definition: ClassUtils.cc:27
RflxDeleter(const Reflex::Type &type)
Definition: ClassUtils.cc:12
bool isTypeContainer(const Reflex::Type &typ)
Definition: ClassUtils.cc:138
Reflex::Type containerKeyType(const Reflex::Type &typ)
Definition: ClassUtils.cc:333
Reflex::Type containerValueType(const Reflex::Type &typ)
Definition: ClassUtils.cc:317
Reflex::Type resolvedType(const Reflex::Type &typ)
Definition: ClassUtils.cc:380
bool isTypeKeyedContainer(const Reflex::Type &typ)
Definition: ClassUtils.cc:164
bool isTypePrimitive(const Reflex::Type &typ)
Definition: ClassUtils.cc:134
bool isTypeNamedReference(const Reflex::Type &typ)
Definition: ClassUtils.cc:258
void * upCast(const Reflex::Type &type, void *ptr, const Reflex::Type &asType)
Definition: ClassUtils.cc:36
bool isTypeNonAssociativeContainer(const Reflex::Type &typ)
Definition: ClassUtils.cc:218
Reflex::Type lookupDictionary(const std::type_info &typeInfo, bool throwFlag=true)
Definition: ClassUtils.cc:84
bool isTypeObject(const Reflex::Type &typ)
Definition: ClassUtils.cc:301
std::string className(const T &t)
Definition: ClassName.h:30
bool isType(const Reflex::Type &type, const Reflex::Type &baseType)
Definition: ClassUtils.cc:49
Reflex::Type m_type
Definition: ClassUtils.h:21
bool isTypeQueryableVector(const Reflex::Type &typ)
Definition: ClassUtils.cc:288