LCOV - code coverage report
Current view: top level - jvmfwk/source - libxmlutil.hxx (source / functions) Hit Total Coverage
Test: commit c8344322a7af75b84dd3ca8f78b05543a976dfd5 Lines: 6 6 100.0 %
Date: 2015-06-13 12:38:46 Functions: 6 6 100.0 %
Legend: Lines: hit not hit

          Line data    Source code
       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_SOURCE_LIBXMLUTIL_HXX
      20             : #define INCLUDED_JVMFWK_SOURCE_LIBXMLUTIL_HXX
      21             : 
      22             : #include "libxml/parser.h"
      23             : #include "libxml/xpath.h"
      24             : #include "rtl/ustring.hxx"
      25             : 
      26             : namespace jfw
      27             : {
      28             : class CXPathObjectPtr
      29             : {
      30             :     xmlXPathObject* _object;
      31             :     CXPathObjectPtr & operator = (const CXPathObjectPtr&) SAL_DELETED_FUNCTION;
      32             :     CXPathObjectPtr(const CXPathObjectPtr&) SAL_DELETED_FUNCTION;
      33             : public:
      34             :     CXPathObjectPtr();
      35             :     ~CXPathObjectPtr();
      36             :     /** Takes ownership of xmlXPathObject
      37             :      */
      38             :     CXPathObjectPtr & operator = (xmlXPathObject* pObj);
      39        1534 :     xmlXPathObject* operator -> () { return _object;}
      40           1 :     operator xmlXPathObject* () const { return _object;}
      41             : };
      42             : 
      43             : 
      44             : class CXPathContextPtr
      45             : {
      46             :     xmlXPathContext* _object;
      47             : 
      48             :     CXPathContextPtr(const jfw::CXPathContextPtr&) SAL_DELETED_FUNCTION;
      49             :     CXPathContextPtr & operator = (const CXPathContextPtr&) SAL_DELETED_FUNCTION;
      50             : public:
      51             :     CXPathContextPtr();
      52             :     CXPathContextPtr(xmlXPathContextPtr aContext);
      53             :     CXPathContextPtr & operator = (xmlXPathContextPtr pObj);
      54             :     ~CXPathContextPtr();
      55             :     xmlXPathContext* operator -> () { return _object;}
      56         757 :     operator xmlXPathContext* () const { return _object;}
      57             : };
      58             : 
      59             : 
      60             : class CXmlDocPtr
      61             : {
      62             :     xmlDoc* _object;
      63             : 
      64             :     CXmlDocPtr(const CXmlDocPtr&) SAL_DELETED_FUNCTION;
      65             : 
      66             : public:
      67             :     CXmlDocPtr & operator = (const CXmlDocPtr&);
      68             :     CXmlDocPtr();
      69             :     CXmlDocPtr(xmlDoc* aDoc);
      70             :     /** Takes ownership of xmlDoc
      71             :      */
      72             :     CXmlDocPtr & operator = (xmlDoc* pObj);
      73             :     ~CXmlDocPtr();
      74             :     xmlDoc* operator -> () { return _object;}
      75         534 :     operator xmlDoc* () const { return _object;}
      76             : };
      77             : 
      78             : 
      79             : class CXmlCharPtr
      80             : {
      81             :     xmlChar* _object;
      82             : 
      83             :     CXmlCharPtr(const CXmlCharPtr&) SAL_DELETED_FUNCTION;
      84             :     CXmlCharPtr & operator = (const CXmlCharPtr&) SAL_DELETED_FUNCTION;
      85             : public:
      86             :     CXmlCharPtr();
      87             :     CXmlCharPtr(xmlChar* aDoc);
      88             :     CXmlCharPtr(const OUString &);
      89             :     ~CXmlCharPtr();
      90             :     CXmlCharPtr & operator = (xmlChar* pObj);
      91         103 :     operator xmlChar* () const { return _object;}
      92             :     operator OUString ();
      93         175 :     operator OString () { return OString(reinterpret_cast<sal_Char*>(_object));}
      94             : };
      95             : 
      96             : 
      97             : }
      98             : #endif
      99             : 
     100             : /* vim:set shiftwidth=4 softtabstop=4 expandtab: */

Generated by: LCOV version 1.11