IWORKFieldElement.h Source File documentation

IWORKFieldElement.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 IWORKFIELDELEMENT_H_INCLUDED
11#define IWORKFIELDELEMENT_H_INCLUDED
12
13#include <boost/optional.hpp>
14
15#include "IWORKEnum.h"
16
17#include "IWORKXMLContextBase.h"
18
19namespace libetonyek
20{
21
22 class IWORKFieldElement : public IWORKXMLMixedContextBase
23{
24public:
25 IWORKFieldElement(IWORKXMLParserState &state, IWORKFieldType type);
26
27protected:
28 void attribute(int name, const char *value) override;
29 IWORKXMLContextPtr_t element(int name) override;
30 void text(const char *value) override;
31 void endOfElement() override;
32
33private:
34 IWORKFieldType m_type;
35 boost::optional<unsigned> m_value;
36 boost::optional<std::string> m_val;
37};
38
39}
40
41#endif // IWORKFIELDELEMENT_H_INCLUDED
42
43/* vim:set shiftwidth=2 softtabstop=2 expandtab: */
IWORKEnum.h
IWORKXMLContextBase.h
libetonyek::IWORKFieldElement
Definition: IWORKFieldElement.h:23
libetonyek::IWORKFieldElement::text
void text(const char *value) override
Definition: IWORKFieldElement.cpp:62
libetonyek::IWORKFieldElement::m_type
IWORKFieldType m_type
Definition: IWORKFieldElement.h:34
libetonyek::IWORKFieldElement::m_val
boost::optional< std::string > m_val
Definition: IWORKFieldElement.h:36
libetonyek::IWORKFieldElement::element
IWORKXMLContextPtr_t element(int name) override
Definition: IWORKFieldElement.cpp:45
libetonyek::IWORKFieldElement::endOfElement
void endOfElement() override
Definition: IWORKFieldElement.cpp:68
libetonyek::IWORKFieldElement::m_value
boost::optional< unsigned > m_value
Definition: IWORKFieldElement.h:35
libetonyek::IWORKFieldElement::attribute
void attribute(int name, const char *value) override
Definition: IWORKFieldElement.cpp:29
libetonyek::IWORKFieldElement::IWORKFieldElement
IWORKFieldElement(IWORKXMLParserState &state, IWORKFieldType type)
Definition: IWORKFieldElement.cpp:21
libetonyek::IWORKXMLContextBase
Definition: IWORKXMLContextBase.h:28
libetonyek::IWORKXMLParserState
Definition: IWORKXMLParserState.h:32
libetonyek::IWORKToken::value
@ value
Definition: IWORKToken.h:631
libetonyek::IWORKToken::type
@ type
Definition: IWORKToken.h:493
libetonyek::IWORKToken::name
@ name
Definition: IWORKToken.h:585
libetonyek
Definition: IWORKBezierElement.cpp:21
libetonyek::IWORKFieldType
IWORKFieldType
Definition: IWORKEnum.h:144
libetonyek::IWORKXMLContextPtr_t
std::shared_ptr< IWORKXMLContext > IWORKXMLContextPtr_t
Definition: IWORKXMLContext.h:18