Public Member Functions | Protected Attributes | List of all members
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...
MWAWVariable & | operator= (MWAWVariable const &orig)
| copy operator More...
MWAWVariable & | operator= (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
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 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

## ◆ MWAWVariable() [1/3]

template<class T>

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

constructor

## ◆ MWAWVariable() [2/3]

template<class T>

MWAWVariable< T >::MWAWVariable | ( | T const & | def | ) |
| inline explicit

constructor with a default value

## ◆ MWAWVariable() [3/3]

template<class T>

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

copy constructor

## Member Function Documentation

## ◆ get()

template<class T>

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

return the current value

Referenced by MWAWFont::Line::addTo(), MWAWParagraph::addTo(), MWAWFont::addTo(), MWAWFont::addToListLevel(), MWAWFont::Line::cmp(), MsWrdStruct::Font::cmp(), MWAWFont::cmp(), MWAWFont::deltaLetterSpacing(), MWAWFont::deltaLetterSpacingUnit(), MWAWFont::flags(), MWAWFont::getBackgroundColor(), RagTime5StyleManager::getCellBackgroundColor(), RagTime5StyleManager::getCellBorder(), MWAWFont::getColor(), MWAWFont::getDebugString(), MsWrdStruct::Paragraph::getFont(), RagTime5StyleManager::getLineColor(), MWAWFont::hasColor(), MWAWFont::id(), MsWrdStruct::Font::insert(), MsWrdStruct::Table::insert(), MWAWFont::language(), MsWrdStruct::operator<<(), operator<<(), MsWrdText::prepareTableLimits(), MsWrdStruct::Paragraph::print(), MsWrd1Parser::readParagraph(), MacWrtParser::readParagraph(), ClarisDrawText::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(), RagTime5StyleManager::updateBorderStyle(), MsWrdStruct::Font::updateFontToFinalState(), RagTime5StyleManager::updateSurfaceStyle(), RagTime5StyleManager::updateTextStyles(), MoreTextInternal::Paragraph::updateToFinalState(), and MWAWFont::widthStreching().

## ◆ insert()

template<class T>

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

update the current value if orig is set

Referenced by MWAWFont::addTo(), MsWrdStruct::Font::insert(), MWAWParagraph::insert(), MWAWFont::insert(), and MsWrdStruct::Paragraph::insert().

## ◆ isSet()

template<class T>

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

return true if the variable is set

Referenced by MWAWFont::Line::addTo(), MWAWFont::addTo(), MWAWFont::addToListLevel(), MWAWFont::Line::cmp(), RagTime5StyleManager::getCellBackgroundColor(), RagTime5StyleManager::getCellBorder(), MWAWFont::getDebugString(), MsWrdStruct::Paragraph::getFont(), MsWrdTextStyles::getSectionFont(), MsWrdTextStyles::getSectionParagraph(), MWAWFont::hasColor(), MsWrdStruct::Font::insert(), RagTime5StyleManager::GraphicStyle::insert(), MWAWParagraph::insert(), MsWrdStruct::Table::insert(), MWAWFont::insert(), RagTime5StyleManager::TextStyle::insert(), MsWrdStruct::Paragraph::insert(), MWAWFont::isSet(), MsWrdStruct::operator<<(), operator<<(), MsWrdText::prepareFontProperties(), MsWrdText::prepareParagraphProperties(), MsWrdText::prepareTableLimits(), MsWrdStruct::Paragraph::print(), MsWrd1Parser::readParagraph(), MsWrdText::sendTable(), RagTime5StyleManager::updateBorderStyle(), MsWrdStruct::Font::updateFontToFinalState(), MsWrdStruct::Paragraph::updateParagraphToFinalState(), RagTime5StyleManager::updateSurfaceStyle(), and RagTime5StyleManager::updateTextStyles().

## ◆ operator*() [1/2]

template<class T>

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

operator*

## ◆ operator*() [2/2]

template<class T>

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

operator*

## ◆ operator->() [1/2]

template<class T>

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

operator*

## ◆ operator->() [2/2]

template<class T>

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

operator*

## ◆ operator=() [1/2]

template<class T>

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

copy operator

## ◆ operator=() [2/2]

template<class T>

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

set a value

## ◆ setSet()

template<class T>

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

define if the variable is set

Referenced by MWAWParagraph::MWAWParagraph().

## Member Data Documentation

## ◆ m_data

template<class T>

T MWAWVariable< T >::m_data
| protected

the value

Referenced by MWAWVariable< MsWrdStruct::Table >::insert(), and MWAWVariable< MsWrdStruct::Table >::operator=().

## ◆ m_set

template<class T>

bool MWAWVariable< T >::m_set
| protected

a flag to know if the variable is set or not

Referenced by MWAWVariable< MsWrdStruct::Table >::insert(), and MWAWVariable< MsWrdStruct::Table >::operator=().

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

- libmwaw_internal.hxx