IWORKNumberConverter.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 IWORKNUMBERCONVERTER_H_INCLUDED
11 #define IWORKNUMBERCONVERTER_H_INCLUDED
12 
13 #include <boost/optional.hpp>
14 
15 #include "IWORKEnum.h"
16 
17 namespace libetonyek
18 {
19 
20 #define IWORK_DECLARE_NUMBER_CONVERTER(type) \
21 template<> \
22 struct IWORKNumberConverter<type> \
23 { \
24 static boost::optional<type> convert (const char *value); \
25 }
26 
27 template<typename T>
29 {
30  static boost::optional<T> convert(const char *value);
31 };
32 
40 
41 }
42 
43 #endif // IWORKNUMBERCONVERTER_H_INCLUDED
44 
45 /* vim:set shiftwidth=2 softtabstop=2 expandtab: */
Definition: IWORKBezierElement.cpp:18
static boost::optional< T > convert(const char *value)
Definition: IWORKNumberConverter.cpp:20
IWORKCapitalization
Definition: IWORKEnum.h:48
IWORKBaseline
Definition: IWORKEnum.h:24
IWORK_DECLARE_NUMBER_CONVERTER(bool)
IWORKAlignment
Definition: IWORKEnum.h:16
IWORKBorderType
Definition: IWORKEnum.h:31
Definition: IWORKNumberConverter.h:28

Generated for libetonyek by doxygen 1.8.11