#include <ObjectWithDict.h>
Public Member Functions | |
void * | address () const |
TypeWithDict | dynamicType () const |
ObjectWithDict | get (std::string const &memberName) const |
template<typename T > | |
T | objectCast () |
ObjectWithDict (TypeWithDict const &type, void *address) | |
ObjectWithDict () | |
ObjectWithDict (std::type_info const &typeID, void *address) | |
operator bool () const | |
TypeWithDict const & | typeOf () const |
Static Public Member Functions | |
static ObjectWithDict | byType (TypeWithDict const &type) |
Private Attributes | |
void * | address_ |
TypeWithDict | type_ |
Friends | |
class | FunctionWithDict |
class | MemberWithDict |
class | TypeWithDict |
Definition at line 16 of file ObjectWithDict.h.
edm::ObjectWithDict::ObjectWithDict | ( | ) |
Definition at line 6 of file ObjectWithDict.cc.
edm::ObjectWithDict::ObjectWithDict | ( | TypeWithDict const & | type, |
void * | address | ||
) |
edm::ObjectWithDict::ObjectWithDict | ( | std::type_info const & | typeID, |
void * | address | ||
) |
Definition at line 22 of file ObjectWithDict.cc.
: type_(TypeWithDict(typeID)), address_(address) { }
void * edm::ObjectWithDict::address | ( | ) | const |
Definition at line 46 of file ObjectWithDict.cc.
References address_.
Referenced by reco::parser::ExpressionVar::delStorage(), edm::MemberWithDict::get(), fwlite::DataGetterHelper::getBranchData(), fwlite::DataGetterHelper::getBranchDataFor(), fwlite::DataGetterHelper::getByLabel(), reco::parser::MethodInvoker::invoke(), edm::FunctionWithDict::invoke(), FWParameterSetterBase::makeSetterFor(), reco::parser::ExpressionVar::objToDouble(), FWItemTVirtualCollectionProxyAccessor::setData(), FWItemSingleAccessor::setData(), FWItemRandomAccessorBase::setData(), and fwlite::internal::Data::~Data().
{ return address_; }
ObjectWithDict edm::ObjectWithDict::byType | ( | TypeWithDict const & | type | ) | [static] |
Definition at line 12 of file ObjectWithDict.cc.
References edm::TypeWithDict::construct(), and getGTfromDQMFile::obj.
Referenced by fwlite::DataGetterHelper::getBranchDataFor(), and reco::parser::ExpressionVar::makeStorage().
{ ObjectWithDict obj(type.construct()); return obj; }
TypeWithDict edm::ObjectWithDict::dynamicType | ( | ) | const |
Definition at line 33 of file ObjectWithDict.cc.
References address_, edm::TypeWithDict::isVirtual(), type_, and TypeWithDict.
Referenced by fwlite::RecordWriter::update().
{ if(!type_.isVirtual()) { return type_; } struct Dummy_t {virtual ~Dummy_t() {} }; return TypeWithDict(typeid(*(Dummy_t*)address_)); }
ObjectWithDict edm::ObjectWithDict::get | ( | std::string const & | memberName | ) | const |
Definition at line 51 of file ObjectWithDict.cc.
References edm::TypeWithDict::dataMemberByName(), edm::MemberWithDict::get(), and type_.
Referenced by edm::convert_handle().
{ return type_.dataMemberByName(memberName).get(*this); }
T edm::ObjectWithDict::objectCast | ( | ) | [inline] |
Definition at line 38 of file ObjectWithDict.h.
References address_.
edm::ObjectWithDict::operator bool | ( | ) | const [explicit] |
TypeWithDict const & edm::ObjectWithDict::typeOf | ( | ) | const |
Definition at line 28 of file ObjectWithDict.cc.
References type_.
Referenced by reco::parser::ExpressionVar::delStorage(), reco::parser::MethodInvoker::invoke(), edm::FunctionWithDict::invoke(), reco::parser::SingleInvoker::throwFailedConversion(), and fwlite::internal::Data::~Data().
{ return type_; }
friend class FunctionWithDict [friend] |
Definition at line 43 of file ObjectWithDict.h.
friend class MemberWithDict [friend] |
Definition at line 44 of file ObjectWithDict.h.
friend class TypeWithDict [friend] |
Definition at line 45 of file ObjectWithDict.h.
Referenced by dynamicType().
void* edm::ObjectWithDict::address_ [private] |
Definition at line 48 of file ObjectWithDict.h.
Referenced by address(), dynamicType(), objectCast(), and operator bool().
TypeWithDict edm::ObjectWithDict::type_ [private] |
Definition at line 47 of file ObjectWithDict.h.
Referenced by dynamicType(), get(), operator bool(), and typeOf().