LCOV - code coverage report
Current view: top level - rsc/inc - rscarray.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             : 
      20             : #ifndef INCLUDED_RSC_INC_RSCARRAY_HXX
      21             : #define INCLUDED_RSC_INC_RSCARRAY_HXX
      22             : 
      23             : #include <rscall.h>
      24             : #include <rscerror.h>
      25             : #include <rsctop.hxx>
      26             : 
      27             : class RscEnum;
      28             : 
      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             :     virtual ~RscInstNode();
      38             :     virtual sal_uInt32  GetId() const SAL_OVERRIDE;
      39       46730 :     RscInstNode *   Left() const { return static_cast<RscInstNode *>(pLeft); };
      40       46730 :     RscInstNode *   Right() const{ return static_cast<RscInstNode *>(pRight); };
      41       15628 :     RscInstNode *   Search( sal_uInt32 nId ) const
      42             :                         {
      43       15628 :                             return static_cast<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             :                     virtual ~RscArray();
      68             :     virtual RSCCLASS_TYPE   GetClassType() const SAL_OVERRIDE;
      69             : 
      70             :     void            SetTypeClass( RscEnum * pClass ) { pTypeClass = pClass; }
      71             :     virtual RscTop *    GetTypeClass() const SAL_OVERRIDE;
      72             :     RSCINST         Create( RSCINST * pInst, const RSCINST & rDflt, bool ) SAL_OVERRIDE;
      73             :     void            Destroy( const RSCINST & rInst ) SAL_OVERRIDE;
      74             :     virtual ERRTYPE GetValueEle( const RSCINST & rInst, sal_Int32 lValue,
      75             :                                  RscTop * pCreateClass,
      76             :                                  RSCINST * pGetInst ) SAL_OVERRIDE;
      77             :     virtual ERRTYPE GetArrayEle( const RSCINST & rInst, Atom nId,
      78             :                                  RscTop * pCreateClass,
      79             :                                  RSCINST * pGetInst ) SAL_OVERRIDE;
      80             : 
      81             :                     // Gibt die Groesse der Klasse in Bytes
      82       48037 :     sal_uInt32      Size() SAL_OVERRIDE { return nSize; }
      83             : 
      84             :     bool            IsConsistent( const RSCINST & rInst ) SAL_OVERRIDE;
      85             :     virtual void    SetToDefault( const RSCINST & rInst ) SAL_OVERRIDE;
      86             :     bool            IsDefault( const RSCINST & rInst ) SAL_OVERRIDE;
      87             :     bool            IsValueDefault( const RSCINST & rInst, CLASS_DATA pDef ) SAL_OVERRIDE;
      88             : 
      89             :     virtual void    WriteSrcHeader( const RSCINST & rInst, FILE * fOutput,
      90             :                                     RscTypCont * pTC, sal_uInt32 nTab,
      91             :                                     const RscId & aId, const char * ) SAL_OVERRIDE;
      92             :     void            WriteSrc( const RSCINST & rInst, FILE * fOutput,
      93             :                               RscTypCont * pTC, sal_uInt32 nTab, const char * ) SAL_OVERRIDE;
      94             :     ERRTYPE         WriteRc( const RSCINST & rInst, RscWriteRc & aMem,
      95             :                              RscTypCont * pTC, sal_uInt32, bool bExtra ) SAL_OVERRIDE;
      96             : };
      97             : 
      98             : class RscClassArray : public RscArray
      99             : {
     100             : public:
     101             :                     RscClassArray( Atom nId, sal_uInt32 nTypId,
     102             :                                    RscTop * pSuper, RscEnum * pTypeClass );
     103             :                     virtual ~RscClassArray();
     104             :     virtual void    WriteSrcHeader( const RSCINST & rInst, FILE * fOutput,
     105             :                                     RscTypCont * pTC, sal_uInt32 nTab,
     106             :                                     const RscId & aId, const char * ) SAL_OVERRIDE;
     107             :     void            WriteSrc( const RSCINST & rInst, FILE * fOutput,
     108             :                               RscTypCont * pTC, sal_uInt32 nTab, const char * ) SAL_OVERRIDE;
     109             :     virtual ERRTYPE WriteRcHeader( const RSCINST & rInst, RscWriteRc & aMem,
     110             :                                    RscTypCont * pTC, const RscId & aId,
     111             :                                    sal_uInt32 nDeep, bool bExtra ) SAL_OVERRIDE;
     112             : };
     113             : 
     114             : 
     115        1668 : class RscLangArray : public RscArray
     116             : {
     117             : public:
     118             :                     RscLangArray( Atom nId, sal_uInt32 nTypId,
     119             :                                   RscTop * pSuper, RscEnum * pTypeClass );
     120             :     virtual RSCCLASS_TYPE   GetClassType() const SAL_OVERRIDE;
     121             : };
     122             : 
     123             : #endif // INCLUDED_RSC_INC_RSCARRAY_HXX
     124             : 
     125             : /* vim:set shiftwidth=4 softtabstop=4 expandtab: */

Generated by: LCOV version 1.11