STOFFVariable< T > Struct Template Reference documentation

- Main Page
- Namespaces
- Classes
- Files

- Class List
- Class Index
- Class Hierarchy
- Class Members

Public Member Functions | Protected Attributes | List of all members
STOFFVariable< T > Struct Template Reference

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

`#include <libstaroffice_internal.hxx>`

## Public Member Functions
| STOFFVariable ()
| constructor More...
| STOFFVariable (T const &def)
| constructor with a default value More...
| STOFFVariable (STOFFVariable const &orig)
| copy constructor More...
STOFFVariable & | operator= (STOFFVariable const &orig)
| copy operator More...
STOFFVariable & | operator= (T const &val)
| set a value More...
void | insert (STOFFVariable 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
T | 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 STOFFVariable< 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 >

STOFFVariable< T >::STOFFVariable | ( |  | ) |
| inline

constructor

template<class T >

STOFFVariable< T >::STOFFVariable | ( | T const & | def | ) |
| inlineexplicit

constructor with a default value

template<class T >

STOFFVariable< T >::STOFFVariable | ( | STOFFVariable< T > const & | orig | ) |
| inline

copy constructor

## Member Function Documentation

template<class T >

T const& STOFFVariable< T >::get | ( |  | ) | const
| inline

return the current value

template<class T >

void STOFFVariable< T >::insert | ( | STOFFVariable< T > const & | orig | ) |
| inline

update the current value if orig is set

template<class T >

bool STOFFVariable< T >::isSet | ( |  | ) | const
| inline

return true if the variable is set

template<class T >

T const& STOFFVariable< T >::operator* | ( |  | ) | const
| inline

operator*

template<class T >

T& STOFFVariable< T >::operator* | ( |  | ) |
| inline

operator*

template<class T >

T const* STOFFVariable< T >::operator-> | ( |  | ) | const
| inline

operator*

template<class T >

T* STOFFVariable< T >::operator-> | ( |  | ) |
| inline

operator*

template<class T >

STOFFVariable& STOFFVariable< T >::operator= | ( | STOFFVariable< T > const & | orig | ) |
| inline

copy operator

template<class T >

STOFFVariable& STOFFVariable< T >::operator= | ( | T const & | val | ) |
| inline

set a value

template<class T >

void STOFFVariable< T >::setSet | ( | bool | newVal | ) |
| inline

define if the variable is set

## Member Data Documentation

template<class T >

T STOFFVariable< T >::m_data
| protected

the value

Referenced by STOFFVariable< T >::insert(), and STOFFVariable< T >::operator=().

template<class T >

bool STOFFVariable< T >::m_set
| protected

a flag to know if the variable is set or not

Referenced by STOFFVariable< T >::insert(), and STOFFVariable< T >::operator=().

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

- libstaroffice_internal.hxx