10#ifndef IWORKSTYLESTACK_H_INCLUDED
11#define IWORKSTYLESTACK_H_INCLUDED
15#include <boost/any.hpp>
41 typedef std::deque<IWORKStylePtr_t>
Stack_t;
68 template<
class Property>
69 bool has(
const bool lookInParent =
true)
const
75 if ((*it)->getPropertyMap().has<Property>(lookInParent))
77 else if ((*it)->getPropertyMap().clears<Property>(lookInParent))
84 template<
class Property>
91 if ((*it)->getPropertyMap().has<Property>(lookInParent))
92 return (*it)->getPropertyMap().get<Property>(lookInParent);
93 else if ((*it)->getPropertyMap().clears<Property>(lookInParent))
Definition IWORKPropertyMap.h:27
void push()
Push a style onto the active styles stack.
Definition IWORKStyleStack.cpp:30
void pop()
Pop a style from the active styles stack.
Definition IWORKStyleStack.cpp:40
std::deque< IWORKStylePtr_t > Stack_t
The internal type of style stack.
Definition IWORKStyleStack.h:41
bool has(const bool lookInParent=true) const
Definition IWORKStyleStack.h:69
~IWORKStyleStack()
Definition IWORKStyleStack.cpp:24
const IWORKPropertyInfo< Property >::ValueType & get(const bool lookInParent=true) const
Definition IWORKStyleStack.h:85
Stack_t m_stack
Definition IWORKStyleStack.h:101
void set(const IWORKStylePtr_t &style)
Definition IWORKStyleStack.cpp:45
IWORKStyleStack()
Construct an empty context.
Definition IWORKStyleStack.cpp:19
@ style
Definition IWORKToken.h:421
Definition IWORKBezierElement.cpp:21
std::shared_ptr< IWORKStyle > IWORKStylePtr_t
Definition IWORKStyle_fwd.h:23
Definition IWORKPropertyInfo.h:22