bump product version to 5.0.4.1
[LibreOffice.git] / rsc / inc / rscclass.hxx
blob7d2b09e35552a66e3c21e1ec8c0f4ee9b9d7eb59
1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 /*
3 * This file is part of the LibreOffice project.
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/.
9 * This file incorporates work covered by the following license notice:
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 .
19 #ifndef INCLUDED_RSC_INC_RSCCLASS_HXX
20 #define INCLUDED_RSC_INC_RSCCLASS_HXX
22 #include <rscall.h>
23 #include <rscerror.h>
24 #include <rschash.hxx>
25 #include <rsctop.hxx>
27 class RscClass : public RscTop
29 protected:
30 struct RscClassInst
32 sal_uLong nVarDflt;
34 struct VARTYPE_STRUCT
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
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();
62 virtual RSCCLASS_TYPE GetClassType() const SAL_OVERRIDE;
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;
76 // Gibt die Groesse der Klasse in Bytes
77 sal_uInt32 Size() SAL_OVERRIDE { return nSize; }
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;
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;
97 class RscSysDepend : public RscClass
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;
108 class RscTupel : public RscClass
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;
118 #endif // INCLUDED_RSC_INC_RSCCLASS_HXX
120 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */