merge the formfield patch from ooo-build
[ooovba.git] / jvmfwk / source / libxmlutil.hxx
blob807459ec9d1e240e89412c2c5f7bb2a86f2ab5cf
1 /*************************************************************************
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4 *
5 * Copyright 2008 by Sun Microsystems, Inc.
7 * OpenOffice.org - a multi-platform office productivity suite
9 * $RCSfile: libxmlutil.hxx,v $
10 * $Revision: 1.5 $
12 * This file is part of OpenOffice.org.
14 * OpenOffice.org is free software: you can redistribute it and/or modify
15 * it under the terms of the GNU Lesser General Public License version 3
16 * only, as published by the Free Software Foundation.
18 * OpenOffice.org is distributed in the hope that it will be useful,
19 * but WITHOUT ANY WARRANTY; without even the implied warranty of
20 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
21 * GNU Lesser General Public License version 3 for more details
22 * (a copy is included in the LICENSE file that accompanied this code).
24 * You should have received a copy of the GNU Lesser General Public License
25 * version 3 along with OpenOffice.org. If not, see
26 * <http://www.openoffice.org/license.html>
27 * for a copy of the LGPLv3 License.
29 ************************************************************************/
30 #if !defined INCLUDED_JVMFWK_LIBXMLUTIL_HXX
31 #define INCLUDED_JVMFWK_LIBXMLUTIL_HXX
34 #include "libxml/parser.h"
35 #include "libxml/xpath.h"
36 //#include "libxml/xpathinternals.h"
37 #include "rtl/ustring.hxx"
38 namespace jfw
40 class CXPathObjectPtr
42 xmlXPathObject* _object;
43 CXPathObjectPtr & operator = (const CXPathObjectPtr&);
44 CXPathObjectPtr(const CXPathObjectPtr&);
45 public:
46 CXPathObjectPtr();
47 /** Takes ownership of xmlXPathObject
49 CXPathObjectPtr(xmlXPathObject* aObject);
50 ~CXPathObjectPtr();
51 /** Takes ownership of xmlXPathObject
53 CXPathObjectPtr & operator = (xmlXPathObject* pObj);
54 xmlXPathObject* operator -> ();
55 operator xmlXPathObject* ();
58 //===========================================================
59 class CXPathContextPtr
61 xmlXPathContext* _object;
63 CXPathContextPtr(const jfw::CXPathContextPtr&);
64 CXPathContextPtr & operator = (const CXPathContextPtr&);
65 public:
66 CXPathContextPtr();
67 CXPathContextPtr(xmlXPathContextPtr aContext);
68 CXPathContextPtr & operator = (xmlXPathContextPtr pObj);
69 ~CXPathContextPtr();
70 xmlXPathContext* operator -> ();
71 operator xmlXPathContext* ();
74 //===========================================================
75 class CXmlDocPtr
77 xmlDoc* _object;
79 CXmlDocPtr(const CXmlDocPtr&);
81 public:
82 CXmlDocPtr & operator = (const CXmlDocPtr&);
83 CXmlDocPtr();
84 CXmlDocPtr(xmlDoc* aDoc);
85 /** Takes ownership of xmlDoc
87 CXmlDocPtr & operator = (xmlDoc* pObj);
88 ~CXmlDocPtr();
89 xmlDoc* operator -> ();
90 operator xmlDoc* ();
93 //===========================================================
94 // class CXmlNsPtr
95 // {
96 // xmlNs* _object;
98 // CXmlNsPtr(const CXmlNsPtr&);
99 // CXmlNsPtr & operator = (const CXmlNsPtr&);
100 // public:
101 // CXmlNsPtr();
102 // CXmlNsPtr(xmlNs* aDoc);
103 // /** Takes ownership of xmlDoc
104 // */
105 // CXmlNsPtr & operator = (xmlNs* pObj);
106 // ~CXmlNsPtr();
107 // xmlNs* operator -> ();
108 // operator xmlNs* ();
109 // };
111 //===========================================================
112 class CXmlCharPtr
114 xmlChar* _object;
116 CXmlCharPtr(const CXmlCharPtr&);
117 CXmlCharPtr & operator = (const CXmlCharPtr&);
118 public:
119 CXmlCharPtr();
120 CXmlCharPtr(xmlChar* aDoc);
121 CXmlCharPtr(const ::rtl::OUString &);
122 ~CXmlCharPtr();
123 CXmlCharPtr & operator = (xmlChar* pObj);
124 // xmlChar* operator -> ();
125 operator xmlChar* ();
126 operator ::rtl::OUString ();
127 operator ::rtl::OString ();
132 #endif