IWORKHeaderFooterContext.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 IWORKHEADERFOOTERCONTEXT_H_INCLUDED
11 #define IWORKHEADERFOOTERCONTEXT_H_INCLUDED
12 
13 #include <functional>
14 #include <string>
15 
16 #include <boost/optional.hpp>
17 
18 #include "IWORKXMLContextBase.h"
19 
20 namespace libetonyek
21 {
22 
24 {
25 public:
26  typedef std::function<void(const std::string &)> CollectFunction_t;
27 
29 
30 private:
31  void startOfElement() override;
32  void attribute(int name, const char *value) override;
33  IWORKXMLContextPtr_t element(int name) override;
34  void endOfElement() override;
35 
36 private:
38  boost::optional<std::string> m_name;
39 };
40 
41 }
42 
43 #endif // IWORKHEADERFOOTERCONTEXT_H_INCLUDED
44 
45 /* vim:set shiftwidth=2 softtabstop=2 expandtab: */
IWORKTextStorageElement.h
libetonyek
Definition: IWORKBezierElement.cpp:21
libetonyek::IWORKXMLContextPtr_t
std::shared_ptr< IWORKXMLContext > IWORKXMLContextPtr_t
Definition: IWORKXMLContext.h:18
libetonyek::IWORKHeaderFooterContext::IWORKHeaderFooterContext
IWORKHeaderFooterContext(IWORKXMLParserState &state, const CollectFunction_t &collect)
Definition: IWORKHeaderFooterContext.cpp:22
libetonyek::IWORKXMLContextBase::isCollector
bool isCollector() const
Definition: IWORKXMLContextBase.h:59
libetonyek::IWORKHeaderFooterContext::CollectFunction_t
std::function< void(const std::string &)> CollectFunction_t
Definition: IWORKHeaderFooterContext.h:26
libetonyek::IWORKXMLParserState
Definition: IWORKXMLParserState.h:32
libetonyek::IWORKHeaderFooterContext::element
IWORKXMLContextPtr_t element(int name) override
Definition: IWORKHeaderFooterContext.cpp:46
libetonyek::IWORKXMLContextBase::getCollector
Collector & getCollector() const
Definition: IWORKXMLContextBase.h:49
libetonyek::IWORKHeaderFooterContext::attribute
void attribute(int name, const char *value) override
Definition: IWORKHeaderFooterContext.cpp:38
libetonyek::IWORKHeaderFooterContext::endOfElement
void endOfElement() override
Definition: IWORKHeaderFooterContext.cpp:53
IWORKHeaderFooterContext.h
libetonyek::IWORKHeaderFooterContext
Definition: IWORKHeaderFooterContext.h:24
libetonyek::IWORKToken::string
@ string
Definition: IWORKToken.h:418
libetonyek::IWORKXMLContextBase
Definition: IWORKXMLContextBase.h:28
IWORKXMLParserState.h
libetonyek::IWORKToken::text_storage
@ text_storage
Definition: IWORKToken.h:478
IWORKCollector.h
libetonyek::IWORKHeaderFooterContext::startOfElement
void startOfElement() override
Definition: IWORKHeaderFooterContext.cpp:29
libetonyek::IWORKHeaderFooterContext::m_collect
const CollectFunction_t m_collect
Definition: IWORKHeaderFooterContext.h:37
libetonyek::IWORKToken::NS_URI_SF
@ NS_URI_SF
Definition: IWORKToken.h:696
IWORKXMLContextBase.h
IWORKToken.h
libetonyek::get
const ValueT & get(const detail::IWAFieldImpl< TagV, ValueT, Reader > &field)
Definition: IWAField.h:190
libetonyek::IWORKHeaderFooterContext::m_name
boost::optional< std::string > m_name
Definition: IWORKHeaderFooterContext.h:38
libetonyek::IWORKToken::name
@ name
Definition: IWORKToken.h:585
libetonyek::IWORKToken::value
@ value
Definition: IWORKToken.h:631
m_name
boost::optional< std::string > m_name
Definition: KEY1Parser.cpp:1508
libetonyek::IWORKXMLContextBase::getState
State & getState()
Definition: IWORKXMLContextBase.h:43

Generated for libetonyek by doxygen 1.8.20