10#ifndef IWORKSTYLE_H_INCLUDED
11#define IWORKSTYLE_H_INCLUDED
15#include <boost/any.hpp>
16#include <boost/optional.hpp>
59 template<
class Property>
62 return m_props.has<Property>(
true);
69 template<
class Property>
72 return m_props.get<Property>(
true);
75 const boost::optional<std::string> &
getIdent()
const;
89 const boost::optional<std::string>
m_ident;
Represents a (hierarchical) property map.
Definition IWORKPropertyMap.h:25
Representation of a dynamic inheritance of styles.
Definition IWORKStyleStack.h:35
IWORKStylePtr_t m_parent
Definition IWORKStyle.h:91
const boost::optional< std::string > & getIdent() const
Definition IWORKStyle.cpp:77
const boost::optional< std::string > m_ident
Definition IWORKStyle.h:89
void flatten()
Copy attributes from parent style (recursively).
Definition IWORKStyle.cpp:62
const IWORKStylePtr_t getParent() const
Definition IWORKStyle.cpp:87
void setParent(const IWORKStylePtr_t parent)
Definition IWORKStyle.cpp:92
const boost::optional< std::string > & getParentIdent() const
Definition IWORKStyle.cpp:82
const boost::optional< std::string > m_parentIdent
Definition IWORKStyle.h:90
bool has() const
Check for the presence of a property.
Definition IWORKStyle.h:60
IWORKPropertyMap m_props
Definition IWORKStyle.h:87
const IWORKPropertyMap & getPropertyMap() const
Get the style's property map.
Definition IWORKStyle.cpp:67
void createListLevelStyles()
Creates the list level properties of a list style if it does not exists.
Definition IWORKStyle.cpp:99
const IWORKPropertyInfo< Property >::ValueType & get() const
Retrieve the value of a property.
Definition IWORKStyle.h:70
IWORKStyle(const IWORKPropertyMap &props, const boost::optional< std::string > &ident, const boost::optional< std::string > &parentIdent)
Definition IWORKStyle.cpp:20
@ ident
Definition IWORKToken.h:566
@ stylesheet
Definition IWORKToken.h:424
@ link
Definition IWORKToken.h:308
Definition IWORKBezierElement.cpp:21
std::shared_ptr< IWORKStylesheet > IWORKStylesheetPtr_t
Definition IWORKStylesheet.h:20
std::shared_ptr< IWORKStyle > IWORKStylePtr_t
Definition IWORKStyle_fwd.h:23
Definition IWORKPropertyInfo.h:22