Branch data Line data Source code
1 : : /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 : : /*
3 : : * This file is part of the LibreOffice project.
4 : : *
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/.
8 : : *
9 : : * This file incorporates work covered by the following license notice:
10 : : *
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 .
18 : : */
19 : : #ifndef _RSCMGR_HXX
20 : : #define _RSCMGR_HXX
21 : :
22 : : #include <rscall.h>
23 : : #include <rscerror.h>
24 : : #include <rschash.hxx>
25 : : #include <rsctop.hxx>
26 : : #include <rscclass.hxx>
27 : :
28 : : /******************* R s c M g r *****************************************/
29 [ - + ]: 2880 : class RscMgr : public RscClass {
30 : 398 : struct RscMgrInst {
31 : : RscId aRefId; // nRefId = Referenz Identifier
32 : : sal_Bool bDflt; // Ist Default
33 : 126054 : void Create(){ aRefId.Create(); bDflt = sal_True; }
34 : 126054 : void Destroy(){ aRefId.Destroy(); }
35 : : };
36 : : ERRTYPE IsToDeep( const RSCINST & rInst, sal_uInt32 nDeep = 0 );
37 : : public:
38 : : RscMgr( Atom nId, sal_uInt32 nTypId, RscTop * pSuperCl );
39 : :
40 : : void SetToDefault( const RSCINST & rInst );
41 : : sal_Bool IsDefault( const RSCINST & rInst );
42 : : sal_Bool IsValueDefault( const RSCINST & rInst, CLASS_DATA pDef );
43 : :
44 : : RSCINST Create( RSCINST * pInst, const RSCINST & rDflt, sal_Bool );
45 : : void Destroy( const RSCINST & rInst );
46 : : sal_uInt32 Size();
47 : : void WriteSrcHeader( const RSCINST & aInst, FILE * fOutput,
48 : : RscTypCont * pTC, sal_uInt32 nTab,
49 : : const RscId & rId, const char * );
50 : :
51 : : void WriteSrc( const RSCINST & rInst, FILE * fOutput,
52 : : RscTypCont * pTC, sal_uInt32 nTab, const char * );
53 : : ERRTYPE WriteRcHeader( const RSCINST & rInst, RscWriteRc & aMem,
54 : : RscTypCont * pTC, const RscId & rId,
55 : : sal_uInt32, sal_Bool bExtra );
56 : : ERRTYPE WriteRc( const RSCINST & rInst, RscWriteRc & aMem,
57 : : RscTypCont * pTC, sal_uInt32, sal_Bool bExtra );
58 : : ERRTYPE WriteHxxHeader( const RSCINST & rInst, FILE * fOutput,
59 : : RscTypCont * pTC, const RscId & rId );
60 : : ERRTYPE WriteHxx( const RSCINST & rInst, FILE * fOutput,
61 : : RscTypCont * pTC, const RscId & rId );
62 : : ERRTYPE WriteCxxHeader( const RSCINST & rInst, FILE * fOutput,
63 : : RscTypCont * pTC, const RscId & rId );
64 : : ERRTYPE WriteCxx( const RSCINST & rInst, FILE * fOutput,
65 : : RscTypCont * pTC, const RscId & rId );
66 : : sal_Bool IsConsistent( const RSCINST & rInst );
67 : : ERRTYPE GetRef( const RSCINST & rInst, RscId * );
68 : : ERRTYPE SetRef( const RSCINST & rInst, const RscId & rRefId );
69 : : };
70 : :
71 : : #endif //_RSCMGR_HXX
72 : :
73 : : /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
|