libetonyek::IWORKStyle Class Reference documentation

Public Member Functions | Protected Member Functions | Private Attributes | List of all members
libetonyek::IWORKStyle Class Reference

Represents a hierarchical style. More...

`#include <IWORKStyle.h>`

## Public Member Functions
| IWORKStyle (const IWORKPropertyMap &props, const boost::optional< std::string > &ident, const boost::optional< std::string > &parentIdent)
| IWORKStyle (const IWORKPropertyMap &props, const boost::optional< std::string > &ident, const IWORKStylePtr_t &parent)
bool | link (const IWORKStylesheetPtr_t &stylesheet)
| Find the parent style by its ID. More...
void | flatten ()
| Copy attributes from parent style (recursively). More...
const IWORKPropertyMap & | getPropertyMap () const
| Get the style's property map. More...
IWORKPropertyMap & | getPropertyMap ()
| Get the style's property map. More...
template<class Property >
bool | has () const
| Check for the presence of a property. More...
template<class Property >
const IWORKPropertyInfo< Property >::ValueType & | get () const
| Retrieve the value of a property. More...
const boost::optional< std::string > & | getIdent () const
void | setParent (const IWORKStylePtr_t parent)
void | createListLevelStyles ()
| Creates the list level properties of a list style if it does not exists. More...

## Protected Member Functions
const boost::optional< std::string > & | getParentIdent () const
const IWORKStylePtr_t | getParent () const

## Private Attributes
IWORKPropertyMap | m_props
const boost::optional< std::string > | m_ident
const boost::optional< std::string > | m_parentIdent
IWORKStylePtr_t | m_parent

## Detailed Description

Represents a hierarchical style.

## Constructor & Destructor Documentation

## ◆ IWORKStyle() [1/2]

libetonyek::IWORKStyle::IWORKStyle | ( | const IWORKPropertyMap & | props,
|  | const boost::optional< std::string > & | ident,
|  | const boost::optional< std::string > & | parentIdent
| ) |  |

## ◆ IWORKStyle() [2/2]

libetonyek::IWORKStyle::IWORKStyle | ( | const IWORKPropertyMap & | props,
|  | const boost::optional< std::string > & | ident,
|  | const IWORKStylePtr_t & | parent
| ) |  |

## Member Function Documentation

## ◆ createListLevelStyles()

void libetonyek::IWORKStyle::createListLevelStyles | ( |  | ) |

Creates the list level properties of a list style if it does not exists.

## ◆ flatten()

void libetonyek::IWORKStyle::flatten | ( |  | ) |

Copy attributes from parent style (recursively).

Todo:
  Will this have any effect on performance anyway?

## ◆ get()

template<class Property >

const IWORKPropertyInfo< Property >::ValueType & libetonyek::IWORKStyle::get | ( |  | ) | const
| inline

Retrieve the value of a property.

Returns
  the found value

## ◆ getIdent()

const boost::optional< std::string > & libetonyek::IWORKStyle::getIdent | ( |  | ) | const

## ◆ getParent()

const IWORKStylePtr_t libetonyek::IWORKStyle::getParent | ( |  | ) | const
| protected

## ◆ getParentIdent()

const boost::optional< std::string > & libetonyek::IWORKStyle::getParentIdent | ( |  | ) | const
| protected

## ◆ getPropertyMap() [1/2]

IWORKPropertyMap & libetonyek::IWORKStyle::getPropertyMap | ( |  | ) |

Get the style's property map.

## ◆ getPropertyMap() [2/2]

const IWORKPropertyMap & libetonyek::IWORKStyle::getPropertyMap | ( |  | ) | const

Get the style's property map.

## ◆ has()

template<class Property >

bool libetonyek::IWORKStyle::has | ( |  | ) | const
| inline

Check for the presence of a property.

Returns
  true if the property is present

## ◆ link()

bool libetonyek::IWORKStyle::link | ( | const IWORKStylesheetPtr_t & | stylesheet | ) |

Find the parent style by its ID.

- [in] stylesheet the stylesheet to use for looking for parent.
  Returns
    `true` if the parent style has been found, `false` otherwise.

Referenced by libetonyek::IWORKCollector::collectStylesheet().

## ◆ setParent()

void libetonyek::IWORKStyle::setParent | ( | const IWORKStylePtr_t | parent | ) |

## Member Data Documentation

## ◆ m_ident

const boost::optional<std::string> libetonyek::IWORKStyle::m_ident
| private

Referenced by getIdent(), and link().

## ◆ m_parent

IWORKStylePtr_t libetonyek::IWORKStyle::m_parent
| private

Referenced by getParent(), IWORKStyle(), link(), and setParent().

## ◆ m_parentIdent

const boost::optional<std::string> libetonyek::IWORKStyle::m_parentIdent
| private

Referenced by getParentIdent(), and link().

## ◆ m_props

IWORKPropertyMap libetonyek::IWORKStyle::m_props
| private

Referenced by createListLevelStyles(), get(), getPropertyMap(), has(), IWORKStyle(), link(), and setParent().

The documentation for this class was generated from the following files:

- IWORKStyle.h
- IWORKStyle.cpp