1 /*
2  * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
3  * Copyright (C) 2012 - Scilab Enterprises - Calixte DENIZET
4  *
5  * Copyright (C) 2012 - 2016 - Scilab Enterprises
6  *
7  * This file is hereby licensed under the terms of the GNU GPL v2.0,
8  * pursuant to article 5.3.4 of the CeCILL v.2.1.
9  * This file was originally licensed under the terms of the CeCILL v2.1,
10  * and continues to be available under such terms.
11  * For more information, see the COPYING file which you should have received
12  * along with this program.
13  *
14  */
15 
16 #ifndef __XMLXPATH_HXX__
17 #define __XMLXPATH_HXX__
18 
19 #include "xml.h"
20 
21 namespace org_modules_xml
22 {
23 class XMLDocument;
24 class XMLObject;
25 class XMLNodeSet;
26 
27 class XMLXPath: public XMLObject
28 {
29     const XMLDocument & doc;
30     xmlXPathObject *xpath;
31 
32 public:
33     XMLXPath(const XMLDocument & doc, xmlXPathObject * xpath);
34     ~XMLXPath();
35 
36     void *getRealXMLPointer() const;
37 
getBooleanValue() const38     int getBooleanValue() const
39     {
40         return xpath->boolval;
41     }
getFloatValue() const42     double getFloatValue() const
43     {
44         return xpath->floatval;
45     }
getStringValue() const46     const char *getStringValue() const
47     {
48         return (const char *)xpath->stringval;
49     }
getResultType() const50     int getResultType() const
51     {
52         return xpath->type;
53     }
54     const XMLNodeSet *getNodeSet() const;
55     const XMLObject *getXMLObjectParent() const;
56 
57 };
58 }
59 
60 #endif
61