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

Generated by: LCOV version 1.10