Files
libreoffice/jvmfwk/source/libxmlutil.hxx

114 lines
3.2 KiB
C++
Raw Normal View History

/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2004-04-19 14:57:02 +00:00
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
2004-04-19 14:57:02 +00:00
*
* Copyright 2000, 2010 Oracle and/or its affiliates.
2004-04-19 14:57:02 +00:00
*
* OpenOffice.org - a multi-platform office productivity suite
2004-04-19 14:57:02 +00:00
*
* This file is part of OpenOffice.org.
2004-04-19 14:57:02 +00:00
*
* OpenOffice.org is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License version 3
* only, as published by the Free Software Foundation.
2004-04-19 14:57:02 +00:00
*
* OpenOffice.org is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Lesser General Public License version 3 for more details
* (a copy is included in the LICENSE file that accompanied this code).
2004-04-19 14:57:02 +00:00
*
* You should have received a copy of the GNU Lesser General Public License
* version 3 along with OpenOffice.org. If not, see
* <http://www.openoffice.org/license.html>
* for a copy of the LGPLv3 License.
2004-04-19 14:57:02 +00:00
*
************************************************************************/
#if !defined INCLUDED_JVMFWK_LIBXMLUTIL_HXX
#define INCLUDED_JVMFWK_LIBXMLUTIL_HXX
#include "libxml/parser.h"
#include "libxml/xpath.h"
#include "rtl/ustring.hxx"
namespace jfw
{
class CXPathObjectPtr
{
xmlXPathObject* _object;
CXPathObjectPtr & operator = (const CXPathObjectPtr&);
CXPathObjectPtr(const CXPathObjectPtr&);
public:
CXPathObjectPtr();
/** Takes ownership of xmlXPathObject
*/
CXPathObjectPtr(xmlXPathObject* aObject);
~CXPathObjectPtr();
/** Takes ownership of xmlXPathObject
*/
CXPathObjectPtr & operator = (xmlXPathObject* pObj);
xmlXPathObject* operator -> ();
operator xmlXPathObject* ();
};
//===========================================================
class CXPathContextPtr
{
xmlXPathContext* _object;
2004-04-27 14:22:15 +00:00
CXPathContextPtr(const jfw::CXPathContextPtr&);
2004-04-19 14:57:02 +00:00
CXPathContextPtr & operator = (const CXPathContextPtr&);
public:
CXPathContextPtr();
2004-04-27 14:22:15 +00:00
CXPathContextPtr(xmlXPathContextPtr aContext);
CXPathContextPtr & operator = (xmlXPathContextPtr pObj);
2004-04-19 14:57:02 +00:00
~CXPathContextPtr();
xmlXPathContext* operator -> ();
operator xmlXPathContext* ();
};
//===========================================================
class CXmlDocPtr
{
xmlDoc* _object;
CXmlDocPtr(const CXmlDocPtr&);
2004-04-19 14:57:02 +00:00
public:
CXmlDocPtr & operator = (const CXmlDocPtr&);
2004-04-19 14:57:02 +00:00
CXmlDocPtr();
CXmlDocPtr(xmlDoc* aDoc);
/** Takes ownership of xmlDoc
*/
CXmlDocPtr & operator = (xmlDoc* pObj);
~CXmlDocPtr();
xmlDoc* operator -> ();
operator xmlDoc* ();
};
//===========================================================
class CXmlCharPtr
{
xmlChar* _object;
CXmlCharPtr(const CXmlCharPtr&);
CXmlCharPtr & operator = (const CXmlCharPtr&);
public:
CXmlCharPtr();
CXmlCharPtr(xmlChar* aDoc);
CXmlCharPtr(const ::rtl::OUString &);
2004-04-19 14:57:02 +00:00
~CXmlCharPtr();
CXmlCharPtr & operator = (xmlChar* pObj);
2004-04-27 14:22:15 +00:00
// xmlChar* operator -> ();
2004-04-19 14:57:02 +00:00
operator xmlChar* ();
operator ::rtl::OUString ();
operator ::rtl::OString ();
2004-04-19 14:57:02 +00:00
};
}
#endif
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */