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:395
type
Definition: HCALResponse.h:21
edm::TypeWithDict resolvedType(const edm::TypeWithDict &typ)
Definition: ClassUtils.cc:486
bool isTypeKeyedContainer(const edm::TypeWithDict &typ)
Definition: ClassUtils.cc:250
bool isTypeNamedReference(const edm::TypeWithDict &typ)
Definition: ClassUtils.cc:339
bool isTypeString(const edm::TypeWithDict &typ)
Definition: ClassUtils.cc:215
void * upCast(const edm::TypeWithDict &type, void *ptr, const edm::TypeWithDict &asType)
Definition: ClassUtils.cc:38
void operator()(void *ptr)
Definition: ClassUtils.cc:27
RflxDeleter(const edm::TypeWithDict &type)
Definition: ClassUtils.cc:16
bool isTypePrimitive(const edm::TypeWithDict &typ)
Definition: ClassUtils.cc:221
bool isTypeOraPointer(const edm::TypeWithDict &typ)
Definition: ClassUtils.cc:323
bool isType(const edm::TypeWithDict &type, const edm::TypeWithDict &baseType)
Definition: ClassUtils.cc:50
std::string demangledName(const std::type_info &typeInfo)
Definition: ClassUtils.cc:159
bool isTypeNonAssociativeContainer(const edm::TypeWithDict &typ)
Definition: ClassUtils.cc:301
bool isTypeNameOraVector(const std::string &typeName)
Definition: ClassUtils.cc:386
void loadDictionary(const std::string &className)
Definition: ClassUtils.cc:31
bool isTypePVector(const edm::TypeWithDict &typ)
Definition: ClassUtils.cc:355
edm::TypeWithDict containerSubType(const edm::TypeWithDict &typ, const std::string &subTypeName)
Definition: ClassUtils.cc:468
bool isTypeUniqueReference(const edm::TypeWithDict &typ)
Definition: ClassUtils.cc:343
bool isTypeOraVector(const edm::TypeWithDict &typ)
Definition: ClassUtils.cc:379
bool checkMappedType(const edm::TypeWithDict &type, const std::string &mappedTypeName)
Definition: ClassUtils.cc:114
bool isTypeOraReference(const edm::TypeWithDict &typ)
Definition: ClassUtils.cc:335
edm::TypeWithDict lookupDictionary(const std::type_info &typeInfo, bool throwFlag=true)
Definition: ClassUtils.cc:170
bool findBaseType(edm::TypeWithDict &type, edm::TypeWithDict &baseType, size_t &func)
Definition: ClassUtils.cc:136
bool isTypeAssociativeContainer(const edm::TypeWithDict &typ)
Definition: ClassUtils.cc:286
bool isTypeNonKeyedContainer(const edm::TypeWithDict &typ)
Definition: ClassUtils.cc:269
size_t arrayLength(const edm::TypeWithDict &typ)
Definition: ClassUtils.cc:493
bool isTypeQueryableVector(const edm::TypeWithDict &typ)
Definition: ClassUtils.cc:367
edm::TypeWithDict m_type
Definition: ClassUtils.h:21
edm::TypeWithDict containerKeyType(const edm::TypeWithDict &typ)
Definition: ClassUtils.cc:429
edm::TypeWithDict containerDataType(const edm::TypeWithDict &typ)
Definition: ClassUtils.cc:449
void * constructObject(const edm::TypeWithDict &typ)
Definition: ClassUtils.cc:205
std::string getClassProperty(const std::string &propertyName, const edm::TypeWithDict &type)
Definition: ClassUtils.cc:500
edm::TypeWithDict containerValueType(const edm::TypeWithDict &typ)
Definition: ClassUtils.cc:410
std::string getDataMemberProperty(const std::string &propertyName, const edm::MemberWithDict &dataMember)
Definition: ClassUtils.cc:513
bool isTypeContainer(const edm::TypeWithDict &typ)
Definition: ClassUtils.cc:225
std::string className(const T &t)
Definition: ClassName.h:30