IWORKFormatElement.h Source File documentation

IWORKFormatElement.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 IWORKFORMATELEMENT_H_INCLUDED
11 #define IWORKFORMATELEMENT_H_INCLUDED
12
13 #include <boost/optional.hpp>
14
15 #include "IWORKXMLContextBase.h"
16
17 #include "IWORKPropertyMap.h"
18 #include "IWORKTypes.h"
19
20 namespace libetonyek
21 {
22 class IWORKDateTimeFormatElement : public IWORKXMLEmptyContextBase
23 {
24 public:
25 IWORKDateTimeFormatElement(IWORKXMLParserState &state, boost::optional<IWORKDateTimeFormat> &value);
26
27 private:
28 void attribute(int name, const char *value) override;
29 void endOfElement() override;
30
31 private:
32 boost::optional<IWORKDateTimeFormat> &m_value;
33 };
34
35 class IWORKDurationFormatElement : public IWORKXMLEmptyContextBase
36 {
37 public:
38 IWORKDurationFormatElement(IWORKXMLParserState &state, boost::optional<IWORKDurationFormat> &value);
39
40 private:
41 void attribute(int name, const char *value) override;
42 void endOfElement() override;
43
44 private:
45 boost::optional<IWORKDurationFormat> &m_value;
46 };
47
48 class IWORKNumberFormatElement : public IWORKXMLEmptyContextBase
49 {
50 public:
51 IWORKNumberFormatElement(IWORKXMLParserState &state, boost::optional<IWORKNumberFormat> &value);
52
53 private:
54 void attribute(int name, const char *value) override;
55 void endOfElement() override;
56
57 private:
58 boost::optional<IWORKNumberFormat> &m_value;
59 };
60
61 }
62
63 #endif // IWORKFORMATELEMENT_H_INCLUDED
64
65 /* vim:set shiftwidth=2 softtabstop=2 expandtab: */
IWORKDictionary.h
libetonyek
Definition: IWORKBezierElement.cpp:20
libetonyek::IWORKToken::format_show_thousands_separator
@ format_show_thousands_separator
Definition: IWORKToken.h:539
libetonyek::IWORKDurationFormatElement::m_value
boost::optional< IWORKDurationFormat > & m_value
Definition: IWORKFormatElement.h:45
libetonyek::IWORKDateTimeFormatElement::IWORKDateTimeFormatElement
IWORKDateTimeFormatElement(IWORKXMLParserState &state, boost::optional< IWORKDateTimeFormat > &value)
Definition: IWORKFormatElement.cpp:30
libetonyek::IWORKToken::ID
@ ID
Definition: IWORKToken.h:499
IWORKPropertyMap.h
IWORKProperties.h
libetonyek::IWORKToken::NS_URI_SFA
@ NS_URI_SFA
Definition: IWORKToken.h:689
IWORKNumberConverter.h
libetonyek::IWORKNumberConverter
Definition: IWORKNumberConverter.h:29
libetonyek::IWORKToken::format_negative_style
@ format_negative_style
Definition: IWORKToken.h:538
libetonyek::IWORKNumberFormat
Definition: IWORKTypes.h:364
libetonyek::IWORKNumberFormatElement::IWORKNumberFormatElement
IWORKNumberFormatElement(IWORKXMLParserState &state, boost::optional< IWORKNumberFormat > &value)
Definition: IWORKFormatElement.cpp:88
ETONYEK_DEBUG_MSG
#define ETONYEK_DEBUG_MSG(M)
Definition: libetonyek_utils.h:54
libetonyek::IWORKToken::format_fraction_accuracy
@ format_fraction_accuracy
Definition: IWORKToken.h:536
libetonyek::IWORKDateTimeFormatElement
Definition: IWORKFormatElement.h:22
libetonyek::IWORKXMLParserState
Definition: IWORKXMLParserState.h:31
libetonyek::IWORKDateTimeFormat
Definition: IWORKTypes.h:382
libetonyek::IWORKToken::format_type
@ format_type
Definition: IWORKToken.h:541
libetonyek::IWORKToken::format_base
@ format_base
Definition: IWORKToken.h:531
libetonyek::IWORKDurationFormatElement::endOfElement
void endOfElement() override
Definition: IWORKFormatElement.cpp:81
libetonyek::bool_cast
bool bool_cast(const char *value)
Convert string value to bool.
Definition: libetonyek_xml.cpp:56
libetonyek::IWORKToken::custom
@ custom
Definition: IWORKToken.h:516
libetonyek::IWORKDurationFormat
Definition: IWORKTypes.h:390
m_value
boost::optional< IWORKGradient > & m_value
Definition: IWORKFillElement.cpp:131
libetonyek::IWORKDurationFormatElement
Definition: IWORKFormatElement.h:35
libetonyek::IWORKNumberFormatElement::endOfElement
void endOfElement() override
Definition: IWORKFormatElement.cpp:143
libetonyek_utils.h
libetonyek::IWORKToken::format_use_accounting_style
@ format_use_accounting_style
Definition: IWORKToken.h:542
libetonyek::IWORKToken::format_currency_code
@ format_currency_code
Definition: IWORKToken.h:534
IWORKContainerContext.h
IWORKTypes.h
libetonyek::IWORKXMLContextBase
Definition: IWORKXMLContextBase.h:27
libetonyek::IWORKToken::format_decimal_places
@ format_decimal_places
Definition: IWORKToken.h:535
IWORKXMLParserState.h
libetonyek::IWORKNumberFormatElement::attribute
void attribute(int name, const char *value) override
Definition: IWORKFormatElement.cpp:95
libetonyek::IWORKToken::format_name
@ format_name
Definition: IWORKToken.h:537
IWORKFormatElement.h
libetonyek::IWORKToken::format_base_places
@ format_base_places
Definition: IWORKToken.h:532
libetonyek::IWORKToken::NS_URI_SF
@ NS_URI_SF
Definition: IWORKToken.h:688
IWORKXMLContextBase.h
libetonyek::IWORKNumberFormatElement
Definition: IWORKFormatElement.h:48
libetonyek::IWORKToken::format_string
@ format_string
Definition: IWORKToken.h:540
libetonyek::int_cast
int int_cast(const char *value)
Definition: libetonyek_xml.cpp:94
IWORKToken.h
libetonyek::IWORKDateTimeFormatElement::endOfElement
void endOfElement() override
Definition: IWORKFormatElement.cpp:52
libetonyek::get
const ValueT & get(const detail::IWAFieldImpl< TagV, ValueT, Reader > &field)
Definition: IWAField.h:190
IWORKRefContext.h
libetonyek::IWORKDurationFormatElement::IWORKDurationFormatElement
IWORKDurationFormatElement(IWORKXMLParserState &state, boost::optional< IWORKDurationFormat > &value)
Definition: IWORKFormatElement.cpp:59
libetonyek::IWORKToken::format_base_use_minus_sign
@ format_base_use_minus_sign
Definition: IWORKToken.h:533
libetonyek::IWORKToken::name
@ name
Definition: IWORKToken.h:578
libetonyek::IWORKToken::fmt
@ fmt
Definition: IWORKToken.h:211
libetonyek::IWORKToken::value
@ value
Definition: IWORKToken.h:624
libetonyek::IWORKDateTimeFormatElement::attribute
void attribute(int name, const char *value) override
Definition: IWORKFormatElement.cpp:37
libetonyek::IWORKDateTimeFormatElement::m_value
boost::optional< IWORKDateTimeFormat > & m_value
Definition: IWORKFormatElement.h:32
libetonyek::IWORKDurationFormatElement::attribute
void attribute(int name, const char *value) override
Definition: IWORKFormatElement.cpp:66
libetonyek::IWORKNumberFormatElement::m_value
boost::optional< IWORKNumberFormat > & m_value
Definition: IWORKFormatElement.h:58
libetonyek_xml.h
libetonyek::IWORKXMLContextBase::getState
State & getState()
Definition: IWORKXMLContextBase.h:43