LCOV - code coverage report
Current view: top level - rsc/inc - rsccont.hxx (source / functions) Hit Total Coverage
Test: commit c8344322a7af75b84dd3ca8f78b05543a976dfd5 Lines: 9 10 90.0 %
Date: 2015-06-13 12:38:46 Functions: 8 12 66.7 %
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_RSC_INC_RSCCONT_HXX
      20             : #define INCLUDED_RSC_INC_RSCCONT_HXX
      21             : 
      22             : #include <rscall.h>
      23             : #include <rscerror.h>
      24             : #include <rsctop.hxx>
      25             : 
      26           0 : struct ENTRY_STRUCT
      27             : {
      28             :     RscId   aName;
      29             :     RSCINST aInst;
      30       40788 :     void Create(){ aName.Create(); aInst = RSCINST(); }
      31             :     void Destroy();
      32             : };
      33             : struct RscBaseContInst
      34             : {
      35             :     sal_uInt32          nEntries;
      36             :     ENTRY_STRUCT *  pEntries;
      37             :     bool            bDflt;
      38             : };
      39             : 
      40             : class RscBaseCont : public RscTop
      41             : {
      42             : protected:
      43             :     RscTop *        pTypeClass; // Typ der Eintraege
      44             :     RscTop *        pTypeClass1;// Zwei verschiedene Typen moeglich
      45             :     bool            bNoId;      // Keine Identifier
      46             :     sal_uInt32      nSize;      // Groesse der Instanzdaten dieser Klasse
      47             :                                 // mit Superklassen
      48             :     sal_uInt32      nOffInstData;// Offset auf eigen Instanzdaten
      49             :     static void     DestroyElements( RscBaseContInst * pClassData );
      50             :     RSCINST         SearchElePos( const RSCINST & rInst, const RscId & rEleName,
      51             :                                   RscTop * pClass, sal_uInt32 nPos );
      52             : protected:
      53             :     void            ContWriteSrc( const RSCINST & rInst, FILE * fOutput,
      54             :                                   RscTypCont * pTC, sal_uInt32 nTab, const char * );
      55             :     ERRTYPE         ContWriteRc( const RSCINST & rInst, RscWriteRc & aMem,
      56             :                                  RscTypCont * pTC, sal_uInt32, bool bExtra );
      57             : public:
      58             :                     RscBaseCont( Atom nId, sal_uInt32 nTypId,
      59             :                                  RscTop * pSuper = NULL,
      60             :                                  bool bNoId = true );
      61             :                     virtual ~RscBaseCont();
      62             :     virtual RSCCLASS_TYPE   GetClassType() const SAL_OVERRIDE;
      63        4170 :     void            SetTypeClass( RscTop * pClass, RscTop * pClass1 = NULL )
      64             :                         {
      65        4170 :                             pTypeClass = pClass;
      66        4170 :                             pTypeClass1 = pClass1;
      67        4170 :                         }
      68             :     RSCINST         Create( RSCINST * pInst, const RSCINST & rDflt, bool ) SAL_OVERRIDE;
      69             :     void            Destroy( const RSCINST & rInst ) SAL_OVERRIDE;
      70             :     ERRTYPE         GetElement( const RSCINST & rInst, const RscId & rEleName,
      71             :                                 RscTop * pCreateClass, const RSCINST & rCreateInst,
      72             :                                 RSCINST * pGetInst ) SAL_OVERRIDE;
      73             :     RSCINST         SearchEle( const RSCINST & rInst, const RscId & rEleName,
      74             :                                RscTop * pClass ) SAL_OVERRIDE;
      75             :     sal_uInt32          GetCount( const RSCINST & rInst ) SAL_OVERRIDE;
      76             :     RSCINST         GetPosEle( const RSCINST & rInst, sal_uInt32 nPos ) SAL_OVERRIDE;
      77             :     ERRTYPE         MovePosEle( const RSCINST & rInst, sal_uInt32 nDestPos,
      78             :                                 sal_uInt32 nSourcePos ) SAL_OVERRIDE;
      79             :     virtual ERRTYPE SetPosRscId( const RSCINST & rInst, sal_uInt32 nPos,
      80             :                                  const RscId & rRscId) SAL_OVERRIDE;
      81             :     SUBINFO_STRUCT  GetInfoEle( const RSCINST & rInst, sal_uInt32 nPos ) SAL_OVERRIDE;
      82             :     ERRTYPE         SetString( const RSCINST &, const char * pStr ) SAL_OVERRIDE;
      83             :     ERRTYPE         SetNumber( const RSCINST &, sal_Int32 lValue ) SAL_OVERRIDE;
      84             :     ERRTYPE         SetBool( const RSCINST & rInst, bool bValue ) SAL_OVERRIDE;
      85             :     ERRTYPE         SetConst( const RSCINST & rInst, Atom nValueId,
      86             :                               sal_Int32 nValue ) SAL_OVERRIDE;
      87             :     ERRTYPE         SetRef( const RSCINST & rInst, const RscId & rRefId ) SAL_OVERRIDE;
      88             : 
      89             :                     // Gibt die Groesse der Klasse in Bytes
      90        6528 :     sal_uInt32      Size() SAL_OVERRIDE { return nSize; }
      91             : 
      92             :     bool            IsConsistent( const RSCINST & rInst ) SAL_OVERRIDE;
      93             :     void            SetToDefault( const RSCINST & rInst ) SAL_OVERRIDE;
      94             :     bool            IsDefault( const RSCINST & rInst ) SAL_OVERRIDE;
      95             :     bool            IsValueDefault( const RSCINST & rInst, CLASS_DATA pDef ) SAL_OVERRIDE;
      96             : 
      97             :     void            Delete( const RSCINST & rInst, RscTop * pClass,
      98             :                             const RscId & rId ) SAL_OVERRIDE;
      99             :     void            DeletePos( const RSCINST & rInst, sal_uInt32 nPos ) SAL_OVERRIDE;
     100             : 
     101             :     void            WriteSrc( const RSCINST & rInst, FILE * fOutput,
     102             :                               RscTypCont * pTC, sal_uInt32 nTab, const char * ) SAL_OVERRIDE;
     103             :     ERRTYPE         WriteRc( const RSCINST & rInst, RscWriteRc & aMem,
     104             :                              RscTypCont * pTC, sal_uInt32 , bool bExtra) SAL_OVERRIDE;
     105             : };
     106             : 
     107        3753 : class RscContWriteSrc : public RscBaseCont
     108             : {
     109             : public:
     110             :                     RscContWriteSrc( Atom nId, sal_uInt32 nTypId,
     111             :                                      RscTop * pSuper = NULL,
     112             :                                      bool bNoId = true );
     113             :     void            WriteSrc( const RSCINST & rInst, FILE * fOutput,
     114             :                               RscTypCont * pTC, sal_uInt32 nTab, const char * ) SAL_OVERRIDE;
     115             : };
     116             : 
     117        6672 : class RscCont : public RscContWriteSrc
     118             : {
     119             : public:
     120             :                     RscCont( Atom nId, sal_uInt32 nTypId,
     121             :                              RscTop * pSuper = NULL,
     122             :                              bool bNoId = true );
     123             :     ERRTYPE         WriteRc( const RSCINST & rInst, RscWriteRc & aMem,
     124             :                              RscTypCont * pTC, sal_uInt32, bool bExtra ) SAL_OVERRIDE;
     125             : };
     126             : 
     127         834 : class RscContExtraData : public RscContWriteSrc
     128             : {
     129             : public:
     130             :                     RscContExtraData( Atom nId, sal_uInt32 nTypId,
     131             :                                       RscTop * pSuper = NULL,
     132             :                                       bool bNoId = true );
     133             :     ERRTYPE         WriteRc( const RSCINST & rInst, RscWriteRc & aMem,
     134             :                              RscTypCont * pTC, sal_uInt32, bool bExtra ) SAL_OVERRIDE;
     135             : };
     136             : 
     137             : #endif // INCLUDED_RSC_INC_RSCCONT_HXX
     138             : 
     139             : /* vim:set shiftwidth=4 softtabstop=4 expandtab: */

Generated by: LCOV version 1.11