IWORKDiscardContext.h Source File documentation

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 /* Warning in g++ because std::enable_shared_from_this<IWORKDiscardContext> has no virtual
23 destructor.
24
25 If we replace public by protected, error with clang++ in KEY2Parser.cpp:1595 when doing
26 std::make_shared<DiscardContext>(m_state)
27 */
28 #if defined __GNUC__ && !defined __clang__
29 #pragma GCC diagnostic push
30 #pragma GCC diagnostic ignored "-Wnon-virtual-dtor"
31 #endif
32 class IWORKDiscardContext : public IWORKXMLContext, public std::enable_shared_from_this<IWORKDiscardContext>
33 {
34 #if defined __GNUC__ && !defined __clang__
35 #pragma GCC diagnostic pop
36 #endif
37 struct Data;
38
39 public:
40 explicit IWORKDiscardContext(IWORKXMLParserState &state);
41 protected:
42 void startOfElement() override;
43 void attribute(int name, const char *value) override;
44 IWORKXMLContextPtr_t element(int name) override;
45 void text(const char *value) override;
46 void endOfElement() override;
47
48 private:
49 IWORKXMLParserState &m_state;
50 unsigned m_level;
51 bool m_enableCollector;
52 std::shared_ptr<Data> m_data;
53 };
54
55 }
56
57 #endif // IWORKDISCARDCONTEXT_H_INCLUDED
58
59 /* vim:set shiftwidth=2 softtabstop=2 expandtab: */
libetonyek::IWORKDiscardContext::m_state
IWORKXMLParserState & m_state
Definition: IWORKDiscardContext.h:49
libetonyek::IWORKDictionary::m_characterStyles
IWORKStyleMap_t m_characterStyles
Definition: IWORKDictionary.h:43
libetonyek::IWORKDictionary::m_cellStyles
IWORKStyleMap_t m_cellStyles
Definition: IWORKDictionary.h:42
IWORKBezierElement.h
IWORKDictionary.h
libetonyek
Definition: IWORKBezierElement.cpp:20
libetonyek::IWORKToken::paragraphstyle
@ paragraphstyle
Definition: IWORKToken.h:354
libetonyek::IWORKToken::binary
@ binary
Definition: IWORKToken.h:115
libetonyek::IWORKToken::tabular_style
@ tabular_style
Definition: IWORKToken.h:461
libetonyek::IWORKToken::bezier
@ bezier
Definition: IWORKToken.h:112
libetonyek::IWORKXMLParserState::m_enableCollector
bool m_enableCollector
Definition: IWORKXMLParserState.h:51
libetonyek::IWORKDiscardContext::element
IWORKXMLContextPtr_t element(int name) override
Create a context for parsing a child element.
Definition: IWORKDiscardContext.cpp:81
IWORKListLabelTypeinfoElement.h
libetonyek::IWORKXMLContextPtr_t
std::shared_ptr< IWORKXMLContext > IWORKXMLContextPtr_t
Definition: IWORKXMLContext.h:18
libetonyek::IWORKToken::liststyle
@ liststyle
Definition: IWORKToken.h:313
IWORKListLabelIndentsProperty.h
libetonyek::IWORKDataPtr_t
std::shared_ptr< IWORKData > IWORKDataPtr_t
Definition: IWORKTypes_fwd.h:49
libetonyek::IWORKToken::list_label_geometry
@ list_label_geometry
Definition: IWORKToken.h:309
libetonyek::IWORKToken::slide_style
@ slide_style
Definition: IWORKToken.h:397
IWORKListLabelGeometryElement.h
libetonyek::IWORKDiscardContext::startOfElement
void startOfElement() override
Signalize the start of an element.
Definition: IWORKDiscardContext.cpp:67
IWORKStyleContext.h
m_data
IWORKDataPtr_t & m_data
Definition: IWORKMediaElement.cpp:93
libetonyek::IWORKToken::characterstyle
@ characterstyle
Definition: IWORKToken.h:137
IWORKXMLContext.h
libetonyek::IWORKDictionary::m_paragraphStyles
IWORKStyleMap_t m_paragraphStyles
Definition: IWORKDictionary.h:50
IWORKTextLabelElement.h
libetonyek::IWORKTabStops_t
std::deque< IWORKTabStop > IWORKTabStops_t
Definition: IWORKTypes.h:119
libetonyek::IWORKDictionary::m_slideStyles
IWORKStyleMap_t m_slideStyles
Definition: IWORKDictionary.h:51
libetonyek::IWORKToken::list_label_typeinfo
@ list_label_typeinfo
Definition: IWORKToken.h:311
libetonyek::IWORKMediaContentPtr_t
std::shared_ptr< IWORKMediaContent > IWORKMediaContentPtr_t
Definition: IWORKTypes_fwd.h:54
libetonyek::IWORKXMLParserState
Definition: IWORKXMLParserState.h:31
libetonyek::IWORKDictionary::m_tabularStyles
IWORKStyleMap_t m_tabularStyles
Definition: IWORKDictionary.h:55
libetonyek::IWORKDiscardContext::Data::m_mediaContent
IWORKMediaContentPtr_t m_mediaContent
Definition: IWORKDiscardContext.cpp:49
IWORKUnfilteredElement.h
libetonyek::IWORKDiscardContext::m_level
unsigned m_level
Definition: IWORKDiscardContext.h:50
libetonyek::IWORKDiscardContext::attribute
void attribute(int name, const char *value) override
Process an attribute.
Definition: IWORKDiscardContext.cpp:77
libetonyek::IWORKDiscardContext::Data::m_listLabelTypeInfo
boost::optional< IWORKListLabelTypeInfo_t > m_listLabelTypeInfo
Definition: IWORKDiscardContext.cpp:56
libetonyek::IWORKDictionary::m_layoutStyles
IWORKStyleMap_t m_layoutStyles
Definition: IWORKDictionary.h:48
libetonyek::IWORKDiscardContext::Data::m_tabStops
IWORKTabStops_t m_tabStops
Definition: IWORKDiscardContext.cpp:50
libetonyek::IWORKDiscardContext::Data::m_path
IWORKPathPtr_t m_path
Definition: IWORKDiscardContext.cpp:52
libetonyek::IWORKDictionary::m_listStyles
IWORKStyleMap_t m_listStyles
Definition: IWORKDictionary.h:49
libetonyek::IWORKDiscardContext::Data::m_fillColor
boost::optional< IWORKColor > m_fillColor
Definition: IWORKDiscardContext.cpp:54
libetonyek::IWORKDiscardContext::Data
Definition: IWORKDiscardContext.cpp:33
libetonyek::IWORKPathPtr_t
std::shared_ptr< IWORKPath > IWORKPathPtr_t
Definition: IWORKPath_fwd.h:20
libetonyek::IWORKDiscardContext::Data::Data
Data()
Definition: IWORKDiscardContext.cpp:35
libetonyek::IWORKDiscardContext::endOfElement
void endOfElement() override
Signalize the end of an element.
Definition: IWORKDiscardContext.cpp:133
libetonyek::IWORKDiscardContext::IWORKDiscardContext
IWORKDiscardContext(IWORKXMLParserState &state)
Definition: IWORKDiscardContext.cpp:59
libetonyek::IWORKToken::text_label
@ text_label
Definition: IWORKToken.h:469
IWORKTypes.h
IWORKDiscardContext.h
IWORKXMLParserState.h
libetonyek::IWORKDiscardContext::Data::m_data
IWORKDataPtr_t m_data
Definition: IWORKDiscardContext.cpp:48
libetonyek::IWORKDiscardContext::text
void text(const char *value) override
Process textual content of an element.
Definition: IWORKDiscardContext.cpp:129
libetonyek::IWORKToken::tabs
@ tabs
Definition: IWORKToken.h:422
libetonyek::IWORKXMLContext
Definition: IWORKXMLContext.h:22
IWORKBinaryElement.h
IWORKDataElement.h
libetonyek::IWORKDiscardContext::m_data
std::shared_ptr< Data > m_data
Definition: IWORKDiscardContext.h:52
IWORKCoreImageFilterDescriptorElement.h
m_state
PAG1ParserState & m_state
Definition: PAG1TextStorageElement.cpp:413
libetonyek::IWORKDiscardContext::m_enableCollector
bool m_enableCollector
Definition: IWORKDiscardContext.h:51
libetonyek::IWORKPropertyMap
Represents a (hierarchical) property map.
Definition: IWORKPropertyMap.h:24
m_level
const unsigned m_level
Definition: IWORKTextRecorder.cpp:76
libetonyek::IWORKToken::layoutstyle
@ layoutstyle
Definition: IWORKToken.h:293
libetonyek::IWORKDiscardContext::Data::m_isShadow
bool m_isShadow
Definition: IWORKDiscardContext.cpp:51
libetonyek::IWORKToken::NS_URI_SF
@ NS_URI_SF
Definition: IWORKToken.h:688
IWORKToken.h
libetonyek::IWORKToken::unfiltered
@ unfiltered
Definition: IWORKToken.h:488
libetonyek::IWORKToken::core_image_filter_descriptor
@ core_image_filter_descriptor
Definition: IWORKToken.h:165
libetonyek::IWORKToken::listLabelIndents
@ listLabelIndents
Definition: IWORKToken.h:305
libetonyek::IWORKXMLParserState::getDictionary
IWORKDictionary & getDictionary()
Definition: IWORKXMLParserState.cpp:43
IWORKTabsElement.h
libetonyek::IWORKDiscardContext::Data::m_propertyMap
IWORKPropertyMap m_propertyMap
Definition: IWORKDiscardContext.cpp:53
libetonyek::IWORKToken::cell_style
@ cell_style
Definition: IWORKToken.h:132
libetonyek::IWORKToken::name
@ name
Definition: IWORKToken.h:578
libetonyek::IWORKToken::data
@ data
Definition: IWORKToken.h:174
libetonyek::IWORKToken::value
@ value
Definition: IWORKToken.h:624
libetonyek::IWORKDiscardContext
Definition: IWORKDiscardContext.h:32
libetonyek::IWORKDiscardContext::Data::m_listLabelGeometry
boost::optional< IWORKListLabelGeometry > m_listLabelGeometry
Definition: IWORKDiscardContext.cpp:55