LibreOffice Module jvmfwk (master)
1
jvmfwk
inc
libxmlutil.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
#ifndef INCLUDED_JVMFWK_INC_LIBXMLUTIL_HXX
20
#define INCLUDED_JVMFWK_INC_LIBXMLUTIL_HXX
21
22
#include <
sal/config.h
>
23
24
#include <string_view>
25
26
#include <libxml/parser.h>
27
#include <libxml/xpath.h>
28
#include <rtl/ustring.hxx>
29
30
namespace
jfw
31
{
32
class
CXPathObjectPtr
33
{
34
xmlXPathObject*
_object
;
35
CXPathObjectPtr
&
operator=
(
const
CXPathObjectPtr
&) =
delete
;
36
CXPathObjectPtr
(
const
CXPathObjectPtr
&) =
delete
;
37
38
public
:
39
CXPathObjectPtr
();
40
CXPathObjectPtr
(xmlXPathObject*);
41
~CXPathObjectPtr
();
44
CXPathObjectPtr
&
operator=
(xmlXPathObject* pObj);
45
xmlXPathObject*
operator->
() {
return
_object
; }
46
operator
xmlXPathObject*()
const
{
return
_object
; }
47
};
48
49
class
CXPathContextPtr
50
{
51
xmlXPathContext*
_object
;
52
53
CXPathContextPtr
(
const
jfw::CXPathContextPtr
&) =
delete
;
54
CXPathContextPtr
&
operator=
(
const
CXPathContextPtr
&) =
delete
;
55
56
public
:
57
CXPathContextPtr
();
58
CXPathContextPtr
(xmlXPathContextPtr aContext);
59
CXPathContextPtr
&
operator=
(xmlXPathContextPtr pObj);
60
~CXPathContextPtr
();
61
operator
xmlXPathContext*()
const
{
return
_object
; }
62
};
63
64
class
CXmlDocPtr
65
{
66
xmlDoc*
_object
;
67
68
CXmlDocPtr
(
const
CXmlDocPtr
&) =
delete
;
69
70
public
:
71
CXmlDocPtr
&
operator=
(
const
CXmlDocPtr
&);
72
CXmlDocPtr
();
73
CXmlDocPtr
(xmlDoc* aDoc);
76
CXmlDocPtr
&
operator=
(xmlDoc* pObj);
77
~CXmlDocPtr
();
78
operator
xmlDoc*()
const
{
return
_object
; }
79
};
80
81
class
CXmlCharPtr
82
{
83
xmlChar*
_object
;
84
85
CXmlCharPtr
(
const
CXmlCharPtr
&) =
delete
;
86
CXmlCharPtr
&
operator=
(
const
CXmlCharPtr
&) =
delete
;
87
88
public
:
89
CXmlCharPtr
();
90
CXmlCharPtr
(xmlChar* aDoc);
91
explicit
CXmlCharPtr
(std::u16string_view);
92
~CXmlCharPtr
();
93
CXmlCharPtr
&
operator=
(xmlChar* pObj);
94
operator
xmlChar*()
const
{
return
_object
; }
95
operator
OUString();
96
operator
OString() {
return
reinterpret_cast<
char
*
>
(
_object
); }
97
};
98
}
99
#endif
100
101
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
jfw::CXPathContextPtr
Definition:
libxmlutil.hxx:50
jfw::CXPathContextPtr::operator=
CXPathContextPtr & operator=(const CXPathContextPtr &)=delete
jfw::CXPathContextPtr::CXPathContextPtr
CXPathContextPtr(const jfw::CXPathContextPtr &)=delete
jfw::CXPathContextPtr::~CXPathContextPtr
~CXPathContextPtr()
Definition:
libxmlutil.cxx:54
jfw::CXPathContextPtr::CXPathContextPtr
CXPathContextPtr()
Definition:
libxmlutil.cxx:50
jfw::CXPathContextPtr::_object
xmlXPathContext * _object
Definition:
libxmlutil.hxx:51
jfw::CXPathObjectPtr
Definition:
libxmlutil.hxx:33
jfw::CXPathObjectPtr::~CXPathObjectPtr
~CXPathObjectPtr()
Definition:
libxmlutil.cxx:31
jfw::CXPathObjectPtr::CXPathObjectPtr
CXPathObjectPtr()
Definition:
libxmlutil.cxx:25
jfw::CXPathObjectPtr::operator=
CXPathObjectPtr & operator=(const CXPathObjectPtr &)=delete
jfw::CXPathObjectPtr::operator->
xmlXPathObject * operator->()
Definition:
libxmlutil.hxx:45
jfw::CXPathObjectPtr::CXPathObjectPtr
CXPathObjectPtr(const CXPathObjectPtr &)=delete
jfw::CXPathObjectPtr::_object
xmlXPathObject * _object
Definition:
libxmlutil.hxx:34
jfw::CXmlCharPtr
Definition:
libxmlutil.hxx:82
jfw::CXmlCharPtr::CXmlCharPtr
CXmlCharPtr()
Definition:
libxmlutil.cxx:103
jfw::CXmlCharPtr::operator=
CXmlCharPtr & operator=(const CXmlCharPtr &)=delete
jfw::CXmlCharPtr::CXmlCharPtr
CXmlCharPtr(const CXmlCharPtr &)=delete
jfw::CXmlCharPtr::_object
xmlChar * _object
Definition:
libxmlutil.hxx:83
jfw::CXmlCharPtr::~CXmlCharPtr
~CXmlCharPtr()
Definition:
libxmlutil.cxx:107
jfw::CXmlDocPtr
Definition:
libxmlutil.hxx:65
jfw::CXmlDocPtr::CXmlDocPtr
CXmlDocPtr(const CXmlDocPtr &)=delete
jfw::CXmlDocPtr::operator=
CXmlDocPtr & operator=(const CXmlDocPtr &)
jfw::CXmlDocPtr::~CXmlDocPtr
~CXmlDocPtr()
Definition:
libxmlutil.cxx:78
jfw::CXmlDocPtr::CXmlDocPtr
CXmlDocPtr()
Definition:
libxmlutil.cxx:74
jfw::CXmlDocPtr::_object
xmlDoc * _object
Definition:
libxmlutil.hxx:66
config.h
jfw
Definition:
elements.cxx:47
Generated on Sun Jul 30 2023 04:26:53 for LibreOffice Module jvmfwk (master) by
1.9.3