10 #ifndef IWORKXMLCONTEXTBASE_H_INCLUDED
11 #define IWORKXMLCONTEXTBASE_H_INCLUDED
13 #include <boost/enable_shared_from_this.hpp>
14 #include <boost/optional.hpp>
22 class IWORKXMLParserState;
26 template<
class Base,
class State,
class Collector = IWORKCollector>
56 return m_state.getTokenizer().getId(value);
61 return m_state.m_enableCollector;
84 virtual void text(
const char *value);
86 const boost::optional<ID_t> &
getId()
const;
89 boost::optional<ID_t>
m_id;
113 virtual void text(
const char *value);
115 const boost::optional<ID_t> &
getId()
const;
116 const boost::optional<ID_t> &
getRef()
const;
130 #endif // IWORKXMLCONTEXTBASE_H_INCLUDED
Definition: IWORKBezierElement.cpp:18
IWORKXMLContextMixed(IWORKXMLParserState &)
Definition: IWORKXMLContextBase.cpp:67
IWORKXMLContextBase< IWORKXMLContextEmpty, IWORKXMLParserState > IWORKXMLEmptyContextBase
Definition: IWORKXMLContextBase.h:126
const boost::optional< ID_t > & getId() const
Definition: IWORKXMLContextBase.cpp:101
const boost::optional< ID_t > & getRef() const
Definition: IWORKXMLContextBase.cpp:106
virtual void attribute(int name, const char *value)
Process an attribute.
Definition: IWORKXMLContextBase.cpp:40
IWORKXMLContextMinimal()
Definition: IWORKXMLContextBase.cpp:19
Definition: IWORKXMLContextBase.h:106
virtual IWORKXMLContextPtr_t element(int token)
Create a context for parsing a child element.
Definition: IWORKXMLContextBase.cpp:61
IWORKXMLContextEmpty(IWORKXMLParserState &)
Definition: IWORKXMLContextBase.cpp:72
IWORKXMLContextElement(IWORKXMLParserState &)
Definition: IWORKXMLContextBase.cpp:35
bool isCollector() const
Definition: IWORKXMLContextBase.h:59
Definition: IWORKXMLContextBase.h:78
Definition: IWORKToken.h:213
Definition: IWORKXMLContextBase.h:92
Definition: IWORKXMLContext.h:22
virtual void endOfAttributes()
Definition: IWORKXMLContextBase.cpp:27
IWORKXMLContextText(IWORKXMLParserState &)
Definition: IWORKXMLContextBase.cpp:56
boost::optional< ID_t > m_id
Definition: IWORKXMLContextBase.h:89
boost::shared_ptr< IWORKXMLContext > IWORKXMLContextPtr_t
Definition: IWORKXMLContext.h:18
IWORKXMLContextBase< IWORKXMLContextMixed, IWORKXMLParserState > IWORKXMLMixedContextBase
Definition: IWORKXMLContextBase.h:125
State & getState()
Definition: IWORKXMLContextBase.h:43
IWORKXMLContextBase(State &state)
Definition: IWORKXMLContextBase.h:30
Collector & getCollector() const
Definition: IWORKXMLContextBase.h:49
Definition: IWORKXMLContextBase.h:100
virtual void attribute(int name, const char *value)
Process an attribute.
Definition: IWORKXMLContextBase.cpp:77
IWORKXMLContextBase< IWORKXMLContextElement, IWORKXMLParserState > IWORKXMLElementContextBase
Definition: IWORKXMLContextBase.h:123
const char * name
Definition: IWORKToken.cpp:43
IWORKXMLContextBase< IWORKXMLContextText, IWORKXMLParserState > IWORKXMLTextContextBase
Definition: IWORKXMLContextBase.h:124
virtual void startOfElement()
Signalize the start of an element.
Definition: IWORKXMLContextBase.cpp:23
const boost::optional< ID_t > & getId() const
Definition: IWORKXMLContextBase.cpp:51
IWORKXMLContextBase(State &state, const T &a)
Definition: IWORKXMLContextBase.h:37
Definition: IWORKXMLContextBase.h:68
virtual void text(const char *value)
Process textual content of an element.
Definition: IWORKXMLContextBase.cpp:96
Definition: IWORKXMLContextBase.h:27
Definition: IWORKXMLParserState.h:26
virtual void text(const char *value)
Process textual content of an element.
Definition: IWORKXMLContextBase.cpp:46
boost::optional< ID_t > m_id
Definition: IWORKXMLContextBase.h:119
boost::optional< ID_t > m_ref
Definition: IWORKXMLContextBase.h:120
int getToken(const char *const value) const
Definition: IWORKXMLContextBase.h:54
virtual void endOfElement()
Signalize the end of an element.
Definition: IWORKXMLContextBase.cpp:31
virtual IWORKXMLContextPtr_t element(int token)
Create a context for parsing a child element.
Definition: IWORKXMLContextBase.cpp:90
State & m_state
Definition: IWORKXMLContextBase.h:65