![]() |
![]() |
#include <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 () | |
unitialized, anonymous object | |
DDObject (const DDName &name) | |
initialized (named) object | |
DDObject (DDName *) | |
named object, implemenation derived from DDName & thus provides the name | |
DDObject (const DDName &, T *) | |
initialized (named) object, implementation provided by T* | |
const DDName & | name () const |
anonymous (un-named) object | |
operator bool () const | |
T & | operator* () |
const T & | operator* () 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-std::map |
Definition at line 15 of file DDObject.h.
typedef RegistryType::const_iterator DDObject< T >::const_iterator |
Definition at line 24 of file DDObject.h.
iterator
Definition at line 22 of file DDObject.h.
typedef DDRegistry<pointer> DDObject< T >::RegistryType |
std::maps a DDName to the pointer to be wrapped
Definition at line 20 of file DDObject.h.
unitialized, anonymous object
Definition at line 94 of file DDObject.h.
initialized (named) object
Definition at line 100 of file DDObject.h.
{ registerObject(name,(T*)0); }
initialized (named) object, implementation provided by T*
Definition at line 107 of file DDObject.h.
{ registerObject(name,object); }
named object, implemenation derived from DDName & thus provides the name
Definition at line 124 of file DDObject.h.
{ // Loki compile time check whether T is sub-classed from DDName //SUPERSUBCLASS(DDName,T); registerObject(*object,static_cast<T*>(object)); }
static RegistryType& DDObject< T >::anoRegistry | ( | ) | [inline, static, private] |
static registry for anonymous pointers (un-named pointers)
Definition at line 81 of file DDObject.h.
{ static RegistryType reg_; return reg_; }
Definition at line 61 of file DDObject.h.
References DDObject< T >::registry().
{ return registry().begin(); }
Definition at line 63 of file DDObject.h.
References DDObject< T >::registry().
Referenced by DDObject< T >::operator bool().
{ return registry().end();}
anonymous (un-named) object
the name of the wrapped object
Definition at line 156 of file DDObject.h.
{ //static DDName name_; return rep_->first; }
Definition at line 53 of file DDObject.h.
References DDObject< T >::end(), DDObject< T >::registry(), and DDObject< T >::rep_.
Definition at line 164 of file DDObject.h.
{ return *(rep_->second); }
Definition at line 171 of file DDObject.h.
{ return *(rep_->second); }
Definition at line 178 of file DDObject.h.
{ return &(*rep_->second); }
Definition at line 185 of file DDObject.h.
{ return &(*rep_->second); }
void DDObject< T >::registerAnoObject | ( | const DDName & | name, |
T * | object | ||
) | [private] |
Definition at line 145 of file DDObject.h.
References query::result.
{ std::pair<typename RegistryType::iterator,bool> result = anoRegistry().insert(typename RegistryType::value_type(name,pointer(object))); if (!result.second) { result.first->second = pointer(object); } rep_ = result.first; }
Definition at line 133 of file DDObject.h.
References PhysicsTools::registry, and query::result.
static RegistryType& DDObject< T >::registry | ( | ) | [inline, static, private] |
the static registry for the wrapped pointer
Definition at line 74 of file DDObject.h.
Referenced by DDObject< T >::begin(), DDObject< T >::end(), and DDObject< T >::operator bool().
{ static RegistryType reg_; return reg_; };
representation of the wrapped object is a pointer into a registry-std::map
Definition at line 88 of file DDObject.h.
Referenced by DDObject< T >::operator bool().