- Main Page
- Related Pages
- Namespaces
- Classes
- Files

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

Public Member Functions | Protected Member Functions | Private Attributes | List of all members
libetonyek::KEYStyleBase Class Referenceabstract

A common implementation of a style. More...

`#include <KEYStyles.h>`

Inheritance diagram for libetonyek::KEYStyleBase:

## Public Member Functions
virtual bool | link (const KEYStylesheetPtr_t &stylesheet)
| Find the parent style by its ID. More...
virtual void | flatten ()
| Copy attributes from parent style (recursively). More...
Public Member Functions inherited from libetonyek::KEYStyle
virtual | ~KEYStyle ()=0

## Protected Member Functions
| KEYStyleBase (const KEYPropertyMap &props, const boost::optional< std::string > &ident, const boost::optional< std::string > &parentIdent)
virtual | ~KEYStyleBase ()
virtual const KEYPropertyMap & | getPropertyMap () const
| Get the style's property map. More...
virtual KEYStylePtr_t | find (const KEYStylesheetPtr_t &stylesheet, const std::string &ident) const =0
boost::any | lookup (const char *property, const KEYStyleContext &context=KEYStyleContext()) const
| Look up a property in this style. More...

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

## Detailed Description

A common implementation of a style.

## Constructor & Destructor Documentation

libetonyek::KEYStyleBase::KEYStyleBase | ( | const KEYPropertyMap & | props,
|  | const boost::optional< std::string > & | ident,
|  | const boost::optional< std::string > & | parentIdent
| ) |  |
| protected

libetonyek::KEYStyleBase::~KEYStyleBase | ( |  | ) |
| protected virtual

## Member Function Documentation

virtual KEYStylePtr_t libetonyek::KEYStyleBase::find | ( | const KEYStylesheetPtr_t & | stylesheet,
|  | const std::string & | ident
| ) |  | const
| protected pure virtual

Implemented in libetonyek::KEYVectorStyle, libetonyek::KEYTabularStyle, libetonyek::KEYSlideStyle, libetonyek::KEYPlaceholderStyle, libetonyek::KEYParagraphStyle, libetonyek::KEYListStyle, libetonyek::KEYLayoutStyle, libetonyek::KEYGraphicStyle, libetonyek::KEYConnectionStyle, libetonyek::KEYCharacterStyle, and libetonyek::KEYCellStyle.

Referenced by link().

void libetonyek::KEYStyleBase::flatten | ( |  | ) |
| virtual

Copy attributes from parent style (recursively).

Todo:
  Will this have any effect on performance anyway?

Implements libetonyek::KEYStyle.

const KEYPropertyMap & libetonyek::KEYStyleBase::getPropertyMap | ( |  | ) | const
| protected virtual

Get the style's property map.

Implements libetonyek::KEYStyle.

Referenced by lookup().

bool libetonyek::KEYStyleBase::link | ( | const KEYStylesheetPtr_t & | stylesheet | ) |
| virtual

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.

Implements libetonyek::KEYStyle.

boost::any libetonyek::KEYStyleBase::lookup | ( | const char * | property,
|  | const KEYStyleContext & | context = `KEYStyleContext()`
| ) |  | const
| protected

Look up a property in this style.

- [in] property the property to look up
- [in] context the context for dynamic lookup
  Returns
    the found property or empty boost::any

Referenced by libetonyek::KEYParagraphStyle::getAlignment(), libetonyek::KEYCharacterStyle::getBold(), libetonyek::KEYCharacterStyle::getCapitalization(), libetonyek::KEYCharacterStyle::getFontColor(), libetonyek::KEYCharacterStyle::getFontName(), libetonyek::KEYCharacterStyle::getFontSize(), libetonyek::KEYPlaceholderStyle::getGeometry(), libetonyek::KEYCharacterStyle::getItalic(), libetonyek::KEYCharacterStyle::getOutline(), libetonyek::KEYCharacterStyle::getStrikethru(), libetonyek::KEYParagraphStyle::getTabs(), and libetonyek::KEYCharacterStyle::getUnderline().

## Member Data Documentation

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

Referenced by link().

KEYStylePtr_t libetonyek::KEYStyleBase::m_parent
| private

Referenced by link().

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

Referenced by link().

KEYPropertyMap libetonyek::KEYStyleBase::m_props
| private

Referenced by getPropertyMap(), and link().

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

- KEYStyles.h
- KEYStyles.cpp