libetonyek::KEYStyleBase Class Referenceabstract

A common implementation of a style. More...

#include <KEYStyles.h>

Inheritance diagram for libetonyek::KEYStyleBase:
libetonyek::KEYStyle libetonyek::KEYCellStyle libetonyek::KEYCharacterStyle libetonyek::KEYConnectionStyle libetonyek::KEYGraphicStyle libetonyek::KEYLayoutStyle libetonyek::KEYListStyle libetonyek::KEYPlaceholderStyle libetonyek::KEYSlideStyle libetonyek::KEYTabularStyle libetonyek::KEYVectorStyle

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 KEYPropertyMapgetPropertyMap () 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

◆ KEYStyleBase()

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

◆ ~KEYStyleBase()

libetonyek::KEYStyleBase::~KEYStyleBase ( )
protectedvirtual

Member Function Documentation

◆ find()

◆ flatten()

void libetonyek::KEYStyleBase::flatten ( )
virtual

Copy attributes from parent style (recursively).

Todo:
Will this have any effect on performance anyway?

Implements libetonyek::KEYStyle.

◆ getPropertyMap()

const KEYPropertyMap & libetonyek::KEYStyleBase::getPropertyMap ( ) const
protectedvirtual

Get the style's property map.

Implements libetonyek::KEYStyle.

Referenced by lookup().

◆ link()

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.

◆ lookup()

Member Data Documentation

◆ m_ident

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

Referenced by link().

◆ m_parent

KEYStylePtr_t libetonyek::KEYStyleBase::m_parent
private

Referenced by link().

◆ m_parentIdent

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

Referenced by link().

◆ m_props

KEYPropertyMap libetonyek::KEYStyleBase::m_props
private

Referenced by getPropertyMap(), and link().


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

Generated for libetonyek by doxygen 1.8.13