LCOV - code coverage report
Current view: top level - usr/local/src/libreoffice/rsc/inc - rscclobj.hxx (source / functions) Hit Total Coverage
Test: libreoffice_filtered.info Lines: 14 14 100.0 %
Date: 2013-07-09 Functions: 10 11 90.9 %
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 _RSCCLOBJ_HXX
      20             : #define _RSCCLOBJ_HXX
      21             : 
      22             : #include <rsctree.hxx>
      23             : #include <rscdef.hxx>
      24             : #include <rscall.h>
      25             : 
      26             : /******************* O b j N o d e ***************************************/
      27       37784 : class ObjNode : public IdNode
      28             : {
      29             :     RscId       aRscId; // Id der Resource
      30             :     CLASS_DATA  pRscObj;// pointer to a resourceobject
      31             :     sal_uLong   lFileKey;// Dateischluessel
      32             : protected:
      33             :     using NameNode::Search;
      34             : 
      35             : public:
      36             :     using NameNode::Insert;
      37             : 
      38             :                 ObjNode( const RscId & rId, CLASS_DATA pData, sal_uLong lKey );
      39             :     ObjNode *   DelObjNode( RscTop * pClass, sal_uLong lFileKey );
      40             :     sal_uInt32  GetId() const;
      41       18892 :     RscId       GetRscId(){ return( aRscId ); }
      42       18947 :     sal_uLong   GetFileKey(){ return lFileKey; };
      43          11 :     ObjNode*    Search( const RscId &rName ) const //< search the index in the b-tree
      44             :                     {
      45          11 :                         return( (ObjNode *)IdNode::Search( rName ) );
      46             :                     }
      47       17619 :     bool        Insert( ObjNode* pTN ) //< insert a new node in the b-tree
      48             : 
      49             :                     {
      50       17619 :                         return( IdNode::Insert( (IdNode *)pTN ) );
      51             :                     }
      52       75576 :     CLASS_DATA  GetRscObj() //< get the Object from this Node
      53             : 
      54             :                     {
      55       75576 :                         return( pRscObj );
      56             :                     }
      57             :     bool        IsConsistent();
      58             : };
      59             : 
      60             : /******************* R e f N o d e ***************************************/
      61      168394 : class RefNode : public IdNode
      62             : {
      63             :     Atom        nTypNameId; // index of a Name in a hashtabel
      64             : protected:
      65             :     using NameNode::Search;
      66             : 
      67             : public:
      68             :     using NameNode::Insert;
      69             : 
      70             :     ObjNode*    pObjBiTree; // Zeiger auf Objektbaum
      71             :                 RefNode( Atom nTyp );
      72             :     sal_uInt32  GetId() const;
      73             :     RefNode*    Search( Atom typ ) const //< search the index in the b-tree
      74             :                     {
      75             :                         return( (RefNode *)IdNode::Search( typ ) );
      76             :                     }
      77       48828 :     bool        Insert( RefNode* pTN ) //< insert a new node in the b-tree
      78             :                     {
      79       48828 :                         return( IdNode::Insert( (IdNode *)pTN ) );
      80             :                     }
      81             :     bool        PutObjNode( ObjNode * pPutObject );
      82             : 
      83             :                 // insert new node in b-tree pObjBiTree
      84             :     ObjNode *   GetObjNode( const RscId &rRscId );
      85             : 
      86      148520 :     ObjNode *   GetObjNode()
      87             :                     {
      88             :                         // hole  pObjBiTree
      89      148520 :                         return( pObjBiTree );
      90             :                     }
      91             : };
      92             : 
      93             : #endif // _RSCCLOBJ_HXX
      94             : 
      95             : /* vim:set shiftwidth=4 softtabstop=4 expandtab: */

Generated by: LCOV version 1.10