CMS 3D CMS Logo

/data/refman/pasoursint/CMSSW_6_1_2_SLHC2_patch1/src/FWCore/Utilities/src/ObjectWithDict.cc

Go to the documentation of this file.
00001 #include "Reflex/Type.h"
00002 
00003 #include "FWCore/Utilities/interface/ObjectWithDict.h"
00004 #include "FWCore/Utilities/interface/TypeWithDict.h"
00005 
00006 namespace edm {
00007 
00008   ObjectWithDict::ObjectWithDict(TypeWithDict const& type) : object_(type.type_.Construct()) {}
00009 
00010   ObjectWithDict::ObjectWithDict(TypeWithDict const& type,
00011                                  TypeWithDict const& signature,
00012                                  std::vector<void*> const& values) : object_(type.type_.Construct(signature.type_, values)) {}
00013 
00014   ObjectWithDict::ObjectWithDict(TypeWithDict const& type, void* address) : object_(type.type_, address) {}
00015 
00016   ObjectWithDict::ObjectWithDict(std::type_info const& typeID, void* address) : object_(Reflex::Type::ByTypeInfo(typeID), address) {}
00017 
00018   std::string
00019   ObjectWithDict::typeName() const {
00020     return object_.TypeOf().TypeInfo().name();
00021   }
00022 
00023   bool
00024   ObjectWithDict::isPointer() const {
00025     return object_.TypeOf().IsPointer();
00026   }
00027 
00028   bool
00029   ObjectWithDict::isReference() const {
00030     return object_.TypeOf().IsReference();
00031   }
00032 
00033   bool
00034   ObjectWithDict::isTypedef() const {
00035     return object_.TypeOf().IsTypedef();
00036   }
00037 
00038   TypeWithDict
00039   ObjectWithDict::typeOf() const {
00040     return TypeWithDict(object_.TypeOf());
00041   }
00042 
00043   TypeWithDict
00044   ObjectWithDict::toType() const {
00045     return TypeWithDict(object_.TypeOf().ToType());
00046   }
00047 
00048   TypeWithDict
00049   ObjectWithDict::finalType() const {
00050     return TypeWithDict(object_.TypeOf().FinalType());
00051   }
00052 
00053   TypeWithDict
00054   ObjectWithDict::dynamicType() const {
00055     return TypeWithDict(object_.DynamicType());
00056   }
00057 
00058   ObjectWithDict
00059   ObjectWithDict::castObject(TypeWithDict const& type) const {
00060     return ObjectWithDict(object_.CastObject(type.type_));
00061   }
00062 
00063   ObjectWithDict
00064   ObjectWithDict::construct() const {
00065     return ObjectWithDict(object_.TypeOf().Construct());
00066   }
00067 
00068 }