Public Member Functions | Private Attributes | List of all members
msp::Value< T > Class Template Reference

#include <Value.hpp>

Public Member Functions

 operator T () const
 cast to the internal type More...
 
 operator T & ()
 cast to the writable refernce of internal type More...
 
T & operator() ()
 Gets a reference to the internal data. More...
 
operator() () const
 Gets a copy of the data. More...
 
Value< T > & operator= (const Value< T > &rhs)=default
 Copy assignment operator. More...
 
Value< T > & operator= (const T rhs)
 Assignment operator for non-Value objects. More...
 
bool set () const
 Queries if the data has been set. More...
 
bool & set ()
 Gets a reference to the data valid flag. More...
 

Private Attributes

std::pair< T, bool > data
 

Detailed Description

template<class T>
class msp::Value< T >

Definition at line 9 of file Value.hpp.

Member Function Documentation

template<class T>
msp::Value< T >::operator T ( ) const
inline

cast to the internal type

Definition at line 20 of file Value.hpp.

template<class T>
msp::Value< T >::operator T & ( )
inline

cast to the writable refernce of internal type

Definition at line 25 of file Value.hpp.

template<class T>
T& msp::Value< T >::operator() ( )
inline

Gets a reference to the internal data.

Returns
Reference to the data

Definition at line 41 of file Value.hpp.

template<class T>
T msp::Value< T >::operator() ( ) const
inline

Gets a copy of the data.

Returns

Definition at line 47 of file Value.hpp.

template<class T>
Value<T>& msp::Value< T >::operator= ( const Value< T > &  rhs)
default

Copy assignment operator.

Returns
Reference to this object
template<class T>
Value<T>& msp::Value< T >::operator= ( const T  rhs)
inline

Assignment operator for non-Value objects.

Returns
Reference to this object

Definition at line 31 of file Value.hpp.

template<class T>
bool msp::Value< T >::set ( ) const
inline

Queries if the data has been set.

Returns
True if the internal data has been assigned

Definition at line 53 of file Value.hpp.

template<class T>
bool& msp::Value< T >::set ( )
inline

Gets a reference to the data valid flag.

Returns
Reference to the data valid flag

Definition at line 59 of file Value.hpp.

Member Data Documentation

template<class T>
std::pair<T, bool> msp::Value< T >::data
private

Definition at line 62 of file Value.hpp.


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


msp
Author(s): Christian Rauch
autogenerated on Tue Oct 6 2020 03:39:02