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))
106 #endif // IWORKSTYLESTACK_H_INCLUDED
Representation of a dynamic inheritance of styles.
Definition: IWORKStyleStack.h:34
void set(const IWORKStylePtr_t &style)
Definition: IWORKStyleStack.cpp:45
std::shared_ptr< IWORKStyle > IWORKStylePtr_t
Definition: IWORKStyle_fwd.h:21
Definition: IWORKPropertyMap.h:27
Definition: IWORKToken.h:421
Definition: IWORKPropertyInfo.h:21
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
bool has(const bool lookInParent=true) const
Definition: IWORKStyleStack.h:69
~IWORKStyleStack()
Definition: IWORKStyleStack.cpp:24
IWORKStyleStack()
Construct an empty context.
Definition: IWORKStyleStack.cpp:19