IWORKFormulaElement.h Source File documentation

IWORKFormulaElement.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 IWORKFORMULAELEMENT_H_INCLUDED
11 #define IWORKFORMULAELEMENT_H_INCLUDED
12
13 #include <boost/optional.hpp>
14
15 #include "IWORKXMLContextBase.h"
16 #include "IWORKXMLParserState.h"
17
18 namespace libetonyek
19 {
21 class IWORKFoElement : public IWORKXMLEmptyContextBase
22 {
23 public:
24 explicit IWORKFoElement(IWORKXMLParserState &state);
25
26 private:
27 void attribute(int name, const char *value) override;
28 IWORKXMLContextPtr_t element(int name) override;
29 void endOfElement() override;
30 const boost::optional<ID_t> &getId() const;
31
32 private:
33 boost::optional<ID_t> m_id;
34 boost::optional<std::string> m_formula;
35 boost::optional<unsigned> m_hc;
36 };
37
39 class IWORKFormulaElement : public IWORKXMLEmptyContextBase
40 {
41 public:
42 explicit IWORKFormulaElement(IWORKXMLParserState &state);
43
44 private:
45 void attribute(int name, const char *value) override;
46 IWORKXMLContextPtr_t element(int name) override;
47 void endOfElement() override;
48 const boost::optional<ID_t> &getId() const;
49
50 private:
51 boost::optional<ID_t> m_id;
52 boost::optional<std::string> m_formula;
53 boost::optional<unsigned> m_hc;
54 };
55
57 class IWORKTableCellFormulaElement : public IWORKXMLEmptyContextBase
58 {
59 public:
60 explicit IWORKTableCellFormulaElement(IWORKXMLParserState &state);
61
62 private:
63 void attribute(int name, const char *value) override;
64 IWORKXMLContextPtr_t element(int name) override;
65 void endOfElement() override;
66 const boost::optional<ID_t> &getId() const;
67
68 private:
69 boost::optional<ID_t> m_id;
70 boost::optional<std::string> m_formula;
71 boost::optional<std::string> m_tableId;
72 };
73
75 class IWORKOfElement : public IWORKXMLEmptyContextBase
76 {
77 public:
78 explicit IWORKOfElement(IWORKXMLParserState &state);
79
80 private:
81 void attribute(int name, const char *value) override;
82 IWORKXMLContextPtr_t element(int name) override;
83 void endOfElement() override;
84
85 boost::optional<ID_t> m_ref;
86 boost::optional<unsigned> m_hc;
87 };
88 }
89
90 #endif // IWORKFORMULAELEMENT_H_INCLUDED
91
92 /* vim:set shiftwidth=2 softtabstop=2 expandtab: */
IWORKXMLContextBase.h
IWORKXMLParserState.h
libetonyek::IWORKFoElement
class to parse the sf:fo element, ie. formula element
Definition: IWORKFormulaElement.h:22
libetonyek::IWORKFoElement::getId
const boost::optional< ID_t > & getId() const
Definition: IWORKFormulaElement.cpp:156
libetonyek::IWORKFoElement::m_id
boost::optional< ID_t > m_id
Definition: IWORKFormulaElement.h:33
libetonyek::IWORKFoElement::endOfElement
void endOfElement() override
Definition: IWORKFormulaElement.cpp:197
libetonyek::IWORKFoElement::element
IWORKXMLContextPtr_t element(int name) override
Definition: IWORKFormulaElement.cpp:182
libetonyek::IWORKFoElement::m_hc
boost::optional< unsigned > m_hc
Definition: IWORKFormulaElement.h:35
libetonyek::IWORKFoElement::IWORKFoElement
IWORKFoElement(IWORKXMLParserState &state)
Definition: IWORKFormulaElement.cpp:148
libetonyek::IWORKFoElement::attribute
void attribute(int name, const char *value) override
Definition: IWORKFormulaElement.cpp:161
libetonyek::IWORKFoElement::m_formula
boost::optional< std::string > m_formula
Definition: IWORKFormulaElement.h:34
libetonyek::IWORKFormulaElement
class to parse the sf:formula element
Definition: IWORKFormulaElement.h:40
libetonyek::IWORKFormulaElement::getId
const boost::optional< ID_t > & getId() const
Definition: IWORKFormulaElement.cpp:274
libetonyek::IWORKFormulaElement::m_formula
boost::optional< std::string > m_formula
Definition: IWORKFormulaElement.h:52
libetonyek::IWORKFormulaElement::IWORKFormulaElement
IWORKFormulaElement(IWORKXMLParserState &state)
Definition: IWORKFormulaElement.cpp:266
libetonyek::IWORKFormulaElement::endOfElement
void endOfElement() override
Definition: IWORKFormulaElement.cpp:309
libetonyek::IWORKFormulaElement::attribute
void attribute(int name, const char *value) override
Definition: IWORKFormulaElement.cpp:279
libetonyek::IWORKFormulaElement::m_hc
boost::optional< unsigned > m_hc
Definition: IWORKFormulaElement.h:53
libetonyek::IWORKFormulaElement::element
IWORKXMLContextPtr_t element(int name) override
Definition: IWORKFormulaElement.cpp:292
libetonyek::IWORKFormulaElement::m_id
boost::optional< ID_t > m_id
Definition: IWORKFormulaElement.h:51
libetonyek::IWORKOfElement
class to parse the sf:of element, ie formula offset element
Definition: IWORKFormulaElement.h:76
libetonyek::IWORKOfElement::element
IWORKXMLContextPtr_t element(int name) override
Definition: IWORKFormulaElement.cpp:231
libetonyek::IWORKOfElement::endOfElement
void endOfElement() override
Definition: IWORKFormulaElement.cpp:248
libetonyek::IWORKOfElement::attribute
void attribute(int name, const char *value) override
Definition: IWORKFormulaElement.cpp:218
libetonyek::IWORKOfElement::m_hc
boost::optional< unsigned > m_hc
Definition: IWORKFormulaElement.h:86
libetonyek::IWORKOfElement::IWORKOfElement
IWORKOfElement(IWORKXMLParserState &state)
Definition: IWORKFormulaElement.cpp:211
libetonyek::IWORKOfElement::m_ref
boost::optional< ID_t > m_ref
Definition: IWORKFormulaElement.h:85
libetonyek::IWORKTableCellFormulaElement
class to parse the sf:TableCellFormula element
Definition: IWORKFormulaElement.h:58
libetonyek::IWORKTableCellFormulaElement::IWORKTableCellFormulaElement
IWORKTableCellFormulaElement(IWORKXMLParserState &state)
Definition: IWORKFormulaElement.cpp:322
libetonyek::IWORKTableCellFormulaElement::m_id
boost::optional< ID_t > m_id
Definition: IWORKFormulaElement.h:69
libetonyek::IWORKTableCellFormulaElement::m_tableId
boost::optional< std::string > m_tableId
Definition: IWORKFormulaElement.h:71
libetonyek::IWORKTableCellFormulaElement::attribute
void attribute(int name, const char *value) override
Definition: IWORKFormulaElement.cpp:335
libetonyek::IWORKTableCellFormulaElement::element
IWORKXMLContextPtr_t element(int name) override
Definition: IWORKFormulaElement.cpp:348
libetonyek::IWORKTableCellFormulaElement::m_formula
boost::optional< std::string > m_formula
Definition: IWORKFormulaElement.h:70
libetonyek::IWORKTableCellFormulaElement::endOfElement
void endOfElement() override
Definition: IWORKFormulaElement.cpp:365
libetonyek::IWORKTableCellFormulaElement::getId
const boost::optional< ID_t > & getId() const
Definition: IWORKFormulaElement.cpp:330
libetonyek::IWORKXMLContextBase
Definition: IWORKXMLContextBase.h:28
libetonyek::IWORKXMLParserState
Definition: IWORKXMLParserState.h:32
libetonyek::IWORKToken::value
@ value
Definition: IWORKToken.h:631
libetonyek::IWORKToken::name
@ name
Definition: IWORKToken.h:585
libetonyek
Definition: IWORKBezierElement.cpp:21
libetonyek::IWORKXMLContextPtr_t
std::shared_ptr< IWORKXMLContext > IWORKXMLContextPtr_t
Definition: IWORKXMLContext.h:18