PAG1AnnotationContext.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 PAG1ANNOTATIONCONTEXT_H_INCLUDED
11 #define PAG1ANNOTATIONCONTEXT_H_INCLUDED
12 
13 #include <string>
14 
15 #include <boost/function.hpp>
16 #include <boost/optional.hpp>
17 
18 #include "PAG1XMLContextBase.h"
19 
20 namespace libetonyek
21 {
22 
24 {
25 public:
26  typedef boost::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_target;
39 };
40 
41 }
42 
43 #endif // PAG1ANNOTATIONCONTEXT_H_INCLUDED
44 
45 /* vim:set shiftwidth=2 softtabstop=2 expandtab: */
libetonyek::PAG1AnnotationContext::m_collect
const CollectFunction_t m_collect
Definition: PAG1AnnotationContext.h:37
libetonyek::IWORKToken::name
@ name
Definition: IWORKToken.h:585
libetonyek::PAG1AnnotationContext::m_target
boost::optional< std::string > m_target
Definition: PAG1AnnotationContext.h:38
libetonyek
Definition: IWORKBezierElement.cpp:21
libetonyek::PAG1AnnotationContext
Definition: PAG1AnnotationContext.h:24
libetonyek::PAG1AnnotationContext::PAG1AnnotationContext
PAG1AnnotationContext(PAG1ParserState &state, const CollectFunction_t &collect)
Definition: PAG1AnnotationContext.cpp:22
libetonyek::PAG1ParserState
Definition: PAG1ParserState.h:24
libetonyek::PAG1AnnotationContext::element
IWORKXMLContextPtr_t element(int name) override
Definition: PAG1AnnotationContext.cpp:46
libetonyek::IWORKXMLContextPtr_t
std::shared_ptr< IWORKXMLContext > IWORKXMLContextPtr_t
Definition: IWORKXMLContext.h:18
libetonyek::PAG1XMLContextBase
Definition: PAG1XMLContextBase.h:23
libetonyek::PAG1AnnotationContext::endOfElement
void endOfElement() override
Definition: PAG1AnnotationContext.cpp:53
ETONYEK_DEBUG_MSG
#define ETONYEK_DEBUG_MSG(M)
Definition: libetonyek_utils.h:54
libetonyek::IWORKXMLContextBase< Base, PAG1ParserState, PAGCollector >::isCollector
bool isCollector() const
Definition: IWORKXMLContextBase.h:59
libetonyek::IWORKXMLContextBase< Base, PAG1ParserState, PAGCollector >::getCollector
PAGCollector & getCollector() const
Definition: IWORKXMLContextBase.h:49
libetonyek::IWORKToken::string
@ string
Definition: IWORKToken.h:418
libetonyek::IWORKCollector::createText
virtual std::shared_ptr< IWORKText > createText(const IWORKLanguageManager &langManager, bool discardEmptyContent=false, bool allowListInsertion=true) const
Definition: IWORKCollector.cpp:593
libetonyek::IWORKToken::value
@ value
Definition: IWORKToken.h:631
libetonyek::PAG1AnnotationContext::attribute
void attribute(int name, const char *value) override
Definition: PAG1AnnotationContext.cpp:38
PAG1AnnotationContext.h
libetonyek::IWORKToken::text
@ text
Definition: IWORKToken.h:472
IWORKTextElement.h
libetonyek::PAG1AnnotationContext::CollectFunction_t
boost::function< void(const std::string &)> CollectFunction_t
Definition: PAG1AnnotationContext.h:26
libetonyek::IWORKToken::NS_URI_SF
@ NS_URI_SF
Definition: IWORKToken.h:696
libetonyek::PAG1AnnotationContext::startOfElement
void startOfElement() override
Definition: PAG1AnnotationContext.cpp:29
PAG1XMLContextBase.h
IWORKToken.h
libetonyek::get
const ValueT & get(const detail::IWAFieldImpl< TagV, ValueT, Reader > &field)
Definition: IWAField.h:190
libetonyek::IWORKToken::target
@ target
Definition: IWORKToken.h:625
libetonyek::IWORKXMLParserState::m_currentText
std::shared_ptr< IWORKText > m_currentText
Definition: IWORKXMLParserState.h:55
PAG1ParserState.h
libetonyek::IWORKCollector::collectText
void collectText(const std::shared_ptr< IWORKText > &text)
Definition: IWORKCollector.cpp:505
PAGCollector.h
libetonyek::IWORKXMLContextBase< Base, PAG1ParserState, PAGCollector >::getState
PAG1ParserState & getState()
Definition: IWORKXMLContextBase.h:43

Generated for libetonyek by doxygen 1.8.20