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 checkMappedType( const Reflex::Type& type, const std::string& mappedTypeName );
34 
35  bool findBaseType( Reflex::Type& type, Reflex::Type& baseType, Reflex::OffsetFunction& func );
36 
37  std::string demangledName( const std::type_info& typeInfo );
38 
39  Reflex::Type lookupDictionary( const std::type_info& typeInfo, bool throwFlag = true );
40 
41  Reflex::Type lookupDictionary( const std::string& className, bool throwFlag = true );
42 
43  void* constructObject( const Reflex::Type& typ );
44 
45  bool isTypeString(const Reflex::Type& typ);
46 
47  bool isTypePrimitive(const Reflex::Type& typ);
48 
49  bool isTypeContainer(const Reflex::Type& typ);
50 
51  bool isTypeKeyedContainer(const Reflex::Type& typ);
52 
53  bool isTypeNonKeyedContainer(const Reflex::Type& typ);
54 
56 
58 
60 
62 
64 
65  Reflex::Type containerSubType(const Reflex::Type& typ, const std::string& subTypeName);
66 
68 
69  bool isTypeOraReference( const Reflex::Type& typ);
70 
71  bool isTypeNamedReference( const Reflex::Type& typ);
72 
73  bool isTypeOraPointer( const Reflex::Type& typ);
74 
75  bool isTypeUniqueReference( const Reflex::Type& typ);
76 
77  bool isTypePVector( const Reflex::Type& typ);
78 
79  bool isTypeQueryableVector( const Reflex::Type& typ);
80 
81  bool isTypeOraVector( const Reflex::Type& typ);
82 
83  bool isTypeNameOraVector( const std::string& typeName );
84 
85  bool isTypeObject( const Reflex::Type& typ);
86 
87 
88  }
89 
90 }
91 
92 #endif
type
Definition: HCALResponse.h:22
bool isTypeOraPointer(const Reflex::Type &typ)
Definition: ClassUtils.cc:250
bool isTypeNonKeyedContainer(const Reflex::Type &typ)
Definition: ClassUtils.cc:193
bool isTypeAssociativeContainer(const Reflex::Type &typ)
Definition: ClassUtils.cc:211
bool isTypeString(const Reflex::Type &typ)
Definition: ClassUtils.cc:137
void * constructObject(const Reflex::Type &typ)
Definition: ClassUtils.cc:127
bool isTypePVector(const Reflex::Type &typ)
Definition: ClassUtils.cc:284
bool isTypeOraReference(const Reflex::Type &typ)
Definition: ClassUtils.cc:263
void operator()(void *ptr)
Definition: ClassUtils.cc:23
bool findBaseType(Reflex::Type &type, Reflex::Type &baseType, Reflex::OffsetFunction &func)
Definition: ClassUtils.cc:67
bool isTypeUniqueReference(const Reflex::Type &typ)
Definition: ClassUtils.cc:271
std::string demangledName(const std::type_info &typeInfo)
Definition: ClassUtils.cc:82
Reflex::Type containerSubType(const Reflex::Type &typ, const std::string &subTypeName)
Definition: ClassUtils.cc:389
Reflex::Type containerDataType(const Reflex::Type &typ)
Definition: ClassUtils.cc:373
bool checkMappedType(const Reflex::Type &type, const std::string &mappedTypeName)
Definition: ClassUtils.cc:54
bool isTypeNameOraVector(const std::string &typeName)
Definition: ClassUtils.cc:317
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:147
Reflex::Type containerKeyType(const Reflex::Type &typ)
Definition: ClassUtils.cc:357
Reflex::Type containerValueType(const Reflex::Type &typ)
Definition: ClassUtils.cc:341
Reflex::Type resolvedType(const Reflex::Type &typ)
Definition: ClassUtils.cc:404
bool isTypeKeyedContainer(const Reflex::Type &typ)
Definition: ClassUtils.cc:173
bool isTypePrimitive(const Reflex::Type &typ)
Definition: ClassUtils.cc:143
bool isTypeNamedReference(const Reflex::Type &typ)
Definition: ClassUtils.cc:267
void * upCast(const Reflex::Type &type, void *ptr, const Reflex::Type &asType)
Definition: ClassUtils.cc:32
bool isTypeNonAssociativeContainer(const Reflex::Type &typ)
Definition: ClassUtils.cc:227
bool isTypeOraVector(const Reflex::Type &typ)
Definition: ClassUtils.cc:310
Reflex::Type lookupDictionary(const std::type_info &typeInfo, bool throwFlag=true)
Definition: ClassUtils.cc:93
bool isTypeObject(const Reflex::Type &typ)
Definition: ClassUtils.cc:326
std::string className(const T &t)
Definition: ClassName.h:30
bool isType(const Reflex::Type &type, const Reflex::Type &baseType)
Definition: ClassUtils.cc:45
Reflex::Type m_type
Definition: ClassUtils.h:21
bool isTypeQueryableVector(const Reflex::Type &typ)
Definition: ClassUtils.cc:297