IWORKTabularModelElement.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 IWORKTABULARMODELELEMENT_H_INCLUDED
11 #define IWORKTABULARMODELELEMENT_H_INCLUDED
12 
13 #include <map>
14 #include <string>
15 #include <utility>
16 
17 #include <boost/optional.hpp>
18 
19 #include "IWORKStyle_fwd.h"
20 
21 #include "IWORKXMLContextBase.h"
22 
23 namespace libetonyek
24 {
25 class IWORKTable;
26 
28 {
29 public:
30  explicit IWORKTabularModelElement(IWORKXMLParserState &state, bool isDefinition=false);
31 
32 private:
33  void attribute(int name, const char *value) override;
34  void startOfElement() override;
35  IWORKXMLContextPtr_t element(int name) override;
36  void endOfElement() override;
37 
38 private:
39  void sendStyle(const IWORKStylePtr_t &style, const std::shared_ptr<IWORKTable> &table);
40 
41 private:
43  boost::optional<ID_t> m_id;
44  boost::optional<std::string> m_tableName;
45  boost::optional<std::string> m_tableId;
46  boost::optional<ID_t> m_styleRef;
47  boost::optional<unsigned> m_headerColumns;
48  boost::optional<unsigned> m_headerRows;
49  boost::optional<unsigned> m_footerRows;
50  std::map<std::pair<unsigned,unsigned>,ID_t> m_coordinateCommentRefMap;
51 };
52 
53 }
54 
55 #endif // IWORKTABULARMODELELEMENT_H_INCLUDED
56 
57 /* vim:set shiftwidth=2 softtabstop=2 expandtab: */
IWORKXMLContextPtr_t element(int name) override
Definition: IWORKTabularModelElement.cpp:2057
std::shared_ptr< IWORKXMLContext > IWORKXMLContextPtr_t
Definition: IWORKXMLContext.h:18
boost::optional< unsigned > m_footerRows
Definition: IWORKTabularModelElement.h:49
boost::optional< std::string > m_tableName
Definition: IWORKTabularModelElement.h:44
boost::optional< ID_t > m_styleRef
Definition: IWORKTabularModelElement.h:46
std::shared_ptr< IWORKStyle > IWORKStylePtr_t
Definition: IWORKStyle_fwd.h:21
Definition: IWORKToken.h:631
IWORKTabularModelElement(IWORKXMLParserState &state, bool isDefinition=false)
Definition: IWORKTabularModelElement.cpp:2005
Definition: KEY1Token.h:198
boost::optional< ID_t > m_id
Definition: IWORKTabularModelElement.h:43
std::map< std::pair< unsigned, unsigned >, ID_t > m_coordinateCommentRefMap
Definition: IWORKTabularModelElement.h:50
Definition: IWORKToken.h:421
const char * name
Definition: IWORKToken.cpp:43
void startOfElement() override
Definition: IWORKTabularModelElement.cpp:2047
boost::optional< unsigned > m_headerRows
Definition: IWORKTabularModelElement.h:48
void sendStyle(const IWORKStylePtr_t &style, const std::shared_ptr< IWORKTable > &table)
Definition: IWORKTabularModelElement.cpp:2148
Definition: IWORKXMLContextBase.h:27
Definition: IWORKTabularModelElement.h:27
Definition: IWORKXMLParserState.h:31
void attribute(int name, const char *value) override
Definition: IWORKTabularModelElement.cpp:2019
std::string ID_t
Definition: IWORKTypes_fwd.h:20
void endOfElement() override
Definition: IWORKTabularModelElement.cpp:2082
bool m_isDefinition
Definition: IWORKTabularModelElement.h:42
boost::optional< unsigned > m_headerColumns
Definition: IWORKTabularModelElement.h:47
boost::optional< std::string > m_tableId
Definition: IWORKTabularModelElement.h:45

Generated for libetonyek by doxygen 1.8.6