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 class RscInstNode
: public IdNode
32 using NameNode::Search
;
35 RscInstNode( sal_uInt32 nId
);
37 virtual sal_uInt32
GetId() const;
38 RscInstNode
* Left() const { return (RscInstNode
*)pLeft
; };
39 RscInstNode
* Right() const{ return (RscInstNode
*)pRight
; };
40 RscInstNode
* Search( sal_uInt32 nId
) const
42 return (RscInstNode
*)IdNode::Search( nId
);
51 /* Der Baum wird ueber die Werte des Enums sortiert, nicht ueber
54 class RscArray
: public RscTop
57 RscEnum
* pTypeClass
; // Typ der Eintraege
58 sal_uInt32 nSize
; // Groesse der Instanzdaten dieser Klasse
60 sal_uInt32 nOffInstData
;// Offset auf eigen Instanzdaten
61 void WriteSrcArray( const RSCINST
& rInst
, FILE * fOutput
,
62 RscTypCont
* pTC
, sal_uInt32 nTab
, const char * );
64 RscArray( Atom nId
, sal_uInt32 nTypId
,
65 RscTop
* pSuper
, RscEnum
* pTypeClass
);
67 virtual RSCCLASS_TYPE
GetClassType() const;
69 void SetTypeClass( RscEnum
* pClass
)
73 virtual RscTop
* GetTypeClass() const;
74 RSCINST
Create( RSCINST
* pInst
, const RSCINST
& rDflt
, sal_Bool
);
75 void Destroy( const RSCINST
& rInst
);
76 virtual ERRTYPE
GetValueEle( const RSCINST
& rInst
, sal_Int32 lValue
,
77 RscTop
* pCreateClass
,
79 virtual ERRTYPE
GetArrayEle( const RSCINST
& rInst
, Atom nId
,
80 RscTop
* pCreateClass
,
83 // Gibt die Groesse der Klasse in Bytes
84 sal_uInt32
Size(){ return( nSize
); };
86 sal_Bool
IsConsistent( const RSCINST
& rInst
);
87 virtual void SetToDefault( const RSCINST
& rInst
);
88 sal_Bool
IsDefault( const RSCINST
& rInst
);
89 sal_Bool
IsValueDefault( const RSCINST
& rInst
, CLASS_DATA pDef
);
91 virtual void WriteSrcHeader( const RSCINST
& rInst
, FILE * fOutput
,
92 RscTypCont
* pTC
, sal_uInt32 nTab
,
93 const RscId
& aId
, const char * );
94 void WriteSrc( const RSCINST
& rInst
, FILE * fOutput
,
95 RscTypCont
* pTC
, sal_uInt32 nTab
, const char * );
96 ERRTYPE
WriteRc( const RSCINST
& rInst
, RscWriteRc
& aMem
,
97 RscTypCont
* pTC
, sal_uInt32
, sal_Bool bExtra
);
100 class RscClassArray
: public RscArray
103 RscClassArray( Atom nId
, sal_uInt32 nTypId
,
104 RscTop
* pSuper
, RscEnum
* pTypeClass
);
106 virtual void WriteSrcHeader( const RSCINST
& rInst
, FILE * fOutput
,
107 RscTypCont
* pTC
, sal_uInt32 nTab
,
108 const RscId
& aId
, const char * );
109 void WriteSrc( const RSCINST
& rInst
, FILE * fOutput
,
110 RscTypCont
* pTC
, sal_uInt32 nTab
, const char * );
111 virtual ERRTYPE
WriteRcHeader( const RSCINST
& rInst
, RscWriteRc
& aMem
,
112 RscTypCont
* pTC
, const RscId
& aId
,
113 sal_uInt32 nDeep
, sal_Bool bExtra
);
117 class RscLangArray
: public RscArray
120 RscLangArray( Atom nId
, sal_uInt32 nTypId
,
121 RscTop
* pSuper
, RscEnum
* pTypeClass
);
122 virtual RSCCLASS_TYPE
GetClassType() const;
127 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */