Update ooo320-m1
[ooovba.git] / rsc / inc / rscmgr.hxx
blob59657a673f6594d51b6a87602c66eb6b4e284ff2
1 /*************************************************************************
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4 *
5 * Copyright 2008 by Sun Microsystems, Inc.
7 * OpenOffice.org - a multi-platform office productivity suite
9 * $RCSfile: rscmgr.hxx,v $
10 * $Revision: 1.5 $
12 * This file is part of OpenOffice.org.
14 * OpenOffice.org is free software: you can redistribute it and/or modify
15 * it under the terms of the GNU Lesser General Public License version 3
16 * only, as published by the Free Software Foundation.
18 * OpenOffice.org is distributed in the hope that it will be useful,
19 * but WITHOUT ANY WARRANTY; without even the implied warranty of
20 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
21 * GNU Lesser General Public License version 3 for more details
22 * (a copy is included in the LICENSE file that accompanied this code).
24 * You should have received a copy of the GNU Lesser General Public License
25 * version 3 along with OpenOffice.org. If not, see
26 * <http://www.openoffice.org/license.html>
27 * for a copy of the LGPLv3 License.
29 ************************************************************************/
30 #ifndef _RSCMGR_HXX
31 #define _RSCMGR_HXX
33 #include <rscall.h>
34 #include <rscerror.h>
35 #include <rschash.hxx>
36 #include <rsctop.hxx>
37 #include <rscclass.hxx>
39 /******************* R s c M g r *****************************************/
40 class RscMgr : public RscClass {
41 struct RscMgrInst {
42 RscId aRefId; // nRefId = Referenz Identifier
43 BOOL bDflt; // Ist Default
44 void Create(){ aRefId.Create(); bDflt = TRUE; }
45 void Destroy(){ aRefId.Destroy(); }
47 ERRTYPE IsToDeep( const RSCINST & rInst, sal_uInt32 nDeep = 0 );
48 public:
49 RscMgr( Atom nId, sal_uInt32 nTypId, RscTop * pSuperCl );
51 void SetToDefault( const RSCINST & rInst );
52 BOOL IsDefault( const RSCINST & rInst );
53 BOOL IsValueDefault( const RSCINST & rInst, CLASS_DATA pDef );
55 RSCINST Create( RSCINST * pInst, const RSCINST & rDflt, BOOL );
56 void Destroy( const RSCINST & rInst );
57 sal_uInt32 Size();
58 void WriteSrcHeader( const RSCINST & aInst, FILE * fOutput,
59 RscTypCont * pTC, sal_uInt32 nTab,
60 const RscId & rId, const char * );
62 void WriteSrc( const RSCINST & rInst, FILE * fOutput,
63 RscTypCont * pTC, sal_uInt32 nTab, const char * );
64 ERRTYPE WriteRcHeader( const RSCINST & rInst, RscWriteRc & aMem,
65 RscTypCont * pTC, const RscId & rId,
66 sal_uInt32, BOOL bExtra );
67 ERRTYPE WriteRc( const RSCINST & rInst, RscWriteRc & aMem,
68 RscTypCont * pTC, sal_uInt32, BOOL bExtra );
69 ERRTYPE WriteHxxHeader( const RSCINST & rInst, FILE * fOutput,
70 RscTypCont * pTC, const RscId & rId );
71 ERRTYPE WriteHxx( const RSCINST & rInst, FILE * fOutput,
72 RscTypCont * pTC, const RscId & rId );
73 ERRTYPE WriteCxxHeader( const RSCINST & rInst, FILE * fOutput,
74 RscTypCont * pTC, const RscId & rId );
75 ERRTYPE WriteCxx( const RSCINST & rInst, FILE * fOutput,
76 RscTypCont * pTC, const RscId & rId );
77 BOOL IsConsistent( const RSCINST & rInst,
78 RscInconsList * pList = NULL );
79 ERRTYPE GetRef( const RSCINST & rInst, RscId * );
80 ERRTYPE SetRef( const RSCINST & rInst, const RscId & rRefId );
83 #endif //_RSCMGR_HXX