bump product version to 4.1.6.2
[LibreOffice.git] / rsc / inc / rscclass.hxx
blob609d288f8a68da00d09e754d629a29536be2a35f
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 _RSCCLASS_HXX
20 #define _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{
31 sal_uLong nVarDflt;
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
44 // mit Superklassen
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,
53 sal_Bool bSet );
54 sal_Int32 GetCorrectValues( const RSCINST & rInst, sal_uInt32 nVarPos,
55 sal_uInt32 nTupelIdx, RscTypCont * pTC );
56 public:
57 RscClass( Atom nId, sal_uInt32 nTypId, RscTop * pSuperCl );
58 ~RscClass();
60 virtual RSCCLASS_TYPE GetClassType() const;
62 void Pre_dtor();
63 ERRTYPE SetVariable( Atom nVarName, RscTop * pClass,
64 RSCINST * pDflt,
65 RSCVAR nVarType, sal_uInt32 nMask,
66 Atom nDataBaseName );
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
97 public:
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
108 public:
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: */