MWAWVariable< T > Struct Template Reference

a generic variable template: value + flag to know if the variable is set More...

#include <libmwaw_internal.hxx>

Public Member Functions

 MWAWVariable ()
 constructor More...
 
 MWAWVariable (T const &def)
 constructor with a default value More...
 
 MWAWVariable (MWAWVariable const &orig)
 copy constructor More...
 
MWAWVariableoperator= (MWAWVariable const &orig)
 copy operator More...
 
MWAWVariableoperator= (T const &val)
 set a value More...
 
void insert (MWAWVariable const &orig)
 update the current value if orig is set More...
 
T const * operator-> () const
 operator* More...
 
T * operator-> ()
 operator* More...
 
T const & operator* () const
 operator* More...
 
T & operator* ()
 operator* More...
 
T const & get () const
 return the current value More...
 
bool isSet () const
 return true if the variable is set More...
 
void setSet (bool newVal)
 define if the variable is set More...
 

Protected Attributes

m_data
 the value More...
 
bool m_set
 a flag to know if the variable is set or not More...
 

Detailed Description

template<class T>
struct MWAWVariable< T >

a generic variable template: value + flag to know if the variable is set

Note
the variable is considered set as soon a new value is set or when its content is acceded by a function which returns a not-const reference... You can use the function setSet to unset it.

Constructor & Destructor Documentation

template<class T>
MWAWVariable< T >::MWAWVariable ( )
inline

constructor

template<class T>
MWAWVariable< T >::MWAWVariable ( T const &  def)
inline

constructor with a default value

template<class T>
MWAWVariable< T >::MWAWVariable ( MWAWVariable< T > const &  orig)
inline

copy constructor

Member Function Documentation

template<class T>
T const& MWAWVariable< T >::operator* ( ) const
inline

operator*

template<class T>
T& MWAWVariable< T >::operator* ( )
inline

operator*

template<class T>
T const* MWAWVariable< T >::operator-> ( ) const
inline

operator*

template<class T>
T* MWAWVariable< T >::operator-> ( )
inline

operator*

template<class T>
MWAWVariable& MWAWVariable< T >::operator= ( MWAWVariable< T > const &  orig)
inline

copy operator

template<class T>
MWAWVariable& MWAWVariable< T >::operator= ( T const &  val)
inline

set a value

template<class T>
void MWAWVariable< T >::setSet ( bool  newVal)
inline

define if the variable is set

Referenced by MWAWParagraph::MWAWParagraph().

Member Data Documentation


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

Generated on Thu Jul 9 2015 20:26:39 for libmwaw by doxygen 1.8.8