ui-gxmlcpp 1.4.6
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
21
22namespace UI {
23namespace GXML {
24
25class Tree;
26
28class XPathObject: private UI::Util::auto_base<xmlXPathObject>
29{
31 friend class XMLTree;
32 friend class Tree;
33
34private:
35 static xmlXPathObjectPtr create(xmlXPathContextPtr const context, std::string const & xpath);
36
37public:
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 };
48
49protected:
51 XPathObject(xmlXPathContextPtr const context, std::string const & xpath);
52
53public:
55 XPathObject(XPathContext const & context, std::string const & xpath);
56
58
59public:
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
80private:
81 std::string const xpath_;
82};
83
84}}
85#endif
Adding code facility to Exception.
Definition Exception.hpp:35
XML tree.
Definition Tree.hpp:31
XPath context holder class.
Definition XPathContext.hpp:35
XPath object holder class.
Definition XPathObject.hpp:29
ErrorCode
Error codes for exceptions.
Definition XPathObject.hpp:40
Type getType() const
Get type of this xpath object.
Definition XPathObject.cpp:58
friend class XMLTree
Definition XPathObject.hpp:31
xmlXPathObjectType Type
Abstract from libxml2 type.
Definition XPathObject.hpp:61
CodeException< ErrorCode > Exception
Exceptions for this class.
Definition XPathObject.hpp:47
Namespace for all Schlund+Partner Code.
Definition Buffer.cpp:30