Anope IRC Services  Version 2.0
Public Member Functions | Protected Attributes
Serialize::Reference< T > Class Template Reference

#include <serialize.h>

Inheritance diagram for Serialize::Reference< T >:
Inheritance graph
[legend]
Collaboration diagram for Serialize::Reference< T >:
Collaboration graph
[legend]

Public Member Functions

 Reference ()
 
 Reference (T *obj)
 
 Reference (const Reference< T > &other)
 
 ~Reference ()
 
Reference< T > & operator= (const Reference< T > &other)
 
 operator bool () const
 
 operator T * () const
 
T * operator* () const
 
T * operator-> () const
 
- Public Member Functions inherited from ReferenceBase
 ReferenceBase ()
 
 ReferenceBase (const ReferenceBase &other)
 
virtual ~ReferenceBase ()
 
void Invalidate ()
 

Protected Attributes

T * ref
 
- Protected Attributes inherited from ReferenceBase
bool invalid
 

Detailed Description

template<typename T>
class Serialize::Reference< T >

Used to hold references to serializable objects. Reference should always be used when holding references to serializable objects for extended periods of time to ensure that the object it refers to it always up to date. This also behaves like Reference in that it will invalidate itself if the object it refers to is destructed.

Definition at line 47 of file serialize.h.

Constructor & Destructor Documentation

template<typename T>
Serialize::Reference< T >::Reference ( )
inline

Definition at line 251 of file serialize.h.

template<typename T>
Serialize::Reference< T >::Reference ( T *  obj)
inline

Definition at line 255 of file serialize.h.

template<typename T>
Serialize::Reference< T >::Reference ( const Reference< T > &  other)
inline

Definition at line 261 of file serialize.h.

template<typename T>
Serialize::Reference< T >::~Reference ( )
inline

Definition at line 267 of file serialize.h.

Member Function Documentation

template<typename T>
Serialize::Reference< T >::operator bool ( ) const
inline

Definition at line 289 of file serialize.h.

template<typename T>
Serialize::Reference< T >::operator T * ( ) const
inline

Definition at line 296 of file serialize.h.

References ReferenceBase::invalid, and Serialize::Reference< T >::ref.

template<typename T>
T* Serialize::Reference< T >::operator* ( ) const
inline

Definition at line 309 of file serialize.h.

template<typename T>
T* Serialize::Reference< T >::operator-> ( ) const
inline

Definition at line 322 of file serialize.h.

template<typename T>
Reference<T>& Serialize::Reference< T >::operator= ( const Reference< T > &  other)
inline

Definition at line 273 of file serialize.h.

Field Documentation

template<typename T>
T* Serialize::Reference< T >::ref
protected

The documentation for this class was generated from the following file: