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 71 for (Stack_t::const_iterator it =
m_stack.begin();
m_stack.end() != it; ++it)
75 if ((*it)->getPropertyMap().has<Property>(lookInParent))
77 else if ((*it)->getPropertyMap().clears<Property>(lookInParent))
84 template<
class Property>
87 for (Stack_t::const_iterator it =
m_stack.begin();
m_stack.end() != it; ++it)
91 if ((*it)->getPropertyMap().has<Property>(lookInParent))
92 return (*it)->getPropertyMap().get<Property>(lookInParent);
93 else if ((*it)->getPropertyMap().clears<Property>(lookInParent))
106 #endif // IWORKSTYLESTACK_H_INCLUDED Definition: IWORKBezierElement.cpp:18
Representation of a dynamic inheritance of styles.
Definition: IWORKStyleStack.h:34
std::shared_ptr< IWORKStyle > IWORKStylePtr_t
Definition: IWORKStyle_fwd.h:21
Definition: IWORKPropertyMap.h:27
Definition: IWORKToken.h:268
Definition: IWORKPropertyInfo.h:21
bool has(const bool lookInParent=true) const
Definition: IWORKStyleStack.h:69
void pop()
Pop a style from the active styles stack.
Definition: IWORKStyleStack.cpp:40
Stack_t m_stack
Definition: IWORKStyleStack.h:101
std::deque< IWORKStylePtr_t > Stack_t
The internal type of style stack.
Definition: IWORKStyleStack.h:41
void push()
Push a style onto the active styles stack.
Definition: IWORKStyleStack.cpp:30
~IWORKStyleStack()
Definition: IWORKStyleStack.cpp:24
IWORKStyleStack()
Construct an empty context.
Definition: IWORKStyleStack.cpp:19