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 .
28 /******************* R s c A r r a y ************************************/
29 class RscInstNode
: public IdNode
33 using NameNode::Search
;
36 RscInstNode( sal_uInt32 nId
);
38 virtual sal_uInt32
GetId() const;
39 RscInstNode
* Left() const { return (RscInstNode
*)pLeft
; };
40 RscInstNode
* Right() const{ return (RscInstNode
*)pRight
; };
41 RscInstNode
* Search( sal_uInt32 nId
) const
43 return (RscInstNode
*)IdNode::Search( nId
);
52 /* Der Baum wird ueber die Werte des Enums sortiert, nicht ueber
55 class RscArray
: public RscTop
58 RscEnum
* pTypeClass
; // Typ der Eintraege
59 sal_uInt32 nSize
; // Groesse der Instanzdaten dieser Klasse
61 sal_uInt32 nOffInstData
;// Offset auf eigen Instanzdaten
62 void WriteSrcArray( const RSCINST
& rInst
, FILE * fOutput
,
63 RscTypCont
* pTC
, sal_uInt32 nTab
, const char * );
65 RscArray( Atom nId
, sal_uInt32 nTypId
,
66 RscTop
* pSuper
, RscEnum
* pTypeClass
);
68 virtual RSCCLASS_TYPE
GetClassType() const;
70 void SetTypeClass( RscEnum
* pClass
)
74 virtual RscTop
* GetTypeClass() const;
75 RSCINST
Create( RSCINST
* pInst
, const RSCINST
& rDflt
, sal_Bool
);
76 void Destroy( const RSCINST
& rInst
);
77 virtual ERRTYPE
GetValueEle( const RSCINST
& rInst
, sal_Int32 lValue
,
78 RscTop
* pCreateClass
,
80 virtual ERRTYPE
GetArrayEle( const RSCINST
& rInst
, Atom nId
,
81 RscTop
* pCreateClass
,
84 // Gibt die Groesse der Klasse in Bytes
85 sal_uInt32
Size(){ return( nSize
); };
87 sal_Bool
IsConsistent( const RSCINST
& rInst
);
88 virtual void SetToDefault( const RSCINST
& rInst
);
89 sal_Bool
IsDefault( const RSCINST
& rInst
);
90 sal_Bool
IsValueDefault( const RSCINST
& rInst
, CLASS_DATA pDef
);
92 virtual void WriteSrcHeader( const RSCINST
& rInst
, FILE * fOutput
,
93 RscTypCont
* pTC
, sal_uInt32 nTab
,
94 const RscId
& aId
, const char * );
95 void WriteSrc( const RSCINST
& rInst
, FILE * fOutput
,
96 RscTypCont
* pTC
, sal_uInt32 nTab
, const char * );
97 ERRTYPE
WriteRc( const RSCINST
& rInst
, RscWriteRc
& aMem
,
98 RscTypCont
* pTC
, sal_uInt32
, sal_Bool bExtra
);
99 virtual void WriteRcAccess( FILE * fOutput
, RscTypCont
* pTC
,
103 class RscClassArray
: public RscArray
106 RscClassArray( Atom nId
, sal_uInt32 nTypId
,
107 RscTop
* pSuper
, RscEnum
* pTypeClass
);
109 virtual void WriteSrcHeader( const RSCINST
& rInst
, FILE * fOutput
,
110 RscTypCont
* pTC
, sal_uInt32 nTab
,
111 const RscId
& aId
, const char * );
112 void WriteSrc( const RSCINST
& rInst
, FILE * fOutput
,
113 RscTypCont
* pTC
, sal_uInt32 nTab
, const char * );
114 virtual ERRTYPE
WriteRcHeader( const RSCINST
& rInst
, RscWriteRc
& aMem
,
115 RscTypCont
* pTC
, const RscId
& aId
,
116 sal_uInt32 nDeep
, sal_Bool bExtra
);
120 class RscLangArray
: public RscArray
123 RscLangArray( Atom nId
, sal_uInt32 nTypId
,
124 RscTop
* pSuper
, RscEnum
* pTypeClass
);
125 virtual RSCCLASS_TYPE
GetClassType() const;
130 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */