LCOV - code coverage report
Current view: top level - rsc/inc - rscclass.hxx (source / functions) Hit Total Coverage
Test: commit e02a6cb2c3e2b23b203b422e4e0680877f232636 Lines: 0 3 0.0 %
Date: 2014-04-14 Functions: 0 5 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 _RSCCLASS_HXX
      20             : #define _RSCCLASS_HXX
      21             : 
      22             : #include <rscall.h>
      23             : #include <rscerror.h>
      24             : #include <rschash.hxx>
      25             : #include <rsctop.hxx>
      26             : 
      27             : class RscClass : public RscTop
      28             : {
      29             : protected:
      30             :     struct RscClassInst
      31             :     {
      32             :         sal_uLong       nVarDflt;
      33             :     };
      34             :     struct VARTYPE_STRUCT
      35             :     {
      36             :         Atom            nVarName;   // Variablenname
      37             :         RSCVAR          nVarType;   // Variablentyp
      38             :         sal_uInt32      nMask;      // Maskierungsbit
      39             :         sal_uInt32      nOffset;    // Beginn der Instanzdaten
      40             :         RscTop *        pClass;     // Klasse
      41             :         CLASS_DATA      pDefault;   // Zeiger auf DefaultDaten
      42             :         Atom            nDataBaseName;//Name fuer Fremddatenbereich
      43             :     };
      44             :     sal_uInt32          nSuperSize; // Groesse der Instanzdaten der SuperKl.
      45             :     sal_uInt32          nSize;      // Groesse der Instanzdaten dieser Klasse
      46             :                                     // mit Superklassen
      47             :     sal_uInt32          nEntries;   // Eintraege in pVarTypeList
      48             :     VARTYPE_STRUCT *    pVarTypeList;   // Variablenliste
      49             :     RSCINST             GetInstData( CLASS_DATA pData, sal_uInt32 nEle,
      50             :                                      bool bGetCopy = false );
      51             :     CLASS_DATA          GetDfltData( sal_uInt32 nEle );
      52             :     bool                IsDflt( CLASS_DATA pData, sal_uInt32 nEle );
      53             :     bool                IsValueDflt( CLASS_DATA pData, sal_uInt32 nEle );
      54             :     void                SetVarDflt( CLASS_DATA pData, sal_uInt32 nEle,
      55             :                                     bool bSet );
      56             :     sal_Int32           GetCorrectValues( const RSCINST & rInst, sal_uInt32 nVarPos,
      57             :                                           sal_uInt32 nTupelIdx, RscTypCont * pTC );
      58             : public:
      59             :                     RscClass( Atom nId, sal_uInt32 nTypId, RscTop * pSuperCl );
      60             :                     virtual ~RscClass();
      61             : 
      62             :     virtual RSCCLASS_TYPE   GetClassType() const SAL_OVERRIDE;
      63             : 
      64             :     void            Pre_dtor() SAL_OVERRIDE;
      65             :     ERRTYPE         SetVariable( Atom nVarName, RscTop * pClass,
      66             :                                  RSCINST * pDflt,
      67             :                                  RSCVAR nVarType, sal_uInt32 nMask,
      68             :                                  Atom nDataBaseName ) SAL_OVERRIDE;
      69             :     virtual void    EnumVariables( void * pData, VarEnumCallbackProc ) SAL_OVERRIDE;
      70             :     RSCINST         GetVariable( const RSCINST & rInst, Atom nVarName,
      71             :                                  const RSCINST & rInitInst,
      72             :                                  bool nInitDflt = false,
      73             :                                  RscTop * pCreateClass = NULL ) SAL_OVERRIDE;
      74             :     RSCINST         GetCopyVar( const RSCINST & rInst, Atom nVarName ) SAL_OVERRIDE;
      75             : 
      76             :                     // Gibt die Groesse der Klasse in Bytes
      77           0 :     sal_uInt32      Size() SAL_OVERRIDE { return nSize; }
      78             : 
      79             :     bool            IsConsistent( const RSCINST & rInst ) SAL_OVERRIDE;
      80             :     void            SetToDefault( const RSCINST & rInst ) SAL_OVERRIDE;
      81             :     bool            IsDefault( const RSCINST & rInst ) SAL_OVERRIDE;
      82             :     bool            IsValueDefault( const RSCINST & rInst, CLASS_DATA pDef ) SAL_OVERRIDE;
      83             :     void            SetDefault( const RSCINST & rData, Atom nVarId ) SAL_OVERRIDE;
      84             :     using RscTop::GetDefault;
      85             :     RSCINST         GetDefault( Atom nVarId ) SAL_OVERRIDE;
      86             : 
      87             :     RSCINST         Create( RSCINST * pInst, const RSCINST & rDflt, bool ) SAL_OVERRIDE;
      88             :     void            Destroy( const RSCINST & rInst ) SAL_OVERRIDE;
      89             :     void            WriteSrc( const RSCINST & rInst, FILE * fOutput,
      90             :                               RscTypCont * pTC, sal_uInt32 nTab, const char * ) SAL_OVERRIDE;
      91             :     ERRTYPE         WriteInstRc( const RSCINST & rInst, RscWriteRc & aMem,
      92             :                                  RscTypCont * pTC, sal_uInt32, bool bExtra );
      93             :     ERRTYPE         WriteRc( const RSCINST & rInst, RscWriteRc & aMem,
      94             :                              RscTypCont * pTC, sal_uInt32, bool bExtra ) SAL_OVERRIDE;
      95             : };
      96             : 
      97           0 : class RscSysDepend : public RscClass
      98             : {
      99             : public:
     100             :                     RscSysDepend( Atom nId, sal_uInt32 nTypId, RscTop * pSuper );
     101             :     ERRTYPE         WriteSysDependRc( const RSCINST &, RscWriteRc & aMem,
     102             :                                       RscTypCont * pTC, sal_uInt32, bool bExtra,
     103             :                                       bool bFirst = false );
     104             :     ERRTYPE         WriteRc( const RSCINST &, RscWriteRc & aMem,
     105             :                              RscTypCont * pTC, sal_uInt32, bool bExtra ) SAL_OVERRIDE;
     106             : };
     107             : 
     108           0 : class RscTupel : public RscClass
     109             : {
     110             : public:
     111             :     RscTupel( Atom nId, sal_uInt32 nTypId, RscTop * pSuper );
     112             :     RSCINST         GetTupelVar( const RSCINST & rInst, sal_uInt32 nPos,
     113             :                                  const RSCINST & rInitInst ) SAL_OVERRIDE;
     114             :     void            WriteSrc( const RSCINST & rInst, FILE * fOutput,
     115             :                               RscTypCont * pTC, sal_uInt32 nTab, const char * ) SAL_OVERRIDE;
     116             : };
     117             : 
     118             : #endif //_RSCCLASS_HXX
     119             : 
     120             : /* vim:set shiftwidth=4 softtabstop=4 expandtab: */

Generated by: LCOV version 1.10