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 <memory>
14 
15 #include "IWORKXMLContext.h"
16 
17 namespace libetonyek
18 {
19 
20 class IWORKXMLParserState;
21 
22 class IWORKDiscardContext : public IWORKXMLContext, public std::enable_shared_from_this<IWORKDiscardContext>
23 {
24  struct Data;
25 
26 public:
28 
29 protected:
30  void startOfElement() override;
31  void attribute(int name, const char *value) override;
32  IWORKXMLContextPtr_t element(int name) override;
33  void text(const char *value) override;
34  void endOfElement() override;
35 
36 private:
38  unsigned m_level;
40  std::shared_ptr<Data> m_data;
41 };
42 
43 }
44 
45 #endif // IWORKDISCARDCONTEXT_H_INCLUDED
46 
47 /* vim:set shiftwidth=2 softtabstop=2 expandtab: */
Definition: IWORKBezierElement.cpp:18
std::shared_ptr< Data > m_data
Definition: IWORKDiscardContext.h:40
std::shared_ptr< IWORKXMLContext > IWORKXMLContextPtr_t
Definition: IWORKXMLContext.h:18
Definition: IWORKXMLContext.h:22
void attribute(int name, const char *value) override
Process an attribute.
Definition: IWORKDiscardContext.cpp:64
bool m_enableCollector
Definition: IWORKDiscardContext.h:39
unsigned m_level
Definition: IWORKDiscardContext.h:38
const char * name
Definition: IWORKToken.cpp:43
void endOfElement() override
Signalize the end of an element.
Definition: IWORKDiscardContext.cpp:116
void text(const char *value) override
Process textual content of an element.
Definition: IWORKDiscardContext.cpp:112
Definition: IWORKXMLParserState.h:30
void startOfElement() override
Signalize the start of an element.
Definition: IWORKDiscardContext.cpp:54
IWORKDiscardContext(IWORKXMLParserState &state)
Definition: IWORKDiscardContext.cpp:46
IWORKXMLParserState & m_state
Definition: IWORKDiscardContext.h:37
Definition: IWORKDiscardContext.h:22
Definition: IWORKDiscardContext.cpp:34
IWORKXMLContextPtr_t element(int name) override
Create a context for parsing a child element.
Definition: IWORKDiscardContext.cpp:68

Generated for libetonyek by doxygen 1.8.13