1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
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 .
24 #include <rschash.hxx>
27 class RscClass
: public RscTop
33 struct VARTYPE_STRUCT
{
34 Atom nVarName
; // Variablenname
35 RSCVAR nVarType
; // Variablentyp
36 sal_uInt32 nMask
; // Maskierungsbit
37 sal_uInt32 nOffset
; // Beginn der Instanzdaten
38 RscTop
* pClass
; // Klasse
39 CLASS_DATA pDefault
; // Zeiger auf DefaultDaten
40 Atom nDataBaseName
;//Name fuer Fremddatenbereich
42 sal_uInt32 nSuperSize
; // Groesse der Instanzdaten der SuperKl.
43 sal_uInt32 nSize
; // Groesse der Instanzdaten dieser Klasse
45 sal_uInt32 nEntries
; // Eintraege in pVarTypeList
46 VARTYPE_STRUCT
* pVarTypeList
; // Variablenliste
47 RSCINST
GetInstData( CLASS_DATA pData
, sal_uInt32 nEle
,
48 sal_Bool bGetCopy
= sal_False
);
49 CLASS_DATA
GetDfltData( sal_uInt32 nEle
);
50 sal_Bool
IsDflt( CLASS_DATA pData
, sal_uInt32 nEle
);
51 sal_Bool
IsValueDflt( CLASS_DATA pData
, sal_uInt32 nEle
);
52 void SetVarDflt( CLASS_DATA pData
, sal_uInt32 nEle
,
54 sal_Int32
GetCorrectValues( const RSCINST
& rInst
, sal_uInt32 nVarPos
,
55 sal_uInt32 nTupelIdx
, RscTypCont
* pTC
);
57 RscClass( Atom nId
, sal_uInt32 nTypId
, RscTop
* pSuperCl
);
60 virtual RSCCLASS_TYPE
GetClassType() const;
63 ERRTYPE
SetVariable( Atom nVarName
, RscTop
* pClass
,
65 RSCVAR nVarType
, sal_uInt32 nMask
,
67 virtual void EnumVariables( void * pData
, VarEnumCallbackProc
);
68 RSCINST
GetVariable( const RSCINST
& rInst
, Atom nVarName
,
69 const RSCINST
& rInitInst
,
70 sal_Bool nInitDflt
= sal_False
,
71 RscTop
* pCreateClass
= NULL
);
72 RSCINST
GetCopyVar( const RSCINST
& rInst
, Atom nVarName
);
74 // Gibt die Groesse der Klasse in Bytes
75 sal_uInt32
Size(){ return( nSize
); };
77 sal_Bool
IsConsistent( const RSCINST
& rInst
);
78 void SetToDefault( const RSCINST
& rInst
);
79 sal_Bool
IsDefault( const RSCINST
& rInst
);
80 sal_Bool
IsValueDefault( const RSCINST
& rInst
, CLASS_DATA pDef
);
81 void SetDefault( const RSCINST
& rData
, Atom nVarId
);
82 using RscTop::GetDefault
;
83 RSCINST
GetDefault( Atom nVarId
);
85 RSCINST
Create( RSCINST
* pInst
, const RSCINST
& rDflt
, sal_Bool
);
86 void Destroy( const RSCINST
& rInst
);
87 void WriteSrc( const RSCINST
& rInst
, FILE * fOutput
,
88 RscTypCont
* pTC
, sal_uInt32 nTab
, const char * );
89 ERRTYPE
WriteInstRc( const RSCINST
& rInst
, RscWriteRc
& aMem
,
90 RscTypCont
* pTC
, sal_uInt32
, sal_Bool bExtra
);
91 ERRTYPE
WriteRc( const RSCINST
& rInst
, RscWriteRc
& aMem
,
92 RscTypCont
* pTC
, sal_uInt32
, sal_Bool bExtra
);
95 class RscSysDepend
: public RscClass
98 RscSysDepend( Atom nId
, sal_uInt32 nTypId
, RscTop
* pSuper
);
99 ERRTYPE
WriteSysDependRc( const RSCINST
&, RscWriteRc
& aMem
,
100 RscTypCont
* pTC
, sal_uInt32
, sal_Bool bExtra
,
101 sal_Bool bFirst
= sal_False
);
102 ERRTYPE
WriteRc( const RSCINST
&, RscWriteRc
& aMem
,
103 RscTypCont
* pTC
, sal_uInt32
, sal_Bool bExtra
);
106 class RscTupel
: public RscClass
109 RscTupel( Atom nId
, sal_uInt32 nTypId
, RscTop
* pSuper
);
110 RSCINST
GetTupelVar( const RSCINST
& rInst
, sal_uInt32 nPos
,
111 const RSCINST
& rInitInst
);
112 void WriteSrc( const RSCINST
& rInst
, FILE * fOutput
,
113 RscTypCont
* pTC
, sal_uInt32 nTab
, const char * );
116 #endif //_RSCCLASS_HXX
118 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */