libetonyek_xml.h Source File documentation

libetonyek_xml.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 LIBETONYEK_XML_H_INCLUDED
11 #define LIBETONYEK_XML_H_INCLUDED
12
13 #include <string>
14
15 #include <boost/optional.hpp>
16
17 #include "libetonyek_utils.h"
18
19 extern "C" int readFromStream(void *context, char *buffer, int len);
20
21 extern "C" int closeStream(void * /* context */);
22
23 namespace libetonyek
24 {
25
31 bool bool_cast(const char *value);
32 boost::optional<bool> try_bool_cast(const char *value);
33
34 double double_cast(const char *value);
35 boost::optional<double> try_double_cast(const char *value);
36
37 int int_cast(const char *value);
38 boost::optional<int> try_int_cast(const char *value);
39
40 const char *char_cast(const char *c);
41 const char *char_cast(const signed char *c);
42 const char *char_cast(const unsigned char *c);
43
44 }
45
46 #endif // LIBETONYEK_XML_H_INCLUDED
47
48 /* vim:set shiftwidth=2 softtabstop=2 expandtab: */
libetonyek::double_cast
double double_cast(const char *value)
Definition: libetonyek_xml.cpp:79
libetonyek::try_double_cast
boost::optional< double > try_double_cast(const char *value)
Definition: libetonyek_xml.cpp:84
libetonyek
Definition: IWORKBezierElement.cpp:20
libetonyek::IWORKToken::none
@ none
Definition: IWORKToken.h:666
IWORKTokenizer.h
libetonyek::IWORKTokenizer
Definition: IWORKTokenizer.h:16
closeStream
int closeStream(void *)
Definition: libetonyek_xml.cpp:48
ETONYEK_DEBUG_MSG
#define ETONYEK_DEBUG_MSG(M)
Definition: libetonyek_utils.h:54
libetonyek::try_int_cast
boost::optional< int > try_int_cast(const char *value)
Definition: libetonyek_xml.cpp:99
libetonyek::try_bool_cast
boost::optional< bool > try_bool_cast(const char *value)
Definition: libetonyek_xml.cpp:61
libetonyek::char_cast
const char * char_cast(const char *const c)
Definition: libetonyek_xml.cpp:109
libetonyek::IWORKToken::c
@ c
Definition: IWORKToken.h:509
libetonyek::bool_cast
bool bool_cast(const char *value)
Convert string value to bool.
Definition: libetonyek_xml.cpp:56
readFromStream
int readFromStream(void *context, char *buffer, int len)
Definition: libetonyek_xml.cpp:29
closeStream
int closeStream(void *)
Definition: libetonyek_xml.cpp:48
libetonyek::IWORKToken::true_
@ true_
Definition: IWORKToken.h:676
libetonyek::IWORKToken::_0
@ _0
Definition: IWORKToken.h:640
libetonyek::IWORKToken::string
@ string
Definition: IWORKToken.h:411
libetonyek_utils.h
libetonyek::IWORKTokenizer::getId
virtual int getId(const char *name) const =0
libetonyek::IWORKToken::_1
@ _1
Definition: IWORKToken.h:641
libetonyek::int_cast
int int_cast(const char *value)
Definition: libetonyek_xml.cpp:94
IWORKToken.h
libetonyek::IWORKToken::false_
@ false_
Definition: IWORKToken.h:657
libetonyek::get
const ValueT & get(const detail::IWAFieldImpl< TagV, ValueT, Reader > &field)
Definition: IWAField.h:190
libetonyek::IWORKToken::getTokenizer
const IWORKTokenizer & getTokenizer()
Definition: IWORKToken.cpp:57
libetonyek::IWORKToken::value
@ value
Definition: IWORKToken.h:624
readFromStream
int readFromStream(void *context, char *buffer, int len)
Definition: libetonyek_xml.cpp:29
libetonyek_xml.h