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
6 
7 namespace ora {
8 
9  class RflxDeleter{
10 
11  public:
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 edm::TypeWithDict& type, void* ptr, const edm::TypeWithDict& asType );
30 
31  bool isType( const edm::TypeWithDict& type, const edm::TypeWithDict& baseType );
32 
33  bool checkMappedType( const edm::TypeWithDict& type, const std::string& mappedTypeName );
34 
35  bool findBaseType( edm::TypeWithDict& type, edm::TypeWithDict& baseType, size_t& func );
36 
37  std::string demangledName( const std::type_info& typeInfo );
38 
39  edm::TypeWithDict lookupDictionary( const std::type_info& typeInfo, bool throwFlag = true );
40 
41  edm::TypeWithDict lookupDictionary( const std::string& className, bool throwFlag = true );
42 
43  void* constructObject( const edm::TypeWithDict& typ );
44 
45  bool isTypeString(const edm::TypeWithDict& typ);
46 
47  bool isTypePrimitive(const edm::TypeWithDict& typ);
48 
49  bool isTypeContainer(const edm::TypeWithDict& typ);
50 
51  bool isTypeKeyedContainer(const edm::TypeWithDict& typ);
52 
54 
56 
58 
60 
62 
64 
65  edm::TypeWithDict containerSubType(const edm::TypeWithDict& typ, const std::string& subTypeName);
66 
68 
69  bool isTypeOraReference( const edm::TypeWithDict& typ);
70 
71  bool isTypeNamedReference( const edm::TypeWithDict& typ);
72 
73  bool isTypeOraPointer( const edm::TypeWithDict& typ);
74 
75  bool isTypeUniqueReference( const edm::TypeWithDict& typ);
76 
77  bool isTypePVector( const edm::TypeWithDict& typ);
78 
79  bool isTypeQueryableVector( const edm::TypeWithDict& typ);
80 
81  bool isTypeOraVector( const edm::TypeWithDict& typ);
82 
83  bool isTypeNameOraVector( const std::string& typeName );
84 
85  bool isTypeObject( const edm::TypeWithDict& typ);
86 
87  size_t arrayLength( const edm::TypeWithDict& typ );
88 
89  std::string getClassProperty( const std::string& propertyName, const edm::TypeWithDict& type );
90  std::string getDataMemberProperty( const std::string& propertyName, const edm::MemberWithDict& dataMember );
91 
92  }
93 
94 }
95 
96 #endif
bool isTypeObject(const edm::TypeWithDict &typ)
Definition: ClassUtils.cc:392
type
Definition: HCALResponse.h:21
edm::TypeWithDict resolvedType(const edm::TypeWithDict &typ)
Definition: ClassUtils.cc:483
bool isTypeKeyedContainer(const edm::TypeWithDict &typ)
Definition: ClassUtils.cc:247
bool isTypeNamedReference(const edm::TypeWithDict &typ)
Definition: ClassUtils.cc:336
bool isTypeString(const edm::TypeWithDict &typ)
Definition: ClassUtils.cc:212
void * upCast(const edm::TypeWithDict &type, void *ptr, const edm::TypeWithDict &asType)
Definition: ClassUtils.cc:35
void operator()(void *ptr)
Definition: ClassUtils.cc:26
RflxDeleter(const edm::TypeWithDict &type)
Definition: ClassUtils.cc:15
bool isTypePrimitive(const edm::TypeWithDict &typ)
Definition: ClassUtils.cc:218
bool isTypeOraPointer(const edm::TypeWithDict &typ)
Definition: ClassUtils.cc:320
bool isType(const edm::TypeWithDict &type, const edm::TypeWithDict &baseType)
Definition: ClassUtils.cc:47
std::string demangledName(const std::type_info &typeInfo)
Definition: ClassUtils.cc:156
bool isTypeNonAssociativeContainer(const edm::TypeWithDict &typ)
Definition: ClassUtils.cc:298
bool isTypeNameOraVector(const std::string &typeName)
Definition: ClassUtils.cc:383
void loadDictionary(const std::string &className)
Definition: ClassUtils.cc:30
bool isTypePVector(const edm::TypeWithDict &typ)
Definition: ClassUtils.cc:352
edm::TypeWithDict containerSubType(const edm::TypeWithDict &typ, const std::string &subTypeName)
Definition: ClassUtils.cc:465
bool isTypeUniqueReference(const edm::TypeWithDict &typ)
Definition: ClassUtils.cc:340
bool isTypeOraVector(const edm::TypeWithDict &typ)
Definition: ClassUtils.cc:376
bool checkMappedType(const edm::TypeWithDict &type, const std::string &mappedTypeName)
Definition: ClassUtils.cc:111
bool isTypeOraReference(const edm::TypeWithDict &typ)
Definition: ClassUtils.cc:332
edm::TypeWithDict lookupDictionary(const std::type_info &typeInfo, bool throwFlag=true)
Definition: ClassUtils.cc:167
bool findBaseType(edm::TypeWithDict &type, edm::TypeWithDict &baseType, size_t &func)
Definition: ClassUtils.cc:133
bool isTypeAssociativeContainer(const edm::TypeWithDict &typ)
Definition: ClassUtils.cc:283
bool isTypeNonKeyedContainer(const edm::TypeWithDict &typ)
Definition: ClassUtils.cc:266
size_t arrayLength(const edm::TypeWithDict &typ)
Definition: ClassUtils.cc:490
bool isTypeQueryableVector(const edm::TypeWithDict &typ)
Definition: ClassUtils.cc:364
edm::TypeWithDict m_type
Definition: ClassUtils.h:21
edm::TypeWithDict containerKeyType(const edm::TypeWithDict &typ)
Definition: ClassUtils.cc:426
edm::TypeWithDict containerDataType(const edm::TypeWithDict &typ)
Definition: ClassUtils.cc:446
void * constructObject(const edm::TypeWithDict &typ)
Definition: ClassUtils.cc:202
std::string getClassProperty(const std::string &propertyName, const edm::TypeWithDict &type)
Definition: ClassUtils.cc:497
edm::TypeWithDict containerValueType(const edm::TypeWithDict &typ)
Definition: ClassUtils.cc:407
std::string getDataMemberProperty(const std::string &propertyName, const edm::MemberWithDict &dataMember)
Definition: ClassUtils.cc:510
bool isTypeContainer(const edm::TypeWithDict &typ)
Definition: ClassUtils.cc:222
std::string className(const T &t)
Definition: ClassName.h:30