ui-gxmlcpp
1.4.6
src
ui-gxmlcpp
XPathObject.hpp
Go to the documentation of this file.
1
10
#ifndef UI_GXML_XPATHOBJECT_HPP
11
#define UI_GXML_XPATHOBJECT_HPP
12
13
// STDC++
14
#include <string>
15
16
// C libraries
17
18
// C++ libraries
19
#include <
ui-gxmlcpp/Exception.hpp
>
20
#include <
ui-gxmlcpp/XPathContext.hpp
>
21
22
namespace
UI
{
23
namespace
GXML {
24
25
class
Tree;
26
28
class
XPathObject
:
private
UI::Util::auto_base<xmlXPathObject>
29
{
31
friend
class
XMLTree
;
32
friend
class
Tree
;
33
34
private
:
35
static
xmlXPathObjectPtr create(xmlXPathContextPtr
const
context, std::string
const
& xpath);
36
37
public
:
39
enum
ErrorCode
40
{
41
EvalError_,
// Error evaluation the xpath.
42
NotAString_,
// Value is not a string
43
NotABool_,
// Value is not a bool
44
NotAFloat_
// Value is not a float
45
};
47
typedef
CodeException<ErrorCode>
Exception
;
48
49
protected
:
51
XPathObject
(xmlXPathContextPtr
const
context, std::string
const
& xpath);
52
53
public
:
55
XPathObject
(
XPathContext
const
& context, std::string
const
& xpath);
56
57
~XPathObject
();
58
59
public
:
61
typedef
xmlXPathObjectType
Type
;
63
Type
getType
()
const
;
64
71
std::string getString()
const
;
72
double
getNumber()
const
;
73
bool
getBoolean()
const
;
77
using
UI::Util::auto_base<xmlXPathObject>::get;
78
using
UI::Util::auto_base<xmlXPathObject>::operator->;
79
80
private
:
81
std::string
const
xpath_;
82
};
83
84
}}
85
#endif
Exception.hpp
XPathContext.hpp
UI::GXML::CodeException
Adding code facility to Exception.
Definition
Exception.hpp:35
UI::GXML::Tree
XML tree.
Definition
Tree.hpp:31
UI::GXML::XPathContext
XPath context holder class.
Definition
XPathContext.hpp:35
UI::GXML::XPathObject
XPath object holder class.
Definition
XPathObject.hpp:29
UI::GXML::XPathObject::ErrorCode
ErrorCode
Error codes for exceptions.
Definition
XPathObject.hpp:40
UI::GXML::XPathObject::getType
Type getType() const
Get type of this xpath object.
Definition
XPathObject.cpp:58
UI::GXML::XPathObject::XMLTree
friend class XMLTree
Definition
XPathObject.hpp:31
UI::GXML::XPathObject::Type
xmlXPathObjectType Type
Abstract from libxml2 type.
Definition
XPathObject.hpp:61
UI::GXML::XPathObject::Exception
CodeException< ErrorCode > Exception
Exceptions for this class.
Definition
XPathObject.hpp:47
UI
Namespace for all Schlund+Partner Code.
Definition
Buffer.cpp:30
Generated on Wed Apr 24 2024 08:34:21 for ui-gxmlcpp by
1.9.8