Bayeux  3.4.1
Core Foundation library for SuperNEMO
Classes | Public Types | Public Member Functions | Friends | List of all members
datatools::smart_ref< T > Class Template Reference

A template class that stores a reference to an object and additional associated meta-data. More...

#include <bayeux/datatools/smart_ref.h>

Classes

class  has_flag
 Predicate used by the smart_ref template class. More...
 

Public Types

typedef T instance_type
 
typedef instance_typereference_type
 
typedef const instance_typeconst_reference_type
 
typedef instance_typepointer_type
 
typedef const instance_typeconst_pointer_type
 
typedef std::list< instance_typecol_type
 
typedef smart_ref< instance_typesmart_ref_type
 

Public Member Functions

 smart_ref ()
 Default constructor. More...
 
 smart_ref (const_reference_type obj)
 Constructor. More...
 
virtual ~smart_ref ()
 Destructor. More...
 
void set (const_reference_type obj)
 Set the internal reference to the target object. More...
 
const_reference_type get () const
 Return the reference to the target object. More...
 
const datatools::propertiesget_properties () const
 Return a non mutable reference to the container of properties. More...
 
datatools::propertiesgrab_properties ()
 Return a mutable reference to the container of properties. More...
 
datatools::propertiesget_properties ()
 
void set_properties (const datatools::properties &props)
 Set the container of properties. More...
 
void reset ()
 Reset the internal reference. More...
 
bool is_valid () const
 Check the validity of the smart reference. More...
 

Friends

class boost::serialization::access
 

Detailed Description

template<class T>
class datatools::smart_ref< T >

A template class that stores a reference to an object and additional associated meta-data.

Member Typedef Documentation

◆ col_type

template<class T >
typedef std::list<instance_type> datatools::smart_ref< T >::col_type

◆ const_pointer_type

template<class T >
typedef const instance_type* datatools::smart_ref< T >::const_pointer_type

◆ const_reference_type

template<class T >
typedef const instance_type& datatools::smart_ref< T >::const_reference_type

◆ instance_type

template<class T >
typedef T datatools::smart_ref< T >::instance_type

◆ pointer_type

template<class T >
typedef instance_type* datatools::smart_ref< T >::pointer_type

◆ reference_type

template<class T >
typedef instance_type& datatools::smart_ref< T >::reference_type

◆ smart_ref_type

template<class T >
typedef smart_ref<instance_type> datatools::smart_ref< T >::smart_ref_type

Constructor & Destructor Documentation

◆ smart_ref() [1/2]

template<class T >
datatools::smart_ref< T >::smart_ref ( )
inline

Default constructor.

◆ smart_ref() [2/2]

template<class T >
datatools::smart_ref< T >::smart_ref ( const_reference_type  obj)
inline

Constructor.

◆ ~smart_ref()

template<class T >
virtual datatools::smart_ref< T >::~smart_ref ( )
inlinevirtual

Destructor.

Member Function Documentation

◆ get()

template<class T >
const_reference_type datatools::smart_ref< T >::get ( ) const
inline

Return the reference to the target object.

◆ get_properties() [1/2]

template<class T >
const datatools::properties& datatools::smart_ref< T >::get_properties ( ) const
inline

Return a non mutable reference to the container of properties.

◆ get_properties() [2/2]

template<class T >
datatools::properties& datatools::smart_ref< T >::get_properties ( )
inline
Deprecated:
Return a mutable reference to the container of properties

◆ grab_properties()

template<class T >
datatools::properties& datatools::smart_ref< T >::grab_properties ( )
inline

Return a mutable reference to the container of properties.

◆ is_valid()

template<class T >
bool datatools::smart_ref< T >::is_valid ( ) const
inline

Check the validity of the smart reference.

◆ reset()

template<class T >
void datatools::smart_ref< T >::reset ( )
inline

Reset the internal reference.

◆ set()

template<class T >
void datatools::smart_ref< T >::set ( const_reference_type  obj)
inline

Set the internal reference to the target object.

◆ set_properties()

template<class T >
void datatools::smart_ref< T >::set_properties ( const datatools::properties props)
inline

Set the container of properties.

Friends And Related Function Documentation

◆ boost::serialization::access

template<class T >
friend class boost::serialization::access
friend

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