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::KEYParagraphStyle 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

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

Member Function Documentation

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
protectedvirtual

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::KEYPlaceholderStyle::getGeometry().

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:

Generated for libetonyek by doxygen 1.8.5