1*f7c60c9cSAndrew Rist /************************************************************** 2cdf0e10cSrcweir * 3*f7c60c9cSAndrew Rist * Licensed to the Apache Software Foundation (ASF) under one 4*f7c60c9cSAndrew Rist * or more contributor license agreements. See the NOTICE file 5*f7c60c9cSAndrew Rist * distributed with this work for additional information 6*f7c60c9cSAndrew Rist * regarding copyright ownership. The ASF licenses this file 7*f7c60c9cSAndrew Rist * to you under the Apache License, Version 2.0 (the 8*f7c60c9cSAndrew Rist * "License"); you may not use this file except in compliance 9*f7c60c9cSAndrew Rist * with the License. You may obtain a copy of the License at 10*f7c60c9cSAndrew Rist * 11*f7c60c9cSAndrew Rist * http://www.apache.org/licenses/LICENSE-2.0 12*f7c60c9cSAndrew Rist * 13*f7c60c9cSAndrew Rist * Unless required by applicable law or agreed to in writing, 14*f7c60c9cSAndrew Rist * software distributed under the License is distributed on an 15*f7c60c9cSAndrew Rist * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 16*f7c60c9cSAndrew Rist * KIND, either express or implied. See the License for the 17*f7c60c9cSAndrew Rist * specific language governing permissions and limitations 18*f7c60c9cSAndrew Rist * under the License. 19*f7c60c9cSAndrew Rist * 20*f7c60c9cSAndrew Rist *************************************************************/ 21*f7c60c9cSAndrew Rist 22*f7c60c9cSAndrew Rist 23cdf0e10cSrcweir #ifndef _RSCMGR_HXX 24cdf0e10cSrcweir #define _RSCMGR_HXX 25cdf0e10cSrcweir 26cdf0e10cSrcweir #include <rscall.h> 27cdf0e10cSrcweir #include <rscerror.h> 28cdf0e10cSrcweir #include <rschash.hxx> 29cdf0e10cSrcweir #include <rsctop.hxx> 30cdf0e10cSrcweir #include <rscclass.hxx> 31cdf0e10cSrcweir 32cdf0e10cSrcweir /******************* R s c M g r *****************************************/ 33cdf0e10cSrcweir class RscMgr : public RscClass { 34cdf0e10cSrcweir struct RscMgrInst { 35cdf0e10cSrcweir RscId aRefId; // nRefId = Referenz Identifier 36cdf0e10cSrcweir sal_Bool bDflt; // Ist Default CreateRscMgr::RscMgrInst37cdf0e10cSrcweir void Create(){ aRefId.Create(); bDflt = sal_True; } DestroyRscMgr::RscMgrInst38cdf0e10cSrcweir void Destroy(){ aRefId.Destroy(); } 39cdf0e10cSrcweir }; 40cdf0e10cSrcweir ERRTYPE IsToDeep( const RSCINST & rInst, sal_uInt32 nDeep = 0 ); 41cdf0e10cSrcweir public: 42cdf0e10cSrcweir RscMgr( Atom nId, sal_uInt32 nTypId, RscTop * pSuperCl ); 43cdf0e10cSrcweir 44cdf0e10cSrcweir void SetToDefault( const RSCINST & rInst ); 45cdf0e10cSrcweir sal_Bool IsDefault( const RSCINST & rInst ); 46cdf0e10cSrcweir sal_Bool IsValueDefault( const RSCINST & rInst, CLASS_DATA pDef ); 47cdf0e10cSrcweir 48cdf0e10cSrcweir RSCINST Create( RSCINST * pInst, const RSCINST & rDflt, sal_Bool ); 49cdf0e10cSrcweir void Destroy( const RSCINST & rInst ); 50cdf0e10cSrcweir sal_uInt32 Size(); 51cdf0e10cSrcweir void WriteSrcHeader( const RSCINST & aInst, FILE * fOutput, 52cdf0e10cSrcweir RscTypCont * pTC, sal_uInt32 nTab, 53cdf0e10cSrcweir const RscId & rId, const char * ); 54cdf0e10cSrcweir 55cdf0e10cSrcweir void WriteSrc( const RSCINST & rInst, FILE * fOutput, 56cdf0e10cSrcweir RscTypCont * pTC, sal_uInt32 nTab, const char * ); 57cdf0e10cSrcweir ERRTYPE WriteRcHeader( const RSCINST & rInst, RscWriteRc & aMem, 58cdf0e10cSrcweir RscTypCont * pTC, const RscId & rId, 59cdf0e10cSrcweir sal_uInt32, sal_Bool bExtra ); 60cdf0e10cSrcweir ERRTYPE WriteRc( const RSCINST & rInst, RscWriteRc & aMem, 61cdf0e10cSrcweir RscTypCont * pTC, sal_uInt32, sal_Bool bExtra ); 62cdf0e10cSrcweir ERRTYPE WriteHxxHeader( const RSCINST & rInst, FILE * fOutput, 63cdf0e10cSrcweir RscTypCont * pTC, const RscId & rId ); 64cdf0e10cSrcweir ERRTYPE WriteHxx( const RSCINST & rInst, FILE * fOutput, 65cdf0e10cSrcweir RscTypCont * pTC, const RscId & rId ); 66cdf0e10cSrcweir ERRTYPE WriteCxxHeader( const RSCINST & rInst, FILE * fOutput, 67cdf0e10cSrcweir RscTypCont * pTC, const RscId & rId ); 68cdf0e10cSrcweir ERRTYPE WriteCxx( const RSCINST & rInst, FILE * fOutput, 69cdf0e10cSrcweir RscTypCont * pTC, const RscId & rId ); 70cdf0e10cSrcweir sal_Bool IsConsistent( const RSCINST & rInst, 71cdf0e10cSrcweir RscInconsList * pList = NULL ); 72cdf0e10cSrcweir ERRTYPE GetRef( const RSCINST & rInst, RscId * ); 73cdf0e10cSrcweir ERRTYPE SetRef( const RSCINST & rInst, const RscId & rRefId ); 74cdf0e10cSrcweir }; 75cdf0e10cSrcweir 76cdf0e10cSrcweir #endif //_RSCMGR_HXX 77