Variable< 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
Variable< 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
| Variable ()
| constructor More...
| Variable (T const &def)
| constructor with a default value More...
| Variable (Variable const &orig)
| copy constructor More...
Variable & | operator= (Variable const &orig)
| copy operator More...
Variable & | operator= (T const &val)
| set a value More...
void | insert (Variable 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 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 | ( | T const & | 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 >::get | ( |  | ) | const
| inline

return the current value

Referenced by MWAWFont::Line::addTo(), MWAWParagraph::addTo(), MWAWFont::addTo(), MsWrdStruct::Font::cmp(), MWAWFont::Line::cmp(), MWAWFont::cmp(), MWAWFont::deltaLetterSpacing(), MWAWFont::flags(), MWAWFont::getBackgroundColor(), MWAWFont::getColor(), MWAWFont::getDebugString(), MWAWFont::hasColor(), MWAWFont::id(), MsWrdStruct::Font::insert(), MsWrdStruct::Table::insert(), MsWrdStruct::Paragraph::insert(), MsWrdStruct::Paragraph::inTable(), MWAWFont::language(), MsWrdStruct::operator<<(), operator<<(), MsWrdText::prepareTableLimits(), MsWrdStruct::Paragraph::read(), MsWrd1Parser::readParagraph(), MacWrtParser::readParagraph(), HanMacWrdJText::readParagraph(), HanMacWrdKText::readParagraph(), MsWks3Text::readParagraph(), WriteNowText::readParagraph(), ClarisWksText::readParagraph(), NisusWrtText::readParagraphs(), LightWayTxtText::readRulers(), MsWrdTextStyles::readSection(), MsWrdTextStyles::readStylesFont(), MsWrdText::sendTable(), MsWrdText::sendText(), NisusWrtText::setProperty(), MsWrdTextStyles::setProperty(), MWAWFont::size(), MWAWFont::texteWidthScaling(), MsWrdStruct::Font::updateFontToFinalState(), ClarisWksTextInternal::Paragraph::updateListLevel(), and MoreTextInternal::Paragraph::updateToFinalState().

template<class T>

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

update the current value if orig is set

Referenced by MWAWFont::addTo(), MsWrdStruct::Font::insert(), MsWrdStruct::Section::insert(), MWAWParagraph::insert(), MsWrdStruct::Table::insert(), MsWrdStruct::Table::Cell::insert(), MWAWFont::insert(), MsWrdStruct::ParagraphInfo::insert(), and MsWrdStruct::Paragraph::insert().

template<class T>

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

return true if the variable is set

Referenced by MWAWFont::Line::addTo(), MWAWFont::addTo(), MWAWFont::Line::cmp(), MWAWFont::getDebugString(), MsWrdTextStyles::getSectionFont(), MsWrdTextStyles::getSectionParagraph(), MWAWFont::hasColor(), MsWrdStruct::Font::insert(), MWAWParagraph::insert(), MsWrdStruct::Table::insert(), MWAWFont::insert(), MsWrdStruct::Paragraph::insert(), MWAWFont::isSet(), MsWrdStruct::operator<<(), operator<<(), MsWrdText::prepareFontProperties(), MsWrdText::prepareParagraphProperties(), MsWrdText::prepareTableLimits(), MsWrd1Parser::readParagraph(), MsWrdText::sendTable(), MsWrdStruct::Font::updateFontToFinalState(), and MsWrdStruct::Paragraph::updateParagraphToFinalState().

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= | ( | T const & | 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().

## Member Data Documentation

template<class T>

T Variable< T >::m_data
| protected

the value

Referenced by Variable< MsWrdStruct::Table >::get(), Variable< MsWrdStruct::Table >::insert(), Variable< MsWrdStruct::Table >::operator*(), Variable< MsWrdStruct::Table >::operator->(), and Variable< MsWrdStruct::Table >::operator=().

template<class T>

bool Variable< T >::m_set
| protected

a flag to know if the variable is set or not

Referenced by Variable< MsWrdStruct::Table >::insert(), Variable< MsWrdStruct::Table >::isSet(), Variable< MsWrdStruct::Table >::operator*(), Variable< MsWrdStruct::Table >::operator->(), Variable< MsWrdStruct::Table >::operator=(), and Variable< MsWrdStruct::Table >::setSet().

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

- libmwaw_internal.hxx