Bump version to 21.06.18.1
[LibreOffice.git] / unoxml / source / xpath / xpathobject.hxx
blob8e20bbc5539962ce5a619aba6f49340c98e136a3
1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 /*
3 * This file is part of the LibreOffice project.
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/.
9 * This file incorporates work covered by the following license notice:
11 * Licensed to the Apache Software Foundation (ASF) under one or more
12 * contributor license agreements. See the NOTICE file distributed
13 * with this work for additional information regarding copyright
14 * ownership. The ASF licenses this file to you under the Apache
15 * License, Version 2.0 (the "License"); you may not use this file
16 * except in compliance with the License. You may obtain a copy of
17 * the License at http://www.apache.org/licenses/LICENSE-2.0 .
20 #ifndef INCLUDED_UNOXML_SOURCE_XPATH_XPATHOBJECT_HXX
21 #define INCLUDED_UNOXML_SOURCE_XPATH_XPATHOBJECT_HXX
23 #include <memory>
25 #include <libxml/xpath.h>
27 #include <sal/types.h>
28 #include <rtl/ref.hxx>
30 #include <cppuhelper/implbase.hxx>
32 #include <com/sun/star/uno/Reference.h>
33 #include <com/sun/star/xml/dom/XNodeList.hpp>
34 #include <com/sun/star/xml/xpath/XXPathObject.hpp>
36 #include "../dom/document.hxx"
38 namespace DOM {
39 class CDocument;
42 namespace XPath
44 class CXPathObject : public cppu::WeakImplHelper< css::xml::xpath::XXPathObject >
46 private:
47 ::rtl::Reference< DOM::CDocument > const m_pDocument;
48 ::osl::Mutex & m_rMutex;
49 std::shared_ptr<xmlXPathObject> const m_pXPathObj;
50 css::xml::xpath::XPathObjectType const m_XPathObjectType;
52 public:
53 CXPathObject( ::rtl::Reference<DOM::CDocument> const& pDocument,
54 ::osl::Mutex & rMutex,
55 std::shared_ptr<xmlXPathObject> const& pXPathObj);
57 /**
58 get object type
60 virtual css::xml::xpath::XPathObjectType SAL_CALL getObjectType() override;
62 /**
63 get the nodes from a nodelist type object
65 virtual css::uno::Reference< css::xml::dom::XNodeList > SAL_CALL getNodeList() override;
67 /**
68 get value of a boolean object
70 virtual sal_Bool SAL_CALL getBoolean() override;
72 /**
73 get number as byte
75 virtual sal_Int8 SAL_CALL getByte() override;
77 /**
78 get number as short
80 virtual sal_Int16 SAL_CALL getShort() override;
82 /**
83 get number as long
85 virtual sal_Int32 SAL_CALL getLong() override;
87 /**
88 get number as hyper
90 virtual sal_Int64 SAL_CALL getHyper() override;
92 /**
93 get number as float
95 virtual float SAL_CALL getFloat() override;
97 /**
98 get number as double
100 virtual double SAL_CALL getDouble() override;
103 get string value
105 virtual OUString SAL_CALL getString() override;
110 #endif
112 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */