LibreOffice Module unoxml (master) 1
xpathobject.hxx
Go to the documentation of this file.
1/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2/*
3 * This file is part of the LibreOffice 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 * This file incorporates work covered by the following license notice:
10 *
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 .
18 */
19
20#pragma once
21
22#include <memory>
23
24#include <libxml/xpath.h>
25
26#include <sal/types.h>
27#include <rtl/ref.hxx>
28
30
31#include <com/sun/star/uno/Reference.h>
32#include <com/sun/star/xml/dom/XNodeList.hpp>
33#include <com/sun/star/xml/xpath/XXPathObject.hpp>
34
35#include "../dom/document.hxx"
36
37namespace DOM {
38 class CDocument;
39}
40
41namespace XPath
42{
43 class CXPathObject : public cppu::WeakImplHelper< css::xml::xpath::XXPathObject >
44 {
45 private:
47 ::osl::Mutex & m_rMutex;
48 std::shared_ptr<xmlXPathObject> const m_pXPathObj;
49 css::xml::xpath::XPathObjectType const m_XPathObjectType;
50
51 public:
53 ::osl::Mutex & rMutex,
54 std::shared_ptr<xmlXPathObject> const& pXPathObj);
55
59 virtual css::xml::xpath::XPathObjectType SAL_CALL getObjectType() override;
60
64 virtual css::uno::Reference< css::xml::dom::XNodeList > SAL_CALL getNodeList() override;
65
69 virtual sal_Bool SAL_CALL getBoolean() override;
70
74 virtual sal_Int8 SAL_CALL getByte() override;
75
79 virtual sal_Int16 SAL_CALL getShort() override;
80
84 virtual sal_Int32 SAL_CALL getLong() override;
85
89 virtual sal_Int64 SAL_CALL getHyper() override;
90
94 virtual float SAL_CALL getFloat() override;
95
99 virtual double SAL_CALL getDouble() override;
100
104 virtual OUString SAL_CALL getString() override;
105
106 };
107}
108
109/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
std::shared_ptr< xmlXPathObject > const m_pXPathObj
Definition: xpathobject.hxx:48
virtual sal_Int64 SAL_CALL getHyper() override
get number as hyper
virtual sal_Int8 SAL_CALL getByte() override
get number as byte
virtual sal_Bool SAL_CALL getBoolean() override
get value of a boolean object
css::xml::xpath::XPathObjectType const m_XPathObjectType
Definition: xpathobject.hxx:49
virtual OUString SAL_CALL getString() override
get string value
virtual sal_Int32 SAL_CALL getLong() override
get number as long
virtual double SAL_CALL getDouble() override
get number as double
virtual sal_Int16 SAL_CALL getShort() override
get number as short
CXPathObject(::rtl::Reference< DOM::CDocument > pDocument, ::osl::Mutex &rMutex, std::shared_ptr< xmlXPathObject > const &pXPathObj)
Definition: xpathobject.cxx:66
::osl::Mutex & m_rMutex
Definition: xpathobject.hxx:47
::rtl::Reference< DOM::CDocument > const m_pDocument
Definition: xpathobject.hxx:46
virtual css::uno::Reference< css::xml::dom::XNodeList > SAL_CALL getNodeList() override
get the nodes from a nodelist type object
Definition: xpathobject.cxx:89
virtual float SAL_CALL getFloat() override
get number as float
virtual css::xml::xpath::XPathObjectType SAL_CALL getObjectType() override
get object type
Definition: xpathobject.cxx:80
Definition: attr.cxx:38
unsigned char sal_Bool
signed char sal_Int8