LCOV - code coverage report
Current view: top level - libreoffice/rsc/inc - rscarray.hxx (source / functions) Hit Total Coverage
Test: libreoffice_filtered.info Lines: 6 6 100.0 %
Date: 2012-12-27 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 _RSCARRAY_HXX
      20             : #define _RSCARRAY_HXX
      21             : 
      22             : #include <rscall.h>
      23             : #include <rscerror.h>
      24             : #include <rsctop.hxx>
      25             : 
      26             : class RscEnum;
      27             : 
      28             : /******************* R s c A r r a y ************************************/
      29             : class RscInstNode : public IdNode
      30             : {
      31             :     sal_uInt32  nTypeId;
      32             : protected:
      33             :     using NameNode::Search;
      34             : public:
      35             :     RSCINST aInst;
      36             :     RscInstNode( sal_uInt32 nId );
      37             :     ~RscInstNode();
      38             :     virtual sal_uInt32  GetId() const;
      39       63219 :     RscInstNode *   Left() const { return (RscInstNode *)pLeft  ; };
      40       63216 :     RscInstNode *   Right() const{ return (RscInstNode *)pRight ; };
      41       21098 :     RscInstNode *   Search( sal_uInt32 nId ) const
      42             :                     {
      43       21098 :                         return (RscInstNode *)IdNode::Search( nId );
      44             :                     }
      45             : };
      46             : 
      47             : struct RscArrayInst
      48             : {
      49             :     RscInstNode *   pNode;
      50             : };
      51             : 
      52             : /* Der Baum wird ueber die Werte des Enums sortiert, nicht ueber
      53             :     seine HashId.
      54             : */
      55             : class RscArray : public RscTop
      56             : {
      57             : protected:
      58             :     RscEnum *       pTypeClass; // Typ der Eintraege
      59             :     sal_uInt32          nSize;      // Groesse der Instanzdaten dieser Klasse
      60             :                                 // mit Superklassen
      61             :     sal_uInt32          nOffInstData;// Offset auf eigen Instanzdaten
      62             :     void            WriteSrcArray( const RSCINST & rInst, FILE * fOutput,
      63             :                                   RscTypCont * pTC, sal_uInt32 nTab, const char * );
      64             : public:
      65             :                     RscArray( Atom nId, sal_uInt32 nTypId,
      66             :                                 RscTop * pSuper, RscEnum * pTypeClass );
      67             :                     ~RscArray();
      68             :     virtual RSCCLASS_TYPE   GetClassType() const;
      69             : 
      70             :     void            SetTypeClass( RscEnum * pClass )
      71             :                     {
      72             :                         pTypeClass = pClass;
      73             :                     }
      74             :     virtual RscTop *    GetTypeClass() const;
      75             :     RSCINST         Create( RSCINST * pInst, const RSCINST & rDflt, sal_Bool );
      76             :     void            Destroy( const RSCINST & rInst );
      77             :     virtual ERRTYPE GetValueEle( const RSCINST & rInst, sal_Int32 lValue,
      78             :                                 RscTop * pCreateClass,
      79             :                                 RSCINST * pGetInst );
      80             :     virtual ERRTYPE GetArrayEle( const RSCINST & rInst, Atom nId,
      81             :                                 RscTop * pCreateClass,
      82             :                                 RSCINST * pGetInst );
      83             : 
      84             :                     // Gibt die Groesse der Klasse in Bytes
      85       80177 :     sal_uInt32          Size(){ return( nSize ); };
      86             : 
      87             :     sal_Bool            IsConsistent( const RSCINST & rInst );
      88             :     virtual void    SetToDefault( const RSCINST & rInst );
      89             :     sal_Bool            IsDefault( const RSCINST & rInst );
      90             :     sal_Bool            IsValueDefault( const RSCINST & rInst, CLASS_DATA pDef );
      91             : 
      92             :     virtual void    WriteSrcHeader( const RSCINST & rInst, FILE * fOutput,
      93             :                                     RscTypCont * pTC, sal_uInt32 nTab,
      94             :                                     const RscId & aId, const char * );
      95             :     void            WriteSrc( const RSCINST & rInst, FILE * fOutput,
      96             :                               RscTypCont * pTC, sal_uInt32 nTab, const char * );
      97             :     ERRTYPE         WriteRc( const RSCINST & rInst, RscWriteRc & aMem,
      98             :                              RscTypCont * pTC, sal_uInt32, sal_Bool bExtra );
      99             :     virtual void    WriteRcAccess( FILE * fOutput, RscTypCont * pTC,
     100             :                                     const char * );
     101             : };
     102             : 
     103             : class RscClassArray : public RscArray
     104             : {
     105             : public:
     106             :                     RscClassArray( Atom nId, sal_uInt32 nTypId,
     107             :                                 RscTop * pSuper, RscEnum * pTypeClass );
     108             :                     ~RscClassArray();
     109             :     virtual void    WriteSrcHeader( const RSCINST & rInst, FILE * fOutput,
     110             :                                     RscTypCont * pTC, sal_uInt32 nTab,
     111             :                                     const RscId & aId, const char * );
     112             :     void            WriteSrc( const RSCINST & rInst, FILE * fOutput,
     113             :                               RscTypCont * pTC, sal_uInt32 nTab, const char * );
     114             :     virtual ERRTYPE WriteRcHeader( const RSCINST & rInst, RscWriteRc & aMem,
     115             :                                    RscTypCont * pTC, const RscId & aId,
     116             :                                     sal_uInt32 nDeep, sal_Bool bExtra );
     117             : };
     118             : 
     119             : 
     120        2764 : class RscLangArray : public RscArray
     121             : {
     122             : public:
     123             :                     RscLangArray( Atom nId, sal_uInt32 nTypId,
     124             :                                 RscTop * pSuper, RscEnum * pTypeClass );
     125             :     virtual RSCCLASS_TYPE   GetClassType() const;
     126             : };
     127             : 
     128             : #endif //_RSCARRAY
     129             : 
     130             : /* vim:set shiftwidth=4 softtabstop=4 expandtab: */

Generated by: LCOV version 1.10