The Battle for Wesnoth  1.13.4+dev
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
Public Types | Public Member Functions | Static Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
shared_object< T, node > Class Template Reference

#include <shared_object.hpp>

Public Types

typedef T type
 

Public Member Functions

 shared_object ()
 
 shared_object (const T &o)
 
 shared_object (const shared_object &o)
 
 operator const T & () const
 
shared_objectoperator= (const shared_object &o)
 
shared_objectoperator= (const T &o)
 Assignment from the template type is supported. More...
 
 ~shared_object ()
 
void set (const T &o)
 
const T & get () const
 
void swap (shared_object &o)
 
const node * ptr () const
 

Static Public Member Functions

static const node * insert_into_index (const node &)
 
static void erase_from_index (const node *)
 

Protected Member Functions

bool valid () const
 
void clear ()
 

Protected Attributes

const node * val_
 

Detailed Description

template<typename T, typename node = shared_node<T>>
class shared_object< T, node >

Definition at line 34 of file shared_object.hpp.

Member Typedef Documentation

template<typename T, typename node = shared_node<T>>
typedef T shared_object< T, node >::type

Definition at line 36 of file shared_object.hpp.

Constructor & Destructor Documentation

template<typename T, typename node = shared_node<T>>
shared_object< T, node >::shared_object ( )
inline

Definition at line 41 of file shared_object.hpp.

References shared_object< T, node >::set().

template<typename T, typename node = shared_node<T>>
shared_object< T, node >::shared_object ( const T &  o)
inlineexplicit

Definition at line 43 of file shared_object.hpp.

References shared_object< T, node >::set().

template<typename T, typename node = shared_node<T>>
shared_object< T, node >::shared_object ( const shared_object< T, node > &  o)
inline
template<typename T, typename node = shared_node<T>>
shared_object< T, node >::~shared_object ( )
inline

Definition at line 69 of file shared_object.hpp.

References shared_object< T, node >::clear().

Member Function Documentation

template<typename T, typename node = shared_node<T>>
void shared_object< T, node >::clear ( )
inlineprotected
template<typename T, typename node = shared_node<T>>
static void shared_object< T, node >::erase_from_index ( const node *  )
static
template<typename T, typename node = shared_node<T>>
const T& shared_object< T, node >::get ( ) const
inline

Definition at line 81 of file shared_object.hpp.

References shared_object< T, node >::val_, and shared_object< T, node >::valid().

Referenced by operator==().

template<typename T, typename node = shared_node<T>>
static const node* shared_object< T, node >::insert_into_index ( const node &  )
static
template<typename T, typename node = shared_node<T>>
shared_object< T, node >::operator const T & ( ) const
inline
template<typename T, typename node = shared_node<T>>
shared_object& shared_object< T, node >::operator= ( const shared_object< T, node > &  o)
inline
template<typename T, typename node = shared_node<T>>
shared_object& shared_object< T, node >::operator= ( const T &  o)
inline

Assignment from the template type is supported.

Definition at line 63 of file shared_object.hpp.

References shared_object< T, node >::swap().

template<typename T, typename node = shared_node<T>>
const node* shared_object< T, node >::ptr ( ) const
inline

Definition at line 90 of file shared_object.hpp.

References shared_object< T, node >::val_.

Referenced by operator==().

template<typename T, typename node = shared_node<T>>
void shared_object< T, node >::set ( const T &  o)
inline
template<typename T, typename node = shared_node<T>>
void shared_object< T, node >::swap ( shared_object< T, node > &  o)
inline

Definition at line 86 of file shared_object.hpp.

References swap(), and shared_object< T, node >::val_.

Referenced by shared_object< T, node >::operator=().

template<typename T, typename node = shared_node<T>>
bool shared_object< T, node >::valid ( ) const
inlineprotected

Member Data Documentation

template<typename T, typename node = shared_node<T>>
const node* shared_object< T, node >::val_
protected

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