Variable< T > Struct Template Reference

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

#include <libmwaw_internal.hxx>

List of all members.

Public Member Functions

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

Protected Attributes

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

Detailed Description

template<class T>
struct Variable< 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>
Variable< T >::Variable ( ) [inline]

constructor

template<class T>
Variable< T >::Variable ( def) [inline]

constructor with a default value

template<class T>
Variable< T >::Variable ( Variable< T > const &  orig) [inline]

copy constructor


Member Function Documentation

template<class T>
T const& Variable< T >::operator* ( ) const [inline]

operator*

template<class T>
T& Variable< T >::operator* ( ) [inline]

operator*

template<class T>
T const* Variable< T >::operator-> ( ) const [inline]

operator*

template<class T>
T* Variable< T >::operator-> ( ) [inline]

operator*

template<class T>
Variable& Variable< T >::operator= ( Variable< T > const &  orig) [inline]

copy operator

template<class T>
Variable& Variable< T >::operator= ( val) [inline]

set a value

template<class T>
void Variable< T >::setSet ( bool  newVal) [inline]

define if the variable is set

Referenced by MWAWParagraph::MWAWParagraph(), and MSWStruct::Paragraph::read().


Member Data Documentation


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