Collaboration diagram for org::xmlBlaster::util::ReferenceHolder< T >:
Public Member Functions | |
ReferenceHolder (T *el) | |
ReferenceHolder (T &el) | |
ReferenceHolder (const ReferenceHolder &refHolder) | |
ReferenceHolder & | operator= (const ReferenceHolder &refHolder) |
~ReferenceHolder () | |
T & | operator * () const |
T * | operator-> () const |
T * | getElement () const |
bool | isNull () const |
bool | operator== (const ReferenceHolder< T > other) const |
bool | operator< (const ReferenceHolder< T > other) const |
bool | operator> (const ReferenceHolder< T > other) const |
if you pass an entry to a container, the entry is first copied and then put into the container. When you retrieve the entry it is copied again. In cases you want to allocate the objects outside the container and store the references of such objects in the container (i.e. the container is not the owner of the object), you could use pointers. The drawback of using pointers however is that you loose the comparison operator. This class allows you to store the objects as references and at the same time maintains the correct comparison between entries in the container.
Definition at line 28 of file ReferenceHolder.h.
org::xmlBlaster::util::ReferenceHolder< T >::ReferenceHolder | ( | T * | el | ) |
Definition at line 46 of file ReferenceHolder.h.
org::xmlBlaster::util::ReferenceHolder< T >::ReferenceHolder | ( | T & | el | ) |
Definition at line 52 of file ReferenceHolder.h.
org::xmlBlaster::util::ReferenceHolder< T >::ReferenceHolder | ( | const ReferenceHolder< T > & | refHolder | ) |
Definition at line 57 of file ReferenceHolder.h.
org::xmlBlaster::util::ReferenceHolder< T >::~ReferenceHolder | ( | ) |
Definition at line 74 of file ReferenceHolder.h.
ReferenceHolder& org::xmlBlaster::util::ReferenceHolder< T >::operator= | ( | const ReferenceHolder< T > & | refHolder | ) |
Definition at line 63 of file ReferenceHolder.h.
References org::xmlBlaster::util::ReferenceHolder< T >::element_.
T& org::xmlBlaster::util::ReferenceHolder< T >::operator * | ( | ) | const |
Definition at line 80 of file ReferenceHolder.h.
T* org::xmlBlaster::util::ReferenceHolder< T >::operator-> | ( | ) | const |
Definition at line 85 of file ReferenceHolder.h.
T* org::xmlBlaster::util::ReferenceHolder< T >::getElement | ( | ) | const |
Definition at line 90 of file ReferenceHolder.h.
bool org::xmlBlaster::util::ReferenceHolder< T >::isNull | ( | ) | const |
Definition at line 95 of file ReferenceHolder.h.
Referenced by org::xmlBlaster::util::dispatch::ConnectionsHandler::connect(), org::xmlBlaster::util::dispatch::ConnectionsHandler::flushQueue(), org::xmlBlaster::util::queue::ConnectQueueEntry::getEmbeddedObject(), org::xmlBlaster::client::XmlBlasterAccess::getSessionName(), org::xmlBlaster::client::XmlBlasterAccess::getSessionNameRef(), org::xmlBlaster::util::queue::ConnectQueueEntry::getSizeInBytes(), org::xmlBlaster::util::dispatch::ConnectionsHandler::isFailsafe(), org::xmlBlaster::util::dispatch::ConnectionsHandler::publish(), org::xmlBlaster::util::dispatch::ConnectionsHandler::queuePublish(), org::xmlBlaster::util::dispatch::ConnectionsHandler::queueSubscribe(), org::xmlBlaster::util::dispatch::ConnectionsHandler::startPinger(), org::xmlBlaster::util::dispatch::ConnectionsHandler::timeout(), and org::xmlBlaster::util::dispatch::ConnectionsHandler::~ConnectionsHandler().
bool org::xmlBlaster::util::ReferenceHolder< T >::operator== | ( | const ReferenceHolder< T > | other | ) | const |
Definition at line 100 of file ReferenceHolder.h.
References org::xmlBlaster::util::ReferenceHolder< T >::element_.
bool org::xmlBlaster::util::ReferenceHolder< T >::operator< | ( | const ReferenceHolder< T > | other | ) | const |
Definition at line 105 of file ReferenceHolder.h.
bool org::xmlBlaster::util::ReferenceHolder< T >::operator> | ( | const ReferenceHolder< T > | other | ) | const |
Definition at line 117 of file ReferenceHolder.h.
References org::xmlBlaster::util::ReferenceHolder< T >::element_.