#include <DetectorDescription/Core/interface/DDObject.h>
Public Types | |
typedef RegistryType::const_iterator | const_iterator |
typedef RegistryType::iterator | iterator |
iterator | |
typedef Ptr< T > | pointer |
typedef DDRegistry< pointer > | RegistryType |
std::maps a DDName to the pointer to be wrapped | |
Public Member Functions | |
DDObject (DDName *) | |
named object, implemenation derived from DDName & thus provides the name | |
DDObject (const DDName &, T *) | |
initialized (named) object, implementation provided by T* | |
DDObject (const DDName &name) | |
initialized (named) object | |
DDObject () | |
unitialized, anonymous object | |
const DDName & | name () const |
anonymous (un-named) object | |
T & | operator * () |
const T & | operator * () const |
operator bool () const | |
T * | operator-> () |
const T * | operator-> () const |
Static Public Member Functions | |
static iterator | begin () |
static iterator | end () |
Private Member Functions | |
void | init () |
void | registerAnoObject (const DDName &name, T *object) |
void | registerObject (const DDName &name, T *object) |
Static Private Member Functions | |
static RegistryType & | anoRegistry () |
static registry for anonymous pointers (un-named pointers) | |
static RegistryType & | registry () |
the static registry for the wrapped pointer | |
Private Attributes | |
RegistryType::iterator | rep_ |
representation of the wrapped object is a pointer into a registry-stdmap |
Definition at line 15 of file DDObject.h.
typedef RegistryType::const_iterator DDObject< T >::const_iterator |
Definition at line 24 of file DDObject.h.
Definition at line 18 of file DDObject.h.
typedef DDRegistry<pointer> DDObject< T >::RegistryType |
initialized (named) object
Definition at line 100 of file DDObject.h.
References DDObject< T >::registerObject().
00101 { 00102 registerObject(name,(T*)0); 00103 }
initialized (named) object, implementation provided by T*
Definition at line 107 of file DDObject.h.
References DDObject< T >::registerObject().
00108 { 00109 registerObject(name,object); 00110 }
named object, implemenation derived from DDName & thus provides the name
Definition at line 124 of file DDObject.h.
References DDObject< T >::registerObject().
00125 { 00126 // Loki compile time check whether T is sub-classed from DDName 00127 //SUPERSUBCLASS(DDName,T); 00128 registerObject(*object,static_cast<T*>(object)); 00129 }
static RegistryType& DDObject< T >::anoRegistry | ( | ) | [inline, static, private] |
static registry for anonymous pointers (un-named pointers)
Definition at line 81 of file DDObject.h.
References reg_.
Referenced by DDObject< T >::registerAnoObject().
00082 { 00083 static RegistryType reg_; 00084 return reg_; 00085 }
Definition at line 61 of file DDObject.h.
References DDObject< T >::registry().
00061 { return registry().begin(); }
Definition at line 63 of file DDObject.h.
References DDObject< T >::registry().
Referenced by DDObject< T >::operator bool().
00063 { return registry().end();}
anonymous (un-named) object
the name of the wrapped object
Definition at line 156 of file DDObject.h.
References DDObject< T >::rep_.
00157 { 00158 //static DDName name_; 00159 return rep_->first; 00160 }
Definition at line 171 of file DDObject.h.
References DDObject< T >::rep_.
00172 { 00173 return *(rep_->second); 00174 }
Definition at line 164 of file DDObject.h.
References DDObject< T >::rep_.
00165 { 00166 return *(rep_->second); 00167 }
Definition at line 53 of file DDObject.h.
References DDObject< T >::end(), DDObject< T >::registry(), and DDObject< T >::rep_.
00054 { 00055 if (rep_ != registry().end()) { 00056 return bool(rep_->second); 00057 } 00058 throw DDException("unbound DDObject, typeid.name="+std::string(typeid(*rep_->second).name())); 00059 };
T * DDObject< T >::operator-> | ( | ) | [inline] |
Definition at line 185 of file DDObject.h.
References DDObject< T >::rep_.
00186 { 00187 return &(*rep_->second); 00188 }
const T * DDObject< T >::operator-> | ( | ) | const [inline] |
Definition at line 178 of file DDObject.h.
References DDObject< T >::rep_.
00179 { 00180 return &(*rep_->second); 00181 }
void DDObject< T >::registerAnoObject | ( | const DDName & | name, | |
T * | object | |||
) | [inline, private] |
Definition at line 145 of file DDObject.h.
References DDObject< T >::anoRegistry(), DDObject< T >::rep_, and HLT_VtxMuL3::result.
00146 { 00147 std::pair<typename RegistryType::iterator,bool> result 00148 = anoRegistry().insert(typename RegistryType::value_type(name,pointer(object))); 00149 if (!result.second) { 00150 result.first->second = pointer(object); 00151 } 00152 rep_ = result.first; 00153 }
void DDObject< T >::registerObject | ( | const DDName & | name, | |
T * | object | |||
) | [inline, private] |
Definition at line 133 of file DDObject.h.
References DDObject< T >::registry(), DDObject< T >::rep_, and HLT_VtxMuL3::result.
Referenced by DDObject< T >::DDObject().
00134 { 00135 std::pair<typename RegistryType::iterator,bool> result 00136 = registry().insert(typename RegistryType::value_type(name,pointer(object))); 00137 if (!result.second) { 00138 result.first->second = pointer(object); 00139 } 00140 rep_ = result.first; 00141 }
static RegistryType& DDObject< T >::registry | ( | ) | [inline, static, private] |
the static registry for the wrapped pointer
Definition at line 74 of file DDObject.h.
References reg_.
Referenced by DDObject< T >::begin(), DDObject< T >::end(), DDObject< T >::operator bool(), and DDObject< T >::registerObject().
00075 { 00076 static RegistryType reg_; 00077 return reg_; 00078 };
representation of the wrapped object is a pointer into a registry-stdmap
Definition at line 88 of file DDObject.h.
Referenced by DDObject< T >::name(), DDObject< T >::operator *(), DDObject< T >::operator bool(), DDObject< T >::operator->(), DDObject< T >::registerAnoObject(), and DDObject< T >::registerObject().