- Main Page
- Related Pages
- Namespaces
- Classes
- Files

- File List
- File Members

IWORKDiscardContext.h
Go to the documentation of this file.
1 /* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
2 /*
3 * This file is part of the libetonyek project.
4 *
5 * This Source Code Form is subject to the terms of the Mozilla Public
6 * License, v. 2.0. If a copy of the MPL was not distributed with this
7 * file, You can obtain one at http://mozilla.org/MPL/2.0/.
8 */
9
10 #ifndef IWORKDISCARDCONTEXT_H_INCLUDED
11 #define IWORKDISCARDCONTEXT_H_INCLUDED
12
13 #include <boost/enable_shared_from_this.hpp>
14 #include <boost/shared_ptr.hpp>
15
16 #include "IWORKXMLContext.h"
17
18 namespace libetonyek
19 {
20
21 class IWORKXMLParserState;
22
23 class IWORKDiscardContext : public IWORKXMLContext, public boost::enable_shared_from_this<IWORKDiscardContext>
24 {
25 struct Data;
26
27 public:
28 explicit IWORKDiscardContext(IWORKXMLParserState &state);
29
30 protected:
31 virtual void startOfElement();
32 virtual void attribute(int name, const char *value);
33 virtual IWORKXMLContextPtr_t element(int name);
34 virtual void text(const char *value);
35 virtual void endOfElement();
36
37 private:
38 IWORKXMLParserState &m_state;
39 unsigned m_level;
40 bool m_enableCollector;
41 boost::shared_ptr<Data> m_data;
42 };
43
44 }
45
46 #endif // IWORKDISCARDCONTEXT_H_INCLUDED
47
48 /* vim:set shiftwidth=2 softtabstop=2 expandtab: */
libetonyek
Definition: IWORKBezierElement.cpp:18
libetonyek::IWORKDiscardContext::text
virtual void text(const char *value)
Process textual content of an element.
Definition: IWORKDiscardContext.cpp:112
libetonyek::IWORKDiscardContext::element
virtual IWORKXMLContextPtr_t element(int name)
Create a context for parsing a child element.
Definition: IWORKDiscardContext.cpp:68
libetonyek::IWORKXMLContext
Definition: IWORKXMLContext.h:22
libetonyek::IWORKDiscardContext::m_enableCollector
bool m_enableCollector
Definition: IWORKDiscardContext.h:40
libetonyek::IWORKXMLContextPtr_t
boost::shared_ptr< IWORKXMLContext > IWORKXMLContextPtr_t
Definition: IWORKXMLContext.h:18
libetonyek::IWORKDiscardContext::m_data
boost::shared_ptr< Data > m_data
Definition: IWORKDiscardContext.h:41
libetonyek::IWORKDiscardContext::endOfElement
virtual void endOfElement()
Signalize the end of an element.
Definition: IWORKDiscardContext.cpp:116
libetonyek::IWORKDiscardContext::m_level
unsigned m_level
Definition: IWORKDiscardContext.h:39
libetonyek::IWORKDiscardContext::attribute
virtual void attribute(int name, const char *value)
Process an attribute.
Definition: IWORKDiscardContext.cpp:64
name
const char * name
Definition: IWORKToken.cpp:43
libetonyek::IWORKXMLParserState
Definition: IWORKXMLParserState.h:30
libetonyek::IWORKDiscardContext::IWORKDiscardContext
IWORKDiscardContext(IWORKXMLParserState &state)
Definition: IWORKDiscardContext.cpp:46
libetonyek::IWORKDiscardContext::m_state
IWORKXMLParserState & m_state
Definition: IWORKDiscardContext.h:38
libetonyek::IWORKDiscardContext::startOfElement
virtual void startOfElement()
Signalize the start of an element.
Definition: IWORKDiscardContext.cpp:54
libetonyek::IWORKDiscardContext
Definition: IWORKDiscardContext.h:23
libetonyek::IWORKDiscardContext::Data
Definition: IWORKDiscardContext.cpp:34
IWORKXMLContext.h