libetonyek::IWORKStyle Class Reference

Represents a hierarchical style. More...

#include <IWORKStyle.h>

List of all members.

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.
void flatten ()
 Copy attributes from parent style (recursively).
const IWORKPropertyMapgetPropertyMap () const
 Get the style's property map.
template<class Property >
bool has () const
 Check for the presence of a property.
template<class Property >
const IWORKPropertyInfo
< Property >::ValueType & 
get () const
 Retrieve the value of a property.
const boost::optional
< std::string > & 
getIdent () 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

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

Member Function Documentation

Copy attributes from parent style (recursively).

Todo:
Will this have any effect on performance anyway?
template<class Property >
const IWORKPropertyInfo<Property>::ValueType& libetonyek::IWORKStyle::get ( ) const [inline]

Retrieve the value of a property.

Returns:
the found value
const boost::optional< std::string > & libetonyek::IWORKStyle::getIdent ( ) const

Get the style's property map.

template<class Property >
bool libetonyek::IWORKStyle::has ( ) const [inline]

Check for the presence of a property.

Returns:
true if the property is present
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().


Member Data Documentation

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

Referenced by getIdent(), and link().

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

Referenced by link().


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