mpqc::utility::Timestampable< T > Class Template Reference

Documentation

template<typename T>
class mpqc::utility::Timestampable< T >

Timestampable<T> is a proxy to T that keeps the timestamp of the last modification. Stores T on heap to support the default_initialized state.

Public Types

using timestamp_type = TimestampFactory::timestamp_type
 

Public Member Functions

 Timestampable ()
 
 Timestampable (T &&val)
 
 Timestampable (std::shared_ptr< T > val)
 
 Timestampable (const Timestampable &other)
 copy ctor keeps the timestamp, deep copies value More...
 
Timestampableoperator= (const T &val)
 
Timestampableoperator= (std::shared_ptr< T > val)
 
 operator T& ()
 retrieve a (non-const) reference value_ updates the timestamp More...
 
 operator const T & () const
 retrieve a const reference value_ More...
 
 operator std::shared_ptr< T > ()
 retrieve a shared pointer, updates the timestamp More...
 
 operator std::shared_ptr< const T > () const
 retrieve a const shared pointer More...
 
const timestamp_typetimestamp () const
 
std::shared_ptr< const T > value () const
 

Member Typedef Documentation

◆ timestamp_type

Constructor & Destructor Documentation

◆ Timestampable() [1/4]

template<typename T >
mpqc::utility::Timestampable< T >::Timestampable ( )
inline

◆ Timestampable() [2/4]

template<typename T >
mpqc::utility::Timestampable< T >::Timestampable ( T &&  val)
inlineexplicit

◆ Timestampable() [3/4]

template<typename T >
mpqc::utility::Timestampable< T >::Timestampable ( std::shared_ptr< T >  val)
inlineexplicit

◆ Timestampable() [4/4]

template<typename T >
mpqc::utility::Timestampable< T >::Timestampable ( const Timestampable< T > &  other)
inline

copy ctor keeps the timestamp, deep copies value

Member Function Documentation

◆ operator const T &()

template<typename T >
mpqc::utility::Timestampable< T >::operator const T & ( ) const
inline

retrieve a const reference value_

◆ operator std::shared_ptr< const T >()

template<typename T >
mpqc::utility::Timestampable< T >::operator std::shared_ptr< const T > ( ) const
inline

retrieve a const shared pointer

◆ operator std::shared_ptr< T >()

template<typename T >
mpqc::utility::Timestampable< T >::operator std::shared_ptr< T > ( )
inline

retrieve a shared pointer, updates the timestamp

◆ operator T&()

template<typename T >
mpqc::utility::Timestampable< T >::operator T& ( )
inline

retrieve a (non-const) reference value_ updates the timestamp

◆ operator=() [1/2]

template<typename T >
Timestampable& mpqc::utility::Timestampable< T >::operator= ( const T &  val)
inline

◆ operator=() [2/2]

template<typename T >
Timestampable& mpqc::utility::Timestampable< T >::operator= ( std::shared_ptr< T >  val)
inline

◆ timestamp()

template<typename T >
const timestamp_type& mpqc::utility::Timestampable< T >::timestamp ( ) const
inline
Returns
the current timestamp

◆ value()

template<typename T >
std::shared_ptr<const T> mpqc::utility::Timestampable< T >::value ( ) const
inline
Returns
the current value

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