summaryrefslogtreecommitdiff
path: root/rsc/inc
diff options
context:
space:
mode:
authorJens-Heiner Rechtien <hr@openoffice.org>2000-09-18 16:07:07 +0000
committerJens-Heiner Rechtien <hr@openoffice.org>2000-09-18 16:07:07 +0000
commit8ab086b6cc054501bfbf7ef6fa509c393691e860 (patch)
tree324d51845d7f1a2f4e02a14db22fb5947137c822 /rsc/inc
parent411e68cc54ae97eebd79ae3a9cb2971b74cb2a9e (diff)
initial import
Diffstat (limited to 'rsc/inc')
-rw-r--r--rsc/inc/rscall.h162
-rw-r--r--rsc/inc/rscarray.hxx187
-rw-r--r--rsc/inc/rscclass.hxx188
-rw-r--r--rsc/inc/rscclobj.hxx183
-rw-r--r--rsc/inc/rscconst.hxx146
-rw-r--r--rsc/inc/rsccont.hxx244
-rw-r--r--rsc/inc/rscdb.hxx406
-rw-r--r--rsc/inc/rscdef.hxx331
-rw-r--r--rsc/inc/rscerror.h205
-rw-r--r--rsc/inc/rscflag.hxx157
-rw-r--r--rsc/inc/rschash.hxx170
-rw-r--r--rsc/inc/rscinst.hxx310
-rw-r--r--rsc/inc/rsckey.hxx129
-rw-r--r--rsc/inc/rsclst.hxx103
-rw-r--r--rsc/inc/rscmgr.hxx169
-rw-r--r--rsc/inc/rscpar.hxx142
-rw-r--r--rsc/inc/rscrange.hxx260
-rw-r--r--rsc/inc/rscrsc.hxx158
-rw-r--r--rsc/inc/rscsfx.hxx104
-rw-r--r--rsc/inc/rscstr.hxx176
-rw-r--r--rsc/inc/rsctools.hxx246
-rw-r--r--rsc/inc/rsctop.hxx297
-rw-r--r--rsc/inc/rsctree.hxx176
23 files changed, 4649 insertions, 0 deletions
diff --git a/rsc/inc/rscall.h b/rsc/inc/rscall.h
new file mode 100644
index 000000000000..35528e750e9d
--- /dev/null
+++ b/rsc/inc/rscall.h
@@ -0,0 +1,162 @@
+/*************************************************************************
+ *
+ * $RCSfile: rscall.h,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 16:42:54 $
+ *
+ * The Contents of this file are made available subject to the terms of
+ * either of the following licenses
+ *
+ * - GNU Lesser General Public License Version 2.1
+ * - Sun Industry Standards Source License Version 1.1
+ *
+ * Sun Microsystems Inc., October, 2000
+ *
+ * GNU Lesser General Public License Version 2.1
+ * =============================================
+ * Copyright 2000 by Sun Microsystems, Inc.
+ * 901 San Antonio Road, Palo Alto, CA 94303, USA
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1, as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ *
+ *
+ * Sun Industry Standards Source License Version 1.1
+ * =================================================
+ * The contents of this file are subject to the Sun Industry Standards
+ * Source License Version 1.1 (the "License"); You may not use this file
+ * except in compliance with the License. You may obtain a copy of the
+ * License at http://www.openoffice.org/license.html.
+ *
+ * Software provided under this License is provided on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
+ * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
+ * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
+ * See the License for the specific provisions governing your rights and
+ * obligations concerning the Software.
+ *
+ * The Initial Developer of the Original Code is: Sun Microsystems, Inc.
+ *
+ * Copyright: 2000 by Sun Microsystems, Inc.
+ *
+ * All Rights Reserved.
+ *
+ * Contributor(s): _______________________________________
+ *
+ *
+ ************************************************************************/
+/************************************************************************
+
+ Source Code Control System - Header
+
+ $Header: /zpool/svn/migration/cvs_rep_09_09_08/code/rsc/inc/rscall.h,v 1.1.1.1 2000-09-18 16:42:54 hr Exp $
+
+**************************************************************************/
+
+#ifndef _RSCALL_H
+#define _RSCALL_H
+
+#ifndef _TOOLS_STRING_HXX
+#include <tools/string.hxx>
+#endif
+#ifndef _RSCTOOLS_HXX
+#include <rsctools.hxx>
+#endif
+#ifndef _RSCERROR_H
+#include <rscerror.h>
+#endif
+#ifndef _RSCDEF_HXX
+#include <rscdef.hxx>
+#endif
+
+/******************* T y p e s *******************************************/
+typedef char * CLASS_DATA; // Zeiger auf die Daten einer Klasse
+
+/******************* C l a s s e s F o r w a r d s *********************/
+class RscCompiler;
+class HashString;
+class RscTop;
+class RscTypCont;
+class RscIncList;
+
+/******************* G l o b a l V a r i a b l e s *********************/
+extern HashString* pHS;
+extern ByteString* pStdParType;
+extern ByteString* pStdPar1;
+extern ByteString* pStdPar2;
+extern ByteString* pWinParType;
+extern ByteString* pWinPar1;
+extern ByteString* pWinPar2;
+extern USHORT nRefDeep;
+extern USHORT nRsc_XYMAPMODEId;
+extern USHORT nRsc_WHMAPMODEId;
+extern USHORT nRsc_X;
+extern USHORT nRsc_Y;
+extern USHORT nRsc_WIDTH;
+extern USHORT nRsc_HEIGHT;
+extern USHORT nRsc_DELTALANG;
+extern USHORT nRsc_DELTASYSTEM;
+extern USHORT nRsc_EXTRADATA;
+
+/******************* D e f i n e s ***************************************/
+
+#define HELP_FLAG 0x0001 // Hilfe anzeigen
+#define NOPREPRO_FLAG 0x0002 // kein Preprozesor
+#define NOSYNTAX_FLAG 0x0004 // keine Syntaxanalyse
+#define NOLINK_FLAG 0x0008 // nicht linken
+#define NORESFILE_FLAG 0x0010 // keine .res-Datei erzeugen
+#define DEFINE_FLAG 0x0020 // es wurde Definitionen angegeben
+#define INCLUDE_FLAG 0x0040 // der Include-Pfad wurde erweitert
+#define MSCPREPRO_FLAG 0x0080 // spezial Preprozessor
+#define PRINTSYNTAX_FLAG 0x0100 // Syntax ausgeben
+#define PRELOAD_FLAG 0x0200 // Alle Ressourcen Preloaden
+#define SMART_FLAG 0x0400 // abgekuertze Name
+#define SRSDEFAULT_FLAG 0x1000 // immer der Default geschrieben
+#define NOSYSRESTEST_FLAG 0x2000 // ueberprueft nicht die Richtigkeit von (bmp, ico, cur)
+
+
+/******************* T y p e s *******************************************/
+enum RSCCLASS_TYPE { RSCCLASS_BOOL, RSCCLASS_STRING, RSCCLASS_NUMBER,
+ RSCCLASS_CONST, RSCCLASS_COMPLEX, RSCCLASS_ENUMARRAY };
+
+typedef void (* VarEnumCallbackProc)( void * pData, RSCCLASS_TYPE, HASHID );
+
+/******************* S t r u c t s ***************************************/
+struct RSCINST {
+ RscTop * pClass;
+ CLASS_DATA pData;
+
+ RSCINST(){ pClass = NULL; pData = NULL; }
+ RSCINST( RscTop * pCl, CLASS_DATA pClassData ){
+ pClass = pCl;
+ pData = pClassData;
+ }
+ BOOL IsInst() const { return( pData != NULL ); }
+};
+
+/********************** S U B I N F O S T R U C T ************************/
+struct SUBINFO_STRUCT {
+ SUBINFO_STRUCT(){ nPos = 0; pClass = NULL; };
+ RscId aId; // Identifier der Resource
+ USHORT nPos; // Position der Resource
+ RscTop * pClass; // Klasse des Eintrages
+};
+
+/******************* F u n c t i o n *************************************/
+// Legt Hashtabelle an, legt Strings zur Initialisierung an
+void InitRscCompiler();
+
+#endif // _RSCALL_H
diff --git a/rsc/inc/rscarray.hxx b/rsc/inc/rscarray.hxx
new file mode 100644
index 000000000000..420afdf54074
--- /dev/null
+++ b/rsc/inc/rscarray.hxx
@@ -0,0 +1,187 @@
+/*************************************************************************
+ *
+ * $RCSfile: rscarray.hxx,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 16:42:54 $
+ *
+ * The Contents of this file are made available subject to the terms of
+ * either of the following licenses
+ *
+ * - GNU Lesser General Public License Version 2.1
+ * - Sun Industry Standards Source License Version 1.1
+ *
+ * Sun Microsystems Inc., October, 2000
+ *
+ * GNU Lesser General Public License Version 2.1
+ * =============================================
+ * Copyright 2000 by Sun Microsystems, Inc.
+ * 901 San Antonio Road, Palo Alto, CA 94303, USA
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1, as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ *
+ *
+ * Sun Industry Standards Source License Version 1.1
+ * =================================================
+ * The contents of this file are subject to the Sun Industry Standards
+ * Source License Version 1.1 (the "License"); You may not use this file
+ * except in compliance with the License. You may obtain a copy of the
+ * License at http://www.openoffice.org/license.html.
+ *
+ * Software provided under this License is provided on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
+ * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
+ * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
+ * See the License for the specific provisions governing your rights and
+ * obligations concerning the Software.
+ *
+ * The Initial Developer of the Original Code is: Sun Microsystems, Inc.
+ *
+ * Copyright: 2000 by Sun Microsystems, Inc.
+ *
+ * All Rights Reserved.
+ *
+ * Contributor(s): _______________________________________
+ *
+ *
+ ************************************************************************/
+/************************************************************************
+
+ Source Code Control System - Header
+
+ $Header: /zpool/svn/migration/cvs_rep_09_09_08/code/rsc/inc/rscarray.hxx,v 1.1.1.1 2000-09-18 16:42:54 hr Exp $
+
+**************************************************************************/
+
+#ifndef _RSCARRAY_HXX
+#define _RSCARRAY_HXX
+
+#ifndef _RSCALL_H
+#include <rscall.h>
+#endif
+#ifndef _RSCERROR_H
+#include <rscerror.h>
+#endif
+#ifndef _RSCTOP_HXX
+#include <rsctop.hxx>
+#endif
+
+class RscEnum;
+
+/******************* R s c A r r a y ************************************/
+class RscInstNode : public IdNode
+{
+ USHORT nTypeId;
+public:
+ RSCINST aInst;
+ RscInstNode( USHORT nId );
+ ~RscInstNode();
+ virtual USHORT GetId() const;
+ RscInstNode * Left() const { return (RscInstNode *)pLeft ; };
+ RscInstNode * Right() const{ return (RscInstNode *)pRight ; };
+ RscInstNode * Search( USHORT nId ) const
+ {
+ return (RscInstNode *)IdNode::Search( nId );
+ }
+};
+
+struct RscArrayInst
+{
+ RscInstNode * pNode;
+};
+
+/* Der Baum wird ueber die Werte des Enums sortiert, nicht ueber
+ seine HashId.
+*/
+class RscArray : public RscTop
+{
+protected:
+ RscEnum * pTypeClass; // Typ der Eintraege
+ USHORT nSize; // Groesse der Instanzdaten dieser Klasse
+ // mit Superklassen
+ USHORT nOffInstData;// Offset auf eigen Instanzdaten
+ USHORT * pWriteTypeValue;// Was soll geschrieben werden
+ USHORT * pWriteDfltTypeValue; // fallback fuer WriteTypeValue
+ void WriteSrcArray( const RSCINST & rInst, FILE * fOutput,
+ RscTypCont * pTC, USHORT nTab, const char * );
+public:
+ RscArray( HASHID nId, USHORT nTypId,
+ RscTop * pSuper, RscEnum * pTypeClass,
+ USHORT * pTypeValue, USHORT * pFallBackType );
+ ~RscArray();
+ virtual RSCCLASS_TYPE GetClassType() const;
+
+ void SetTypeClass( RscEnum * pClass )
+ {
+ pTypeClass = pClass;
+ }
+ virtual RscTop * GetTypeClass() const;
+ RSCINST Create( RSCINST * pInst, const RSCINST & rDflt, BOOL );
+ void Destroy( const RSCINST & rInst );
+ virtual ERRTYPE GetValueEle( const RSCINST & rInst, long lValue,
+ RscTop * pCreateClass,
+ RSCINST * pGetInst );
+ virtual ERRTYPE GetArrayEle( const RSCINST & rInst, HASHID nId,
+ RscTop * pCreateClass,
+ RSCINST * pGetInst );
+
+ // Gibt die Groesse der Klasse in Bytes
+ USHORT Size(){ return( nSize ); };
+
+ BOOL IsConsistent( const RSCINST & rInst, RscInconsList * pList );
+ virtual void SetToDefault( const RSCINST & rInst );
+ BOOL IsDefault( const RSCINST & rInst );
+ BOOL IsValueDefault( const RSCINST & rInst, CLASS_DATA pDef );
+
+ virtual void WriteSrcHeader( const RSCINST & rInst, FILE * fOutput,
+ RscTypCont * pTC, USHORT nTab,
+ const RscId & aId, const char * );
+ void WriteSrc( const RSCINST & rInst, FILE * fOutput,
+ RscTypCont * pTC, USHORT nTab, const char * );
+ ERRTYPE WriteRc( const RSCINST & rInst, RscWriteRc & aMem,
+ RscTypCont * pTC, USHORT, BOOL bExtra );
+ virtual void WriteRcAccess( FILE * fOutput, RscTypCont * pTC,
+ const char * );
+};
+
+class RscClassArray : public RscArray
+{
+public:
+ RscClassArray( HASHID nId, USHORT nTypId,
+ RscTop * pSuper, RscEnum * pTypeClass,
+ USHORT * pTypeValue, USHORT * pFallBackType );
+ ~RscClassArray();
+ virtual void WriteSrcHeader( const RSCINST & rInst, FILE * fOutput,
+ RscTypCont * pTC, USHORT nTab,
+ const RscId & aId, const char * );
+ void WriteSrc( const RSCINST & rInst, FILE * fOutput,
+ RscTypCont * pTC, USHORT nTab, const char * );
+ virtual ERRTYPE WriteRcHeader( const RSCINST & rInst, RscWriteRc & aMem,
+ RscTypCont * pTC, const RscId & aId,
+ USHORT nDeep, BOOL bExtra );
+};
+
+
+class RscLangArray : public RscArray
+{
+public:
+ RscLangArray( HASHID nId, USHORT nTypId,
+ RscTop * pSuper, RscEnum * pTypeClass,
+ USHORT * pTypeValue, USHORT * pFallBackType );
+ virtual RSCCLASS_TYPE GetClassType() const;
+};
+
+#endif //_RSCARRAY
diff --git a/rsc/inc/rscclass.hxx b/rsc/inc/rscclass.hxx
new file mode 100644
index 000000000000..df5d5cb5c557
--- /dev/null
+++ b/rsc/inc/rscclass.hxx
@@ -0,0 +1,188 @@
+/*************************************************************************
+ *
+ * $RCSfile: rscclass.hxx,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 16:42:54 $
+ *
+ * The Contents of this file are made available subject to the terms of
+ * either of the following licenses
+ *
+ * - GNU Lesser General Public License Version 2.1
+ * - Sun Industry Standards Source License Version 1.1
+ *
+ * Sun Microsystems Inc., October, 2000
+ *
+ * GNU Lesser General Public License Version 2.1
+ * =============================================
+ * Copyright 2000 by Sun Microsystems, Inc.
+ * 901 San Antonio Road, Palo Alto, CA 94303, USA
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1, as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ *
+ *
+ * Sun Industry Standards Source License Version 1.1
+ * =================================================
+ * The contents of this file are subject to the Sun Industry Standards
+ * Source License Version 1.1 (the "License"); You may not use this file
+ * except in compliance with the License. You may obtain a copy of the
+ * License at http://www.openoffice.org/license.html.
+ *
+ * Software provided under this License is provided on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
+ * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
+ * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
+ * See the License for the specific provisions governing your rights and
+ * obligations concerning the Software.
+ *
+ * The Initial Developer of the Original Code is: Sun Microsystems, Inc.
+ *
+ * Copyright: 2000 by Sun Microsystems, Inc.
+ *
+ * All Rights Reserved.
+ *
+ * Contributor(s): _______________________________________
+ *
+ *
+ ************************************************************************/
+/************************************************************************
+
+ Source Code Control System - Header
+
+ $Header: /zpool/svn/migration/cvs_rep_09_09_08/code/rsc/inc/rscclass.hxx,v 1.1.1.1 2000-09-18 16:42:54 hr Exp $
+
+**************************************************************************/
+
+#ifndef _RSCCLASS_HXX
+#define _RSCCLASS_HXX
+
+#ifndef _RSCALL_H
+#include <rscall.h>
+#endif
+#ifndef _RSCERROR_H
+#include <rscerror.h>
+#endif
+#ifndef _RSCHASH_HXX
+#include <rschash.hxx>
+#endif
+#ifndef _RSCTOP_HXX
+#include <rsctop.hxx>
+#endif
+
+/******************* R s c C l a s s *************************************/
+class RscClass : public RscTop
+{
+protected:
+ struct RscClassInst{
+ ULONG nVarDflt;
+ };
+ struct VARTYPE_STRUCT {
+ HASHID nVarName; // Variablenname
+ RSCVAR nVarType; // Variablentyp
+ USHORT nMask; // Maskierungsbit
+ USHORT nOffset; // Beginn der Instanzdaten
+ RscTop * pClass; // Klasse
+ CLASS_DATA pDefault; // Zeiger auf DefaultDaten
+ HASHID nDataBaseName;//Name fuer Fremddatenbereich
+ };
+ USHORT nSuperSize; // Groesse der Instanzdaten der SuperKl.
+ USHORT nSize; // Groesse der Instanzdaten dieser Klasse
+ // mit Superklassen
+ USHORT nEntries; // Eintraege in pVarTypeList
+ VARTYPE_STRUCT * pVarTypeList; // Variablenliste
+ RSCINST GetInstData( CLASS_DATA pData, USHORT nEle,
+ BOOL bGetCopy = FALSE );
+ CLASS_DATA GetDfltData( USHORT nEle );
+ BOOL IsDflt( CLASS_DATA pData, USHORT nEle );
+ BOOL IsValueDflt( CLASS_DATA pData, USHORT nEle );
+ void SetVarDflt( CLASS_DATA pData, USHORT nEle,
+ BOOL bSet );
+ long GetCorrectValues( const RSCINST & rInst, USHORT nVarPos,
+ USHORT nTupelIdx, RscTypCont * pTC );
+public:
+ RscClass( HASHID nId, USHORT nTypId, RscTop * pSuperCl );
+ ~RscClass();
+
+ virtual RSCCLASS_TYPE GetClassType() const;
+
+ void Pre_dtor();
+ ERRTYPE SetVariable( HASHID nVarName, RscTop * pClass,
+ RSCINST * pDflt,
+ RSCVAR nVarType, USHORT nMask,
+ HASHID nDataBaseName );
+ virtual void EnumVariables( void * pData, VarEnumCallbackProc );
+ RSCINST GetVariable( const RSCINST & rInst, HASHID nVarName,
+ const RSCINST & rInitInst,
+ BOOL nInitDflt = FALSE,
+ RscTop * pCreateClass = NULL );
+ RSCINST GetCopyVar( const RSCINST & rInst, HASHID nVarName );
+
+ // Gibt die Groesse der Klasse in Bytes
+ USHORT Size(){ return( nSize ); };
+
+ BOOL IsConsistent( const RSCINST & rInst, RscInconsList * pList );
+ void SetToDefault( const RSCINST & rInst );
+ BOOL IsDefault( const RSCINST & rInst );
+ BOOL IsValueDefault( const RSCINST & rInst, CLASS_DATA pDef );
+ void SetDefault( const RSCINST & rData, HASHID nVarId );
+ RSCINST GetDefault( HASHID nVarId );
+
+ RSCINST Create( RSCINST * pInst, const RSCINST & rDflt, BOOL );
+ void Destroy( const RSCINST & rInst );
+ void WriteSrc( const RSCINST & rInst, FILE * fOutput,
+ RscTypCont * pTC, USHORT nTab, const char * );
+ ERRTYPE WriteInstRc( const RSCINST & rInst, RscWriteRc & aMem,
+ RscTypCont * pTC, USHORT, BOOL bExtra );
+ ERRTYPE WriteRc( const RSCINST & rInst, RscWriteRc & aMem,
+ RscTypCont * pTC, USHORT, BOOL bExtra );
+ void WriteSyntax( FILE * fOutput, RscTypCont * pTC );
+
+ void WriteRcAccess( FILE * fOutput, RscTypCont * pTC,
+ const char * );
+ void WriteRcCtor( FILE * fOutput, RscTypCont * pTC );
+};
+
+class RscSysDepend : public RscClass
+{
+public:
+ RscSysDepend( HASHID nId, USHORT nTypId, RscTop * pSuper );
+ ERRTYPE WriteSysDependRc( const RSCINST &, RscWriteRc & aMem,
+ RscTypCont * pTC, USHORT, BOOL bExtra,
+ BOOL bFirst = FALSE );
+ ERRTYPE WriteRc( const RSCINST &, RscWriteRc & aMem,
+ RscTypCont * pTC, USHORT, BOOL bExtra );
+};
+
+class RscFirstSysDepend : public RscSysDepend
+{
+public:
+ RscFirstSysDepend( HASHID nId, USHORT nTypId,
+ RscTop * pSuper );
+ ERRTYPE WriteRc( const RSCINST &, RscWriteRc & aMem,
+ RscTypCont * pTC, USHORT, BOOL bExtra );
+};
+
+class RscTupel : public RscClass
+{
+public:
+ RscTupel( HASHID nId, USHORT nTypId, RscTop * pSuper );
+ RSCINST GetTupelVar( const RSCINST & rInst, USHORT nPos,
+ const RSCINST & rInitInst );
+ void WriteSrc( const RSCINST & rInst, FILE * fOutput,
+ RscTypCont * pTC, USHORT nTab, const char * );
+};
+
+#endif //_RSCCLASS_HXX
diff --git a/rsc/inc/rscclobj.hxx b/rsc/inc/rscclobj.hxx
new file mode 100644
index 000000000000..334bb9c145f1
--- /dev/null
+++ b/rsc/inc/rscclobj.hxx
@@ -0,0 +1,183 @@
+/*************************************************************************
+ *
+ * $RCSfile: rscclobj.hxx,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 16:42:54 $
+ *
+ * The Contents of this file are made available subject to the terms of
+ * either of the following licenses
+ *
+ * - GNU Lesser General Public License Version 2.1
+ * - Sun Industry Standards Source License Version 1.1
+ *
+ * Sun Microsystems Inc., October, 2000
+ *
+ * GNU Lesser General Public License Version 2.1
+ * =============================================
+ * Copyright 2000 by Sun Microsystems, Inc.
+ * 901 San Antonio Road, Palo Alto, CA 94303, USA
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1, as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ *
+ *
+ * Sun Industry Standards Source License Version 1.1
+ * =================================================
+ * The contents of this file are subject to the Sun Industry Standards
+ * Source License Version 1.1 (the "License"); You may not use this file
+ * except in compliance with the License. You may obtain a copy of the
+ * License at http://www.openoffice.org/license.html.
+ *
+ * Software provided under this License is provided on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
+ * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
+ * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
+ * See the License for the specific provisions governing your rights and
+ * obligations concerning the Software.
+ *
+ * The Initial Developer of the Original Code is: Sun Microsystems, Inc.
+ *
+ * Copyright: 2000 by Sun Microsystems, Inc.
+ *
+ * All Rights Reserved.
+ *
+ * Contributor(s): _______________________________________
+ *
+ *
+ ************************************************************************/
+/************************************************************************
+
+ Source Code Control System - Header
+
+ $Header: /zpool/svn/migration/cvs_rep_09_09_08/code/rsc/inc/rscclobj.hxx,v 1.1.1.1 2000-09-18 16:42:54 hr Exp $
+
+ Source Code Control System - Update
+
+ $Log: not supported by cvs2svn $
+ Revision 1.6 2000/09/17 12:51:09 willem.vandorp
+ OpenOffice header added.
+
+ Revision 1.5 2000/07/26 17:13:17 willem.vandorp
+ Headers/footers replaced
+
+ Revision 1.4 1997/08/27 18:18:12 MM
+ neue Headerstruktur
+
+
+ Rev 1.3 27 Aug 1997 18:18:12 MM
+ neue Headerstruktur
+
+ Rev 1.2 21 Nov 1995 19:49:10 TLX
+ Neuer Link
+
+ Rev 1.1 12 Jan 1994 15:18:10 mm
+ Alignementprobleme und Warnings fuer DEC-Alpha beseitigt
+
+ Rev 1.0 10 Aug 1992 07:14:38 MM
+ Initial revision.
+
+ Rev 1.2 23 Mar 1992 15:23:42 MM
+
+ Rev 1.1 10 Dec 1991 11:49:10 MM
+ ObjNode::DelObjNode
+
+ Rev 1.0 26 Nov 1991 08:57:04 MM
+ Initial revision.
+
+**************************************************************************/
+
+#ifndef _RSCCLOBJ_HXX
+#define _RSCCLOBJ_HXX
+
+#ifndef _RSCTREE_HXX
+#include <rsctree.hxx>
+#endif
+#ifndef _RSCDEF_HXX
+#include <rscdef.hxx>
+#endif
+#ifndef _RSCALL_H
+#include <rscall.h>
+#endif
+
+/****************** C L A S S E S ****************************************/
+class RscTypCont;
+
+/*********** R s c I n c o n s i s t e n t *******************************/
+class RscInconsistent {
+public:
+ RscId aFirstId; //Paar von inkonsistenten Id's
+ RscId aSecondId;
+ RscInconsistent( const RscId & rFirst, const RscId & rSecond ){
+ aFirstId = rFirst;
+ aSecondId = rSecond;
+ };
+};
+
+DECLARE_LIST( RscInconsList, RscInconsistent * )
+
+/******************* O b j N o d e ***************************************/
+class ObjNode : public IdNode{
+ RscId aRscId; // Id der Resource
+ CLASS_DATA pRscObj;// pointer to a resourceobject
+ ULONG lFileKey;// Dateischluessel
+public:
+ ObjNode( const RscId & rId, CLASS_DATA pData, ULONG lKey );
+ ObjNode * DelObjNode( RscTop * pClass, ULONG lFileKey );
+ USHORT GetId() const;
+ RscId GetRscId(){ return( aRscId ); }
+ ULONG GetFileKey(){ return lFileKey; };
+ ObjNode* Search( const RscId &rName ) const{
+ // search the index in the b-tree
+ return( (ObjNode *)IdNode::Search( rName ) );
+ }
+ BOOL Insert( ObjNode* pTN ){
+ // insert a new node in the b-tree
+ return( IdNode::Insert( (IdNode *)pTN ) );
+ }
+ CLASS_DATA GetRscObj(){
+ // get the Object from this Node
+ return( pRscObj );
+ }
+ BOOL IsConsistent( RscInconsList * pList = NULL );
+};
+
+/******************* R e f N o d e ***************************************/
+class RefNode : public IdNode{
+ HASHID nTypNameId; // index of a Name in a hashtabel
+public:
+ ObjNode* pObjBiTree; // Zeiger auf Objektbaum
+ RefNode( HASHID nTyp );
+ USHORT GetId() const;
+ RefNode* Search( HASHID typ ) const{
+ // search the index in the b-tree
+ return( (RefNode *)IdNode::Search( typ ) );
+ };
+ BOOL Insert( RefNode* pTN ){
+ // insert a new node in the b-tree
+ return( IdNode::Insert( (IdNode *)pTN ) );
+ };
+ BOOL PutObjNode( ObjNode * pPutObject );
+
+ // insert new node in b-tree pObjBiTree
+ ObjNode * GetObjNode( const RscId &rRscId );
+
+ ObjNode * GetObjNode(){
+ // hole pObjBiTree
+ return( pObjBiTree );
+ };
+};
+
+#endif // _RSCCLOBJ_HXX
diff --git a/rsc/inc/rscconst.hxx b/rsc/inc/rscconst.hxx
new file mode 100644
index 000000000000..580aac51a689
--- /dev/null
+++ b/rsc/inc/rscconst.hxx
@@ -0,0 +1,146 @@
+/*************************************************************************
+ *
+ * $RCSfile: rscconst.hxx,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 16:42:54 $
+ *
+ * The Contents of this file are made available subject to the terms of
+ * either of the following licenses
+ *
+ * - GNU Lesser General Public License Version 2.1
+ * - Sun Industry Standards Source License Version 1.1
+ *
+ * Sun Microsystems Inc., October, 2000
+ *
+ * GNU Lesser General Public License Version 2.1
+ * =============================================
+ * Copyright 2000 by Sun Microsystems, Inc.
+ * 901 San Antonio Road, Palo Alto, CA 94303, USA
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1, as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ *
+ *
+ * Sun Industry Standards Source License Version 1.1
+ * =================================================
+ * The contents of this file are subject to the Sun Industry Standards
+ * Source License Version 1.1 (the "License"); You may not use this file
+ * except in compliance with the License. You may obtain a copy of the
+ * License at http://www.openoffice.org/license.html.
+ *
+ * Software provided under this License is provided on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
+ * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
+ * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
+ * See the License for the specific provisions governing your rights and
+ * obligations concerning the Software.
+ *
+ * The Initial Developer of the Original Code is: Sun Microsystems, Inc.
+ *
+ * Copyright: 2000 by Sun Microsystems, Inc.
+ *
+ * All Rights Reserved.
+ *
+ * Contributor(s): _______________________________________
+ *
+ *
+ ************************************************************************/
+/************************************************************************
+
+ Source Code Control System - Header
+
+ $Header: /zpool/svn/migration/cvs_rep_09_09_08/code/rsc/inc/rscconst.hxx,v 1.1.1.1 2000-09-18 16:42:54 hr Exp $
+
+**************************************************************************/
+
+#ifndef _RSCCONST_HXX
+#define _RSCCONST_HXX
+
+#ifndef _RSCALL_H
+#include <rscall.h>
+#endif
+#ifndef _RSCERROR_H
+#include <rscerror.h>
+#endif
+#ifndef _RSCHASH_HXX
+#include <rschash.hxx>
+#endif
+#ifndef _RSCTOP_HXX
+#include <rsctop.hxx>
+#endif
+
+/******************* R s c C o n s t *************************************/
+class RscConst : public RscTop
+{
+protected:
+ struct VarEle {
+ HASHID nId; // Name der Konstante
+ INT32 lValue; // Wert der Konstante
+ };
+ VarEle * pVarArray; // Zeiger auf das Feld mit Konstanten
+ USHORT nEntries; // Anzahle der Eintraege im Feld
+public:
+ RscConst( HASHID nId, USHORT nTypId );
+ ~RscConst();
+ virtual RSCCLASS_TYPE GetClassType() const;
+ USHORT GetEntryCount() const { return nEntries; }
+ // Die erlaubten Werte werden gesetzt
+ ERRTYPE SetConstant( HASHID nVarName, INT32 lValue );
+ HASHID GetConstant( USHORT nPos );
+ BOOL GetConstValue( HASHID nConstId, INT32 * pVal ) const;
+ BOOL GetValueConst( INT32 nValue, HASHID * pConstId ) const;
+ USHORT GetConstPos( HASHID nConstId );
+ virtual void WriteSyntax( FILE * fOutput, RscTypCont * pTC );
+ virtual void WriteRcAccess( FILE * fOutput, RscTypCont * pTC,
+ const char * );
+};
+
+/******************* R s c E n u m ***************************************/
+class RscEnum : public RscConst {
+ struct RscEnumInst {
+ USHORT nValue; // Position der Konstanten im Array
+ BOOL bDflt; // Ist Default
+ };
+ USHORT nSize;
+ BOOL bUSHORT;
+public:
+ RscEnum( HASHID nId, USHORT nTypId, BOOL bUSHORT = TRUE );
+ RSCINST Create( RSCINST * pInst, const RSCINST & rDfltInst, BOOL );
+ USHORT Size(){ return nSize; }
+
+ virtual void SetToDefault( const RSCINST & rInst )
+ {
+ ((RscEnumInst*)rInst.pData)->bDflt = TRUE;
+ }
+ BOOL IsDefault( const RSCINST & rInst )
+ {
+ return( ((RscEnumInst*)rInst.pData)->bDflt );
+ };
+ // Als Default setzen
+ BOOL IsValueDefault( const RSCINST & rInst, CLASS_DATA pDef );
+
+ ERRTYPE SetConst( const RSCINST & rInst, HASHID nValueId,
+ long nValue );
+ ERRTYPE SetNumber( const RSCINST & rInst, long nValue );
+ ERRTYPE GetConst( const RSCINST & rInst, HASHID * );
+ ERRTYPE GetNumber( const RSCINST & rInst, long * nValue );
+ void WriteSrc( const RSCINST &rInst, FILE * fOutput,
+ RscTypCont * pTC, USHORT nTab, const char * );
+ ERRTYPE WriteRc( const RSCINST & rInst, RscWriteRc & aMem,
+ RscTypCont * pTC, USHORT, BOOL bExtra );
+};
+
+#endif // _RSCCONST_HXX
diff --git a/rsc/inc/rsccont.hxx b/rsc/inc/rsccont.hxx
new file mode 100644
index 000000000000..ad2877abdad4
--- /dev/null
+++ b/rsc/inc/rsccont.hxx
@@ -0,0 +1,244 @@
+/*************************************************************************
+ *
+ * $RCSfile: rsccont.hxx,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 16:42:54 $
+ *
+ * The Contents of this file are made available subject to the terms of
+ * either of the following licenses
+ *
+ * - GNU Lesser General Public License Version 2.1
+ * - Sun Industry Standards Source License Version 1.1
+ *
+ * Sun Microsystems Inc., October, 2000
+ *
+ * GNU Lesser General Public License Version 2.1
+ * =============================================
+ * Copyright 2000 by Sun Microsystems, Inc.
+ * 901 San Antonio Road, Palo Alto, CA 94303, USA
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1, as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ *
+ *
+ * Sun Industry Standards Source License Version 1.1
+ * =================================================
+ * The contents of this file are subject to the Sun Industry Standards
+ * Source License Version 1.1 (the "License"); You may not use this file
+ * except in compliance with the License. You may obtain a copy of the
+ * License at http://www.openoffice.org/license.html.
+ *
+ * Software provided under this License is provided on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
+ * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
+ * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
+ * See the License for the specific provisions governing your rights and
+ * obligations concerning the Software.
+ *
+ * The Initial Developer of the Original Code is: Sun Microsystems, Inc.
+ *
+ * Copyright: 2000 by Sun Microsystems, Inc.
+ *
+ * All Rights Reserved.
+ *
+ * Contributor(s): _______________________________________
+ *
+ *
+ ************************************************************************/
+/************************************************************************
+
+ Source Code Control System - Header
+
+ $Header: /zpool/svn/migration/cvs_rep_09_09_08/code/rsc/inc/rsccont.hxx,v 1.1.1.1 2000-09-18 16:42:54 hr Exp $
+
+ Source Code Control System - Update
+
+ $Log: not supported by cvs2svn $
+ Revision 1.11 2000/09/17 12:51:09 willem.vandorp
+ OpenOffice header added.
+
+ Revision 1.10 2000/07/26 17:13:17 willem.vandorp
+ Headers/footers replaced
+
+ Revision 1.9 1997/08/27 18:18:04 MM
+ neue Headerstruktur
+
+
+ Rev 1.8 27 Aug 1997 18:18:04 MM
+ neue Headerstruktur
+
+ Rev 1.7 12 Sep 1996 12:45:38 MM
+ Eigene Ressourcen definieren
+
+ Rev 1.6 21 Nov 1995 19:49:16 TLX
+ Neuer Link
+
+ Rev 1.5 25 Aug 1993 15:33:58 mm
+ Fehler und Warnings beseitigt
+
+ Rev 1.4 04 Feb 1993 17:38:58 mm
+ GetClassType Fehler verbessert und keine Inline -ctor.
+
+ Rev 1.3 03 Feb 1993 15:03:12 mm
+ GetClassType() implementiert
+
+ Rev 1.2 05 Jan 1993 10:50:30 mm
+ Neues Default verhalten
+
+ Rev 1.1 23 Dec 1992 14:02:24 mm
+ Sprachaenderung
+
+ Rev 1.0 10 Aug 1992 07:14:38 MM
+ Initial revision.
+
+ Rev 1.13 29 Jul 1992 15:45:18 MM
+ Aenderungen wg. MSC7.0
+
+**************************************************************************/
+
+#ifndef _RSCCONT_HXX
+#define _RSCCONT_HXX
+
+#ifndef _RSCALL_H
+#include <rscall.h>
+#endif
+#ifndef _RSCERROR_H
+#include <rscerror.h>
+#endif
+#ifndef _RSCTOP_HXX
+#include <rsctop.hxx>
+#endif
+
+/******************* R s c B a s e C o n t *******************************/
+struct ENTRY_STRUCT {
+ RscId aName;
+ RSCINST aInst;
+ void Create(){ aName.Create(); aInst = RSCINST(); }
+ void Destroy();
+};
+struct RscBaseContInst {
+ USHORT nEntries;
+ ENTRY_STRUCT * pEntries;
+ BOOL bDflt;
+};
+
+class RscBaseCont : public RscTop
+{
+protected:
+ RscTop * pTypeClass; // Typ der Eintraege
+ RscTop * pTypeClass1;// Zwei verschiedene Typen moeglich
+ BOOL bNoId; // Keine Identifier
+ USHORT nSize; // Groesse der Instanzdaten dieser Klasse
+ // mit Superklassen
+ USHORT nOffInstData;// Offset auf eigen Instanzdaten
+ void DestroyElements( RscBaseContInst * pClassData );
+ RSCINST SearchElePos( const RSCINST & rInst, const RscId & rEleName,
+ RscTop * pClass, USHORT nPos );
+protected:
+ void ContWriteSrc( const RSCINST & rInst, FILE * fOutput,
+ RscTypCont * pTC, USHORT nTab, const char * );
+ ERRTYPE ContWriteRc( const RSCINST & rInst, RscWriteRc & aMem,
+ RscTypCont * pTC, USHORT, BOOL bExtra );
+ void ContWriteRcAccess( FILE * fOutput, RscTypCont * pTC,
+ const char *, BOOL nWriteSize );
+public:
+ RscBaseCont( HASHID nId, USHORT nTypId,
+ RscTop * pSuper = NULL,
+ BOOL bNoId = TRUE );
+ ~RscBaseCont();
+ virtual RSCCLASS_TYPE GetClassType() const;
+ void SetTypeClass( RscTop * pClass, RscTop * pClass1 = NULL )
+ {
+ pTypeClass = pClass;
+ pTypeClass1 = pClass1;
+ };
+ RSCINST Create( RSCINST * pInst, const RSCINST & rDflt, BOOL );
+ void Destroy( const RSCINST & rInst );
+ ERRTYPE GetElement( const RSCINST & rInst, const RscId & rEleName,
+ RscTop * pCreateClass, const RSCINST & rCreateInst,
+ RSCINST * pGetInst );
+ RSCINST SearchEle( const RSCINST & rInst, const RscId & rEleName,
+ RscTop * pClass );
+ USHORT GetCount( const RSCINST & rInst );
+ RSCINST GetPosEle( const RSCINST & rInst, USHORT nPos );
+ ERRTYPE MovePosEle( const RSCINST & rInst, USHORT nDestPos,
+ USHORT nSourcePos );
+ virtual ERRTYPE SetPosRscId( const RSCINST & rInst, USHORT nPos,
+ const RscId & rRscId);
+ SUBINFO_STRUCT GetInfoEle( const RSCINST & rInst, USHORT nPos );
+ ERRTYPE SetString( const RSCINST &, char * pStr );
+ ERRTYPE SetNumber( const RSCINST &, long lValue );
+ ERRTYPE SetBool( const RSCINST & rInst, BOOL bValue );
+ ERRTYPE SetConst( const RSCINST & rInst, HASHID nValueId,
+ long nValue );
+ ERRTYPE SetRef( const RSCINST & rInst, const RscId & rRefId );
+
+ // Gibt die Groesse der Klasse in Bytes
+ USHORT Size(){ return( nSize ); };
+
+ BOOL IsConsistent( const RSCINST & rInst, RscInconsList * pList );
+ void SetToDefault( const RSCINST & rInst );
+ BOOL IsDefault( const RSCINST & rInst );
+ BOOL IsValueDefault( const RSCINST & rInst, CLASS_DATA pDef );
+
+ void Delete( const RSCINST & rInst, RscTop * pClass,
+ const RscId & rId );
+ void DeletePos( const RSCINST & rInst, USHORT nPos );
+
+ void WriteSrc( const RSCINST & rInst, FILE * fOutput,
+ RscTypCont * pTC, USHORT nTab, const char * );
+ ERRTYPE WriteRc( const RSCINST & rInst, RscWriteRc & aMem,
+ RscTypCont * pTC, USHORT , BOOL bExtra);
+ ERRTYPE WriteHxx( const RSCINST & rInst, FILE * fOutput,
+ RscTypCont * pTC, const RscId & rId );
+ ERRTYPE WriteCxx( const RSCINST & rInst, FILE * fOutput,
+ RscTypCont * pTC, const RscId &rId );
+};
+
+/******************* R s c C o n t W r i t e S r c ***********************/
+class RscContWriteSrc : public RscBaseCont
+{
+public:
+ RscContWriteSrc( HASHID nId, USHORT nTypId,
+ RscTop * pSuper = NULL,
+ BOOL bNoId = TRUE );
+ void WriteSrc( const RSCINST & rInst, FILE * fOutput,
+ RscTypCont * pTC, USHORT nTab, const char * );
+};
+
+/******************* R s c C o n t ***************************************/
+class RscCont : public RscContWriteSrc {
+public:
+ RscCont( HASHID nId, USHORT nTypId,
+ RscTop * pSuper = NULL,
+ BOOL bNoId = TRUE );
+ ERRTYPE WriteRc( const RSCINST & rInst, RscWriteRc & aMem,
+ RscTypCont * pTC, USHORT, BOOL bExtra );
+ void WriteRcAccess( FILE * fOutput, RscTypCont * pTC,
+ const char * );
+};
+
+/******************* R s c C o n t E x t r a D a t a *********************/
+class RscContExtraData : public RscContWriteSrc {
+public:
+ RscContExtraData( HASHID nId, USHORT nTypId,
+ RscTop * pSuper = NULL,
+ BOOL bNoId = TRUE );
+ ERRTYPE WriteRc( const RSCINST & rInst, RscWriteRc & aMem,
+ RscTypCont * pTC, USHORT, BOOL bExtra );
+};
+
+#endif //_RSCCONT_HXX
diff --git a/rsc/inc/rscdb.hxx b/rsc/inc/rscdb.hxx
new file mode 100644
index 000000000000..7f92d7e78e46
--- /dev/null
+++ b/rsc/inc/rscdb.hxx
@@ -0,0 +1,406 @@
+/*************************************************************************
+ *
+ * $RCSfile: rscdb.hxx,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 16:42:54 $
+ *
+ * The Contents of this file are made available subject to the terms of
+ * either of the following licenses
+ *
+ * - GNU Lesser General Public License Version 2.1
+ * - Sun Industry Standards Source License Version 1.1
+ *
+ * Sun Microsystems Inc., October, 2000
+ *
+ * GNU Lesser General Public License Version 2.1
+ * =============================================
+ * Copyright 2000 by Sun Microsystems, Inc.
+ * 901 San Antonio Road, Palo Alto, CA 94303, USA
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1, as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ *
+ *
+ * Sun Industry Standards Source License Version 1.1
+ * =================================================
+ * The contents of this file are subject to the Sun Industry Standards
+ * Source License Version 1.1 (the "License"); You may not use this file
+ * except in compliance with the License. You may obtain a copy of the
+ * License at http://www.openoffice.org/license.html.
+ *
+ * Software provided under this License is provided on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
+ * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
+ * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
+ * See the License for the specific provisions governing your rights and
+ * obligations concerning the Software.
+ *
+ * The Initial Developer of the Original Code is: Sun Microsystems, Inc.
+ *
+ * Copyright: 2000 by Sun Microsystems, Inc.
+ *
+ * All Rights Reserved.
+ *
+ * Contributor(s): _______________________________________
+ *
+ *
+ ************************************************************************/
+
+#ifndef _RSCDB_HXX
+#define _RSCDB_HXX
+
+#ifndef _TABLE_HXX //autogen
+#include <tools/table.hxx>
+#endif
+
+#ifndef _LANG_HXX //autogen
+#include <tools/lang.hxx>
+#endif
+
+#ifndef _RSCALL_H
+#include <rscall.h>
+#endif
+#ifndef _RSCKEY_HXX
+#include <rsckey.hxx>
+#endif
+#ifndef _RSCCONST_HXX
+#include <rscconst.hxx>
+#endif
+#ifndef _RSCFLAG_HXX
+#include <rscflag.hxx>
+#endif
+#ifndef _RSCRANGE_HXX
+#include <rscrange.hxx>
+#endif
+#ifndef _RSCSTR_HXX
+#include <rscstr.hxx>
+#endif
+#ifndef _RSCARRAY_HXX
+#include <rscarray.hxx>
+#endif
+#ifndef _RSCDEF_HXX
+#include <rscdef.hxx>
+#endif
+
+class RscError;
+class REResourceList;
+class RscTupel;
+class RscCont;
+
+/****************** R s c T y p C o n ************************************/
+// Liste die alle Basistypen enthaelt
+DECLARE_LIST( RscBaseList, RscTop * )
+
+// Tabelle fuer Systemabhaengige Resourcen
+struct RscSysEntry
+{
+ USHORT nKey;
+ USHORT nRscTyp;
+ ByteString aFileName;
+ USHORT nTyp;
+ USHORT nRefId;
+};
+DECLARE_LIST( RscSysList, RscSysEntry * )
+
+class RscTypCont
+{
+ CharSet nSourceCharSet;
+ USHORT nLangTypeId; // Globale Sprachtyp
+ USHORT nDfltLangTypeId; // fallback fuer globalen Sprachtyp
+ USHORT nMachineId; // Globaler Maschinentyp
+ RSCBYTEORDER_TYPE nByteOrder; // Intel oder
+ ByteString aSearchPath; // Suchen der Bitmap, Icon, Pointer
+ USHORT nUniqueId; // eindeutiger Id fuer Systemresourcen
+ ULONG nFilePos; // Position in der Datei ( MTF )
+ USHORT nPMId; // eindeutiger Id fuer PM-Rseourcefile
+ // muss groesser als RSC_VERSIONCONTROL_ID sein
+ RscTop * pRoot; // Zeiger auf die Wurzel vom Typenbaum
+ RSCINST aVersion; // Versionskontrollinstanz
+
+ RscBaseList aBaseLst; // Liste der einfachen Resourceklasse
+ RscSysList aSysLst; // Liste der Systemresourcen
+
+ HASHID nWinBitVarId; // Name der Winbitvariablen
+ HASHID nBorderId;
+ HASHID nHideId;
+ HASHID nClipChildrenId;
+ HASHID nSizeableId;
+ HASHID nMoveableId;
+ HASHID nMinimizeId;
+ HASHID nMaximizeId;
+ HASHID nCloseableId;
+ HASHID nAppId;
+ HASHID nTabstopId;
+ HASHID nGroupId;
+ HASHID nSysmodalId;
+ HASHID nLeftId;
+ HASHID nCenterId;
+ HASHID nRightId;
+ HASHID nHscrollId;
+ HASHID nVscrollId;
+ HASHID nSortId;
+ HASHID nDefaultId;
+ HASHID nSVLookId;
+ HASHID nRepeatId;
+ HASHID nDropDownId;
+ HASHID nPassWordId;
+ HASHID nReadOnlyId;
+ HASHID nAutoSizeId;
+ HASHID nSpinId;
+ HASHID nTabControlId;
+ HASHID nSimpleModeId;
+ HASHID nDragId;
+ HASHID nSaveAsId;
+ HASHID nOpenId;
+ HASHID nScrollId;
+ HASHID nZoomableId;
+ HASHID nHideWhenDeactivateId;
+ HASHID nAutoHScrollId;
+ HASHID nDDExtraWidthId;
+ HASHID nWordBreakId;
+ HASHID nLeftLabelId;
+ HASHID nHasLinesId;
+ HASHID nHasButtonsId;
+ HASHID nRectStyleId;
+ HASHID nLineSpacingId;
+ HASHID nSmallStyleId;
+ HASHID nEnableResizingId;
+ HASHID nDockableId;
+ HASHID nScaleId;
+ HASHID nIgnoreTabId;
+ HASHID nNoSplitDrawId;
+ HASHID nTopImageId;
+ HASHID nNoLabelId;
+
+ void Init(); // Initialisiert Klassen und Tabelle
+ void SETCONST( RscConst *, char *, UINT32 );
+ void SETCONST( RscConst *, HASHID, UINT32 );
+ RscEnum * InitLangType();
+ RscEnum * InitDateFormatType();
+ RscEnum * InitTimeFormatType();
+ RscEnum * InitWeekDayFormatType();
+ RscEnum * InitMonthFormatType();
+ RscEnum * InitFieldUnitsType();
+ RscEnum * InitDayOfWeekType();
+ RscEnum * InitTimeFieldFormat();
+ RscEnum * InitColor();
+ RscEnum * InitMapUnit();
+ RscEnum * InitKey();
+ RscEnum * InitTriState();
+ RscEnum * InitMessButtons();
+ RscEnum * InitMessDefButton();
+ RscTupel * InitGeometry();
+ RscArray * InitLangGeometry( RscTupel * pGeo );
+ RscArray * InitSystemGeometry( RscTupel * pGeo );
+ RscCont * InitStringList();
+ RscArray * InitLangStringList( RscCont * pStrLst );
+ RscTupel * InitStringTupel();
+ RscTupel * InitStringLongTupel();
+ RscCont * InitStringTupelList( RscTupel * pStringTupel );
+ RscCont * InitStringLongTupelList( RscTupel * pStringLongTupel );
+ RscArray * InitLangStringTupelList( RscCont * pStrTupelLst );
+ RscArray * InitLangStringLongTupelList( RscCont * pStrLongTupelLst );
+
+ RscTop * InitClassMgr();
+ RscTop * InitClassString( RscTop * pSuper );
+ RscTop * InitClassBitmap( RscTop * pSuper );
+ RscTop * InitClassColor( RscTop * pSuper, RscEnum * pColor );
+ RscTop * InitClassImage( RscTop * pSuper, RscTop *pClassBitmap,
+ RscTop * pClassColor );
+ RscTop * InitClassImageList( RscTop * pSuper, RscTop *pClassBitmap,
+ RscTop * pClassColor );
+ RscTop * InitClassWindow( RscTop * pSuper, RscEnum * pMapUnit,
+ RscArray * pLangGeo );
+ RscTop * InitClassSystemWindow( RscTop * pSuper );
+ RscTop * InitClassWorkWindow( RscTop * pSuper );
+ RscTop * InitClassModalDialog( RscTop * pSuper );
+ RscTop * InitClassModelessDialog( RscTop * pSuper );
+ RscTop * InitClassControl( RscTop * pSuper );
+ RscTop * InitClassPushButton( RscTop * pSuper );
+ RscTop * InitClassTriStateBox( RscTop * pSuper, RscEnum * pTriState );
+ RscTop * InitClassMenuButton( RscTop * pSuper, RscTop * pClasMenu );
+ RscTop * InitClassImageButton( RscTop * pSuper, RscTop * pClassImage,
+ RscEnum * pTriState );
+ RscTop * InitClassEdit( RscTop * pSuper );
+ RscTop * InitClassMultiLineEdit( RscTop * pSuper );
+ RscTop * InitClassScrollBar( RscTop * pSuper );
+ RscTop * InitClassListBox( RscTop * pSuper, RscArray * pStrLst );
+ RscTop * InitClassMultiListBox( RscTop * pSuper );
+ RscTop * InitClassComboBox( RscTop * pSuper, RscArray * pStrLst );
+ RscTop * InitClassFixedText( RscTop * pSuper );
+ RscTop * InitClassFixedBitmap( RscTop * pSuper, RscTop * pClassBitmap );
+ RscTop * InitClassFixedImage( RscTop * pSuper, RscTop * pClassImage );
+ RscTop * InitClassImageRadioButton( RscTop * pSuper, RscTop * pClassImage );
+ RscTop * InitClassKeyCode( RscTop * pSuper, RscEnum * pKey );
+ RscTop * InitClassAccelItem( RscTop * pSuper, RscTop * pKeyCode );
+ RscTop * InitClassAccel( RscTop * pSuper, RscTop * pClassAccelItem );
+ RscTop * InitClassMenuItem( RscTop * pSuper, RscTop * pClassBitmap,
+ RscTop * pClassKeyCode );
+ RscTop * InitClassMenu( RscTop * pSuper, RscTop * pMenuItem );
+ RscTop * InitClassMessBox( RscTop * pSuper,
+ RscEnum * pMessButtons,
+ RscEnum * pMessDefButton );
+ RscTop * InitClassSplitter( RscTop * pSuper );
+ RscTop * InitClassSplitWindow( RscTop * pSuper );
+ RscTop * InitClassTime( RscTop * pSuper );
+ RscTop * InitClassDate( RscTop * pSuper, RscEnum * pDayOfWeek );
+ RscTop * InitClassInt1( RscTop * pSuper,
+ RscEnum * pDateFormat,
+ RscEnum * pTimeFormat, RscEnum * pWeekDayFormat,
+ RscEnum * pMonthFormat );
+ RscTop * InitClassInternational( RscTop * pSuper,
+ RscEnum * pDateFormat,
+ RscEnum * pTimeFormat, RscEnum * pWeekDayFormat,
+ RscEnum * pMonthFormat );
+
+ RscTop * InitClassPatternFormatter( RscTop * pSuper );
+ RscTop * InitClassNumericFormatter( RscTop * pSuper,
+ RscTop * pClassI12 );
+ RscTop * InitClassMetricFormatter( RscTop * pSuper,
+ RscEnum * pFieldUnits );
+ RscTop * InitClassCurrencyFormatter( RscTop * pSuper,
+ RscEnum * pFieldUnits );
+ RscTop * InitClassDateFormatter( RscTop * pSuper, RscTop * pClassDate,
+ RscTop * pClassI12 );
+ RscTop * InitClassTimeFormatter( RscTop * pSuper, RscTop * pClassTime,
+ RscTop * pClassI12,
+ RscEnum * pTimeFieldFormat );
+
+ RscTop * InitClassSpinField( RscTop * pSuper );
+ RscTop * InitClassPatternField( RscTop * pSuper );
+ RscTop * InitClassNumericField( RscTop * pSuper );
+ RscTop * InitClassMetricField( RscTop * pSuper );
+ RscTop * InitClassCurrencyField( const char * pClassName, USHORT nRT,
+ RscTop * pSuper );
+ RscTop * InitClassDateField( RscTop * pSuper, RscTop * pClassDate );
+ RscTop * InitClassTimeField( RscTop * pSuper, RscTop * pClassTime );
+ RscTop * InitClassPatternBox( RscTop * pSuper );
+ RscTop * InitClassNumericBox( RscTop * pSuper );
+ RscTop * InitClassMetricBox( RscTop * pSuper );
+ RscTop * InitClassCurrencyBox( const char * pClassName, USHORT nRT,
+ RscTop * pSuper );
+ RscTop * InitClassDateBox( RscTop * pSuper, RscTop * pClassDate );
+ RscTop * InitClassTimeBox( RscTop * pSuper, RscTop * pClassTime );
+
+ RscTop * InitClassDockingWindow( RscTop * pSuper,
+ RscEnum * pMapUnit );
+ RscTop * InitClassToolBoxItem( RscTop * pSuper, RscTop * pClassBitmap,
+ RscTop * pClassImage,
+ RscEnum * pTriState );
+ RscTop * InitClassToolBox( RscTop * pSuper, RscTop * pClassToolBoxItem,
+ RscTop * pClassImageList );
+ RscTop * InitClassStatusBar( RscTop * pSuper );
+ RscTop * InitClassMoreButton( RscTop * pSuper, RscEnum * pMapUnit );
+ RscTop * InitClassFloatingWindow( RscTop * pSuper,
+ RscEnum * pMapUnit );
+ RscTop * InitClassTabControlItem( RscTop * pSuper,
+ RscTop * pClassTabPage );
+ RscTop * InitClassTabControl( RscTop * pSuper,
+ RscTop * pClassTabControlItem );
+ RscTop * InitClassSfxStyleFamilyItem( RscTop * pSuper,
+ RscTop * pClassBitmap,
+ RscTop * pClassImage,
+ RscArray * pStrLst );
+ RscTop * InitClassSfxTemplateDialog( RscTop * pSuper,
+ RscTop * pStyleFamily );
+ RscTop * InitClassSfxSlotInfo( RscTop * pSuper );
+
+ void InsWinBit( RscTop * pClass, const ByteString & rName,
+ HASHID nVal );
+ void WriteInc( FILE * fOutput, ULONG lKey );
+
+public:
+ RscBool aBool;
+ RscRange aShort;
+ RscRange aUShort;
+ RscLongRange aLong;
+ RscLongEnumRange aEnumLong;
+ RscIdRange aIdUShort;
+ RscIdRange aIdNoZeroUShort;
+ RscBreakRange aNoZeroShort;
+ RscRange a1to12Short;
+ RscRange a0to23Short;
+ RscRange a1to31Short;
+ RscRange a0to59Short;
+ RscRange a0to99Short;
+ RscRange a0to9999Short;
+ RscIdRange aIdLong;
+ RscString aString;
+ RscFlag aWinBits;
+ RscEnum aLangType;
+ RscLangArray aLangString;
+ RscLangArray aLangShort;
+
+ RscError* pEH; // Fehlerhandler
+ RscNameTable aNmTb; // Tabelle fuer Namen
+ RscFileTab aFileTab; // Tabelle der Dateinamen
+ USHORT nFlags;
+ Table aIdTranslator; //Ordnet Resourcetypen und Id's einen Id zu
+ //(unter PM), oder eine Dateiposition (MTF)
+
+ RscTypCont( RscError *, LanguageType,
+ RSCBYTEORDER_TYPE,
+ CharSet nSourceCharSet,
+ const ByteString & rSearchPath, USHORT nFlags );
+ ~RscTypCont();
+
+ BOOL IsPreload() const
+ { return (nFlags & PRELOAD_FLAG) ? TRUE : FALSE; }
+ BOOL IsSmart() const
+ { return (nFlags & SMART_FLAG) ? TRUE : FALSE; }
+ BOOL IsSysResTest() const
+ { return (nFlags & NOSYSRESTEST_FLAG) ? FALSE : TRUE; }
+ BOOL IsSrsDefault() const
+ { return (nFlags & SRSDEFAULT_FLAG) ? TRUE : FALSE; }
+ LanguageType ChangeLanguage( LanguageType eLang )
+ {
+ LanguageType nOldLang = (LanguageType)nLangTypeId;
+ nLangTypeId = eLang;
+ return nOldLang;
+ }
+ RSCBYTEORDER_TYPE GetByteOrder() const { return nByteOrder; }
+ CharSet GetSourceCharSet() const { return nSourceCharSet; }
+ void SetSearchPath( const ByteString & rStr) { aSearchPath = rStr; }
+ ByteString GetSearchPath() const { return aSearchPath; }
+ void InsertType( RscTop * pType )
+ {
+ aBaseLst.Insert( pType, LIST_APPEND );
+ }
+ RscTop * SearchType( HASHID nTypId );
+ RscTop * Search( HASHID typ );
+ CLASS_DATA Search( HASHID typ, const RscId & rId );
+ void Delete( HASHID typ, const RscId & rId );
+ // loescht alle Resourceobjekte diese Datei
+ void Delete( ULONG lFileKey );
+ RscTop * GetRoot() { return( pRoot ); };
+ USHORT PutSysName( USHORT nRscTyp, char * pName, USHORT nConst,
+ USHORT nId, BOOL bFirst );
+ ERRTYPE WriteRc( FILE * fOutput );
+ void WriteSrc( FILE * fOutput, ULONG nFileIndex,
+ CharSet nCharSet, BOOL bName = TRUE );
+ ERRTYPE WriteHxx( FILE * fOutput, ULONG nFileKey);
+ ERRTYPE WriteCxx( FILE * fOutput, ULONG nFileKey,
+ const ByteString & rHxxName );
+ void WriteSyntax( FILE * fOutput );
+ void WriteRcCtor( FILE * fOutput );
+ void FillNameIdList( REResourceList * pList, ULONG lFileKey );
+ BOOL MakeConsistent( RscInconsList * pList );
+ USHORT PutTranslatorKey( ULONG nKey );
+ void IncFilePos( ULONG nOffset ){ nFilePos += nOffset; }
+};
+
+#endif
+
diff --git a/rsc/inc/rscdef.hxx b/rsc/inc/rscdef.hxx
new file mode 100644
index 000000000000..2935d4061e8e
--- /dev/null
+++ b/rsc/inc/rscdef.hxx
@@ -0,0 +1,331 @@
+/*************************************************************************
+ *
+ * $RCSfile: rscdef.hxx,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 16:42:54 $
+ *
+ * The Contents of this file are made available subject to the terms of
+ * either of the following licenses
+ *
+ * - GNU Lesser General Public License Version 2.1
+ * - Sun Industry Standards Source License Version 1.1
+ *
+ * Sun Microsystems Inc., October, 2000
+ *
+ * GNU Lesser General Public License Version 2.1
+ * =============================================
+ * Copyright 2000 by Sun Microsystems, Inc.
+ * 901 San Antonio Road, Palo Alto, CA 94303, USA
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1, as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ *
+ *
+ * Sun Industry Standards Source License Version 1.1
+ * =================================================
+ * The contents of this file are subject to the Sun Industry Standards
+ * Source License Version 1.1 (the "License"); You may not use this file
+ * except in compliance with the License. You may obtain a copy of the
+ * License at http://www.openoffice.org/license.html.
+ *
+ * Software provided under this License is provided on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
+ * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
+ * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
+ * See the License for the specific provisions governing your rights and
+ * obligations concerning the Software.
+ *
+ * The Initial Developer of the Original Code is: Sun Microsystems, Inc.
+ *
+ * Copyright: 2000 by Sun Microsystems, Inc.
+ *
+ * All Rights Reserved.
+ *
+ * Contributor(s): _______________________________________
+ *
+ *
+ ************************************************************************/
+/************************************************************************
+
+ Source Code Control System - Header
+
+ $Header: /zpool/svn/migration/cvs_rep_09_09_08/code/rsc/inc/rscdef.hxx,v 1.1.1.1 2000-09-18 16:42:54 hr Exp $
+
+ Source Code Control System - Update
+
+ $Log: not supported by cvs2svn $
+ Revision 1.10 2000/09/17 12:51:09 willem.vandorp
+ OpenOffice header added.
+
+ Revision 1.9 2000/07/26 17:13:17 willem.vandorp
+ Headers/footers replaced
+
+ Revision 1.8 2000/07/11 17:00:08 th
+ Unicode
+
+ Revision 1.7 1997/08/27 18:18:14 MM
+ neue Headerstruktur
+
+**************************************************************************/
+
+#ifndef _RSCDEF_HXX
+#define _RSCDEF_HXX
+
+#ifndef _TOOLS_UNQIDX_HXX
+#include <tools/unqidx.hxx>
+#endif
+#ifndef _RSCTREE_HXX
+#include <rsctree.hxx>
+#endif
+
+/****************** C L A S S E S ****************************************/
+class RscExpression;
+class RscFileTab;
+class RscDefine;
+
+/*********** R s c E x p r e s s i o n ***********************************/
+#define RSCEXP_LONG 0
+#define RSCEXP_EXP 1
+#define RSCEXP_DEF 2
+#define RSCEXP_NOTHING 3
+
+class RscExpType
+{
+public:
+ union {
+ RscExpression * pExp;
+ RscDefine * pDef;
+ struct {
+ short nHi;
+ USHORT nLo;
+ } aLong;
+ } aExp;
+ char cType;
+ char cUnused;
+ BOOL IsNumber() const { return( RSCEXP_LONG == cType ); }
+ BOOL IsExpression()const { return( RSCEXP_EXP == cType ); }
+ BOOL IsDefinition()const { return( RSCEXP_DEF == cType ); }
+ BOOL IsNothing() const { return( RSCEXP_NOTHING == cType ); }
+ void SetLong( long lValue ){
+ aExp.aLong.nHi = (short)(lValue >> 16);
+ aExp.aLong.nLo = (USHORT)lValue;
+ cType = RSCEXP_LONG;
+ }
+ long GetLong() const{
+ return aExp.aLong.nLo |
+ ((long)aExp.aLong.nHi << 16);
+ }
+ BOOL Evaluate( long * pValue ) const;
+ void GetMacro( ByteString & ) const;
+};
+
+/*********** R s c I d ***************************************************/
+class RscId
+{
+ static BOOL bNames;// FALSE, bei den Namenoperation nur Zahlen
+public:
+ RscExpType aExp; // Zahl, Define oder Ausdruck
+ long GetNumber() const;
+ void Create( const RscExpType & rExpType );
+ void Create(){ aExp.cType = RSCEXP_NOTHING; }
+
+ RscId() { Create(); }
+
+ RscId( RscDefine * pEle );
+ RscId( long lNumber )
+ { aExp.SetLong( lNumber ); }
+
+ RscId( const RscExpType & rExpType )
+ { Create( rExpType ); }
+
+ void Destroy();
+
+ ~RscId(){
+ Destroy();
+ }
+
+ RscId( const RscId& rRscId );
+
+ RscId& operator = ( const RscId& rRscId );
+
+ static BOOL IsSetNames();
+ static void SetNames( BOOL bSet = TRUE );
+ operator long() const; // Gibt Nummer zurueck
+ ByteString GetName() const; // Gibt den Namen des Defines zurueck
+ ByteString GetMacro() const; // Gibt das Macro zurueck
+ BOOL operator < ( const RscId& rRscId ) const;
+ BOOL operator > ( const RscId& rRscId ) const;
+ BOOL operator == ( const RscId& rRscId ) const;
+ BOOL operator <= ( const RscId& rRscId ) const
+ { return !(operator > ( rRscId )); }
+ BOOL operator >= ( const RscId& rRscId ) const
+ { return !(operator < ( rRscId )); }
+ BOOL IsId() const { return !aExp.IsNothing(); }
+};
+
+/*********** R s c D e f i n e *******************************************/
+class RscDefine : public StringNode
+{
+friend class RscFileTab;
+friend class RscDefineList;
+friend class RscDefTree;
+friend class RscExpression;
+friend class RscId;
+ ULONG lFileKey; // zu welcher Datei gehoert das Define
+ USHORT nRefCount; // Wieviele Referenzen auf dieses Objekt
+ long lId; // Identifier
+ RscExpression * pExp; // Ausdruck
+protected:
+
+ RscDefine( ULONG lFileKey, const ByteString & rDefName,
+ long lDefId );
+ RscDefine( ULONG lFileKey, const ByteString & rDefName,
+ RscExpression * pExpression );
+ ~RscDefine();
+ void IncRef(){ nRefCount++; }
+ USHORT GetRefCount() const { return nRefCount; }
+ void DecRef();
+ void DefineToNumber();
+ void SetName( const ByteString & rNewName ){ aName = rNewName; }
+ void ChangeMacro( RscExpression * pExpression );
+ void ChangeMacro( long lIdentifier );
+public:
+ RscDefine * Search( const char * );
+ ULONG GetFileKey() const { return lFileKey; }
+ BOOL Evaluate();
+ long GetNumber() const { return lId; }
+ ByteString GetMacro();
+};
+
+DECLARE_LIST( RscSubDefList, RscDefine * )
+
+class RscDefineList : public RscSubDefList {
+friend class RscFile;
+friend class RscFileTab;
+private:
+ // pExpression wird auf jedenfall Eigentum der Liste
+ RscDefine * New( ULONG lFileKey, const ByteString & rDefName,
+ long lDefId, ULONG lPos );
+ RscDefine * New( ULONG lFileKey, const ByteString & rDefName,
+ RscExpression * pExpression, ULONG lPos );
+ BOOL Befor( const RscDefine * pFree, const RscDefine * pDepend );
+ BOOL Remove( RscDefine * pDef );
+ BOOL Remove( ULONG nIndex );
+ BOOL Remove();
+public:
+ void WriteAll( FILE * fOutput );
+};
+
+/*********** R s c E x p r e s s i o n ***********************************/
+class RscExpression {
+friend class RscFileTab;
+ char cOperation;
+ RscExpType aLeftExp;
+ RscExpType aRightExp;
+public:
+ RscExpression( RscExpType aLE, char cOp,
+ RscExpType aRE );
+ ~RscExpression();
+ BOOL Evaluate( long * pValue );
+ ByteString GetMacro();
+};
+
+/********************** R S C F I L E ************************************/
+class RscDepend {
+ ULONG lKey;
+public:
+ RscDepend( ULONG lIncKey ){ lKey = lIncKey; };
+ ULONG GetFileKey(){ return lKey; }
+};
+DECLARE_LIST( RscDependList, RscDepend * )
+
+// Tabelle die alle Dateinamen enthaelt
+class RscFile : public RscDependList
+{
+friend class RscFileTab;
+ BOOL bIncFile; // Ist es eine Include-Datei
+public:
+ BOOL bLoaded; // Ist die Datei geladen
+ BOOL bScanned; // Wurde Datei nach Inclide abgesucht
+ BOOL bDirty; // Dirty-Flag
+ ByteString aFileName; // Name der Datei
+ ByteString aPathName; // Pfad und Name der Datei
+ RscDefineList aDefLst; // Liste der Defines
+
+ RscFile();
+ ~RscFile();
+ BOOL InsertDependFile( ULONG lDepFile, ULONG lPos );
+ void RemoveDependFile( ULONG lDepFile );
+ BOOL Depend( ULONG lDepend, ULONG lFree );
+ void SetIncFlag(){ bIncFile = TRUE; };
+ BOOL IsIncFile(){ return bIncFile; };
+};
+
+DECLARE_UNIQUEINDEX( RscSubFileTab, RscFile * )
+#define NOFILE_INDEX UNIQUEINDEX_ENTRY_NOTFOUND
+
+class RscDefTree {
+ RscDefine * pDefRoot;
+public:
+ static BOOL Evaluate( RscDefine * pDef );
+ RscDefTree(){ pDefRoot = NULL; }
+ ~RscDefTree();
+ void Remove();
+ BOOL Evaluate();
+ RscDefine * Search( const char * pName );
+ void Insert( RscDefine * pDef );
+ void Remove( RscDefine * pDef );
+};
+
+class RscFileTab : public RscSubFileTab {
+ RscDefTree aDefTree;
+ ULONG Find( const ByteString & rName );
+public:
+ RscFileTab();
+ ~RscFileTab();
+
+ RscDefine * FindDef( const char * );
+ RscDefine * FindDef( const ByteString& rStr ) { return FindDef( rStr.GetBuffer() ); }
+ RscDefine * FindDef( ULONG lKey, const ByteString & );
+
+ BOOL Depend( ULONG lDepend, ULONG lFree );
+ BOOL TestDef( ULONG lFileKey, ULONG lPos,
+ const RscDefine * pDefDec );
+ BOOL TestDef( ULONG lFileKey, ULONG lPos,
+ const RscExpression * pExpDec );
+
+ RscDefine * NewDef( ULONG lKey, const ByteString & rDefName,
+ long lId, ULONG lPos );
+ RscDefine * NewDef( ULONG lKey, const ByteString & rDefName,
+ RscExpression *, ULONG lPos );
+
+ BOOL ChangeDef( const ByteString & rDefName, long lId );
+ BOOL ChangeDef( const ByteString & rDefName, RscExpression * );
+
+ BOOL IsDefUsed( const ByteString & );
+ void DeleteDef( const ByteString & );
+ BOOL ChangeDefName( const ByteString & rDefName,
+ const ByteString & rNewName );
+
+ // Alle Defines die in dieser Datei Definiert sind loeschen
+ void DeleteFileContext( ULONG lKey );
+ void DeleteFile( ULONG lKey );
+ ULONG NewCodeFile( const ByteString & rName );
+ ULONG NewIncFile( const ByteString & rName, const ByteString & rPath );
+ RscFile * GetFile( ULONG lFileKey ){ return Get( lFileKey ); }
+};
+
+#endif // _RSCDEF_HXX
diff --git a/rsc/inc/rscerror.h b/rsc/inc/rscerror.h
new file mode 100644
index 000000000000..695326625b62
--- /dev/null
+++ b/rsc/inc/rscerror.h
@@ -0,0 +1,205 @@
+/*************************************************************************
+ *
+ * $RCSfile: rscerror.h,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 16:42:54 $
+ *
+ * The Contents of this file are made available subject to the terms of
+ * either of the following licenses
+ *
+ * - GNU Lesser General Public License Version 2.1
+ * - Sun Industry Standards Source License Version 1.1
+ *
+ * Sun Microsystems Inc., October, 2000
+ *
+ * GNU Lesser General Public License Version 2.1
+ * =============================================
+ * Copyright 2000 by Sun Microsystems, Inc.
+ * 901 San Antonio Road, Palo Alto, CA 94303, USA
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1, as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ *
+ *
+ * Sun Industry Standards Source License Version 1.1
+ * =================================================
+ * The contents of this file are subject to the Sun Industry Standards
+ * Source License Version 1.1 (the "License"); You may not use this file
+ * except in compliance with the License. You may obtain a copy of the
+ * License at http://www.openoffice.org/license.html.
+ *
+ * Software provided under this License is provided on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
+ * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
+ * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
+ * See the License for the specific provisions governing your rights and
+ * obligations concerning the Software.
+ *
+ * The Initial Developer of the Original Code is: Sun Microsystems, Inc.
+ *
+ * Copyright: 2000 by Sun Microsystems, Inc.
+ *
+ * All Rights Reserved.
+ *
+ * Contributor(s): _______________________________________
+ *
+ *
+ ************************************************************************/
+/************************************************************************
+
+ Source Code Control System - Header
+
+ $Header: /zpool/svn/migration/cvs_rep_09_09_08/code/rsc/inc/rscerror.h,v 1.1.1.1 2000-09-18 16:42:54 hr Exp $
+
+ Source Code Control System - Update
+
+ $Log: not supported by cvs2svn $
+ Revision 1.14 2000/09/17 12:51:09 willem.vandorp
+ OpenOffice header added.
+
+ Revision 1.13 2000/07/26 17:13:17 willem.vandorp
+ Headers/footers replaced
+
+ Revision 1.12 2000/07/11 17:00:17 th
+ Unicode
+
+ Revision 1.11 1997/08/27 18:18:16 MM
+ neue Headerstruktur
+
+**************************************************************************/
+
+#ifndef _RSCERROR_H
+#define _RSCERROR_H
+
+#ifndef _TOOLS_SOLAR_H
+#include <tools/solar.h>
+#endif
+
+/****************** D E F I N I T I O N S ********************************/
+/******************* R e t u r n E r r o r s *******************/
+#define ERR_OK 0xFFFF
+
+#define ERR_ERROR 0x0100
+#define ERR_UNKNOWN_METHOD 0x0101 // Return
+#define ERR_OPENFILE 0x0102 // Return
+#define ERR_NOCHAR 0x0103 // Return
+#define ERR_NORSCINST 0x0104 // Return
+#define ERR_USAGE 0x0105 //
+#define ERR_NOINPUT 0x0106 // Return
+#define ERR_UNKNOWNSW 0x0107 //
+#define ERR_REFTODEEP 0x0108 // Return
+#define ERR_FILEFORMAT 0x0109 // Return
+#define ERR_FILESIZE 0x010A // Return
+
+#define ERR_RSCRANGE 0x0200 // Return
+#define ERR_RSCRANGE_OUTDEFSET (ERR_RSCRANGE +1 )
+
+#define ERR_RSCENUM 0x0210 // Return
+#define ERR_RSCFLAG 0x0220 // Return
+#define ERR_RSCCONT 0x0240 // Return
+#define ERR_CONT_INVALIDPOS (ERR_RSCCONT +1 ) // Return
+#define ERR_CONT_INVALIDTYPE (ERR_RSCCONT +2 ) // Return
+
+#define ERR_RSCCMPED 0x0250
+#define ERR_RSCINST 0x0260
+#define ERR_RSCINST_NOVARNAME (ERR_RSCINST +1 ) // Return
+#define ERR_RSCINST_RESERVEDNAME (ERR_RSCINST +2 ) // Return
+
+#define ERR_LEX 0x0270
+#define ERR_YACC 0x0280 //
+#define ERR_DOUBLEID (ERR_YACC +1 ) //
+#define ERR_FALSETYPE (ERR_YACC +2 ) //
+#define ERR_NOVARIABLENAME (ERR_YACC +3 ) //
+#define ERR_USHORTRANGE (ERR_YACC +4 ) //
+#define ERR_IDRANGE (ERR_YACC +5 ) //
+#define ERR_NOCOPYOBJ (ERR_YACC +6 ) //
+#define ERR_REFNOTALLOWED (ERR_YACC +7 ) // Return
+#define ERR_DOUBLEDEFINE (ERR_YACC +8 ) //
+#define ERR_COPYNOTALLOWED (ERR_YACC +9 ) //
+#define ERR_IDEXPECTED (ERR_YACC +10) //
+#define ERR_ZERODIVISION (ERR_YACC +11) //
+#define ERR_PRAGMA (ERR_YACC +12) //
+#define ERR_DECLAREDEFINE (ERR_YACC +13) //
+#define ERR_NOTUPELNAME (ERR_YACC +14) //
+#define ERR_NOTYPE (ERR_YACC +15) //
+
+#define ERR_RSCARRAY 0x02A0 // Return
+#define ERR_ARRAY_INVALIDINDEX (ERR_RSCARRAY +1 ) // Return
+
+#define ERR_ERROREND 0x1000
+
+#define ERR_WARNINGSTART 0x1001
+#define WRN_LOCALID (ERR_WARNINGSTART +1 )
+#define WRN_GLOBALID (ERR_WARNINGSTART +2 )
+#define WRN_SUBINMEMBER (ERR_WARNINGSTART +3 )
+#define WRN_CONT_NOID (ERR_WARNINGSTART +4 )
+#define WRN_STR_REFNOTFOUND (ERR_WARNINGSTART +5 )
+#define WRN_MGR_REFNOTFOUND (ERR_WARNINGSTART +6 )
+#define WRN_CONT_DOUBLEID (ERR_WARNINGSTART +7 )
+
+#define ERR_WARNINGEND 0x2000
+
+class ERRTYPE {
+ USHORT nError;
+public:
+ ERRTYPE() { nError = ERR_OK; }
+ ERRTYPE( USHORT nErr ) { nError = nErr; }
+ ERRTYPE( const ERRTYPE & rErr ) { nError = rErr.nError; };
+ ERRTYPE& operator = ( const ERRTYPE & rError );
+ operator USHORT() const { return( nError ); }
+ BOOL IsError() const { return( nError <= ERR_ERROREND ); }
+ BOOL IsOk() const { return( !IsError() ); }
+ BOOL IsWarning() const {
+ return( nError >= ERR_WARNINGSTART && nError <= ERR_WARNINGEND );
+ };
+ void Clear(){ nError = ERR_OK; }
+};
+
+/****************** R s c E r r o r **************************************/
+class RscId;
+class RscTop;
+
+class RscError
+{
+ FILE * fListing;
+
+ void WriteError( const ERRTYPE& rError, const char * pMessage );
+ void StdLstOut( const char * pStr );
+ void ErrorFormat( const ERRTYPE& rError, RscTop * pClass,
+ const RscId & aId );
+public:
+ USHORT nErrors;// Anzahl der Fehler
+ RscError(){
+ fListing = NULL;
+ nErrors = 0;
+ };
+ void SetListFile( FILE * fList ){
+ fListing = fList;
+ };
+ FILE * GetListFile(){
+ return fListing;
+ };
+ virtual void StdOut( const char * );
+ virtual void LstOut( const char * );
+ virtual void Error( const ERRTYPE& rError, RscTop* pClass, const RscId &aId,
+ const char * pMessage = NULL );
+ // Dieser Fehler sollte nur im Compilermodus auftreten,
+ // das Programm wird mit exit() verlassen
+ virtual void FatalError( const ERRTYPE& rError, const RscId &aId,
+ const char * pMessage = NULL );
+};
+
+#endif // _RSCERROR_H
diff --git a/rsc/inc/rscflag.hxx b/rsc/inc/rscflag.hxx
new file mode 100644
index 000000000000..6c6d36c34174
--- /dev/null
+++ b/rsc/inc/rscflag.hxx
@@ -0,0 +1,157 @@
+/*************************************************************************
+ *
+ * $RCSfile: rscflag.hxx,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 16:42:54 $
+ *
+ * The Contents of this file are made available subject to the terms of
+ * either of the following licenses
+ *
+ * - GNU Lesser General Public License Version 2.1
+ * - Sun Industry Standards Source License Version 1.1
+ *
+ * Sun Microsystems Inc., October, 2000
+ *
+ * GNU Lesser General Public License Version 2.1
+ * =============================================
+ * Copyright 2000 by Sun Microsystems, Inc.
+ * 901 San Antonio Road, Palo Alto, CA 94303, USA
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1, as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ *
+ *
+ * Sun Industry Standards Source License Version 1.1
+ * =================================================
+ * The contents of this file are subject to the Sun Industry Standards
+ * Source License Version 1.1 (the "License"); You may not use this file
+ * except in compliance with the License. You may obtain a copy of the
+ * License at http://www.openoffice.org/license.html.
+ *
+ * Software provided under this License is provided on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
+ * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
+ * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
+ * See the License for the specific provisions governing your rights and
+ * obligations concerning the Software.
+ *
+ * The Initial Developer of the Original Code is: Sun Microsystems, Inc.
+ *
+ * Copyright: 2000 by Sun Microsystems, Inc.
+ *
+ * All Rights Reserved.
+ *
+ * Contributor(s): _______________________________________
+ *
+ *
+ ************************************************************************/
+/************************************************************************
+
+ Source Code Control System - Header
+
+ $Header: /zpool/svn/migration/cvs_rep_09_09_08/code/rsc/inc/rscflag.hxx,v 1.1.1.1 2000-09-18 16:42:54 hr Exp $
+
+**************************************************************************/
+
+#ifndef _RSCFLAG_HXX
+#define _RSCFLAG_HXX
+
+#ifndef _RSCALL_H
+#include <rscall.h>
+#endif
+#ifndef _RSCERROR_H
+#include <rscerror.h>
+#endif
+#ifndef _RSCHASH_HXX
+#include <rschash.hxx>
+#endif
+#ifndef _RSCCONST_HXX
+#include <rscconst.hxx>
+#endif
+
+/******************* R s c F l a g ***************************************/
+class RscFlag : public RscConst {
+ struct RscFlagInst{
+ USHORT nFlags;
+ USHORT nDfltFlags;
+ };
+ BOOL bUSHORT;
+ RSCINST CreateBasic( RSCINST * pInst );
+public:
+ RscFlag( HASHID nId, USHORT nTypId, BOOL bUSHORT = TRUE );
+ RSCINST Create( RSCINST * pInst, const RSCINST & rDflt, BOOL );
+ RSCINST CreateClient( RSCINST * pInst, const RSCINST & rDflt,
+ BOOL bOwnClass, HASHID nConsId );
+ USHORT Size();
+
+ virtual void SetToDefault( const RSCINST & rInst );
+ BOOL IsDefault( const RSCINST & rInst );
+ BOOL IsDefault( const RSCINST & rInst, HASHID nConstId );
+
+ // Ist das Flag gesetzt
+ BOOL IsSet( const RSCINST & rInst, HASHID nConstId );
+
+ // Als Default setzen
+ BOOL IsValueDefault( const RSCINST & rInst, CLASS_DATA pDef );
+ BOOL IsValueDefault( const RSCINST & rInst, CLASS_DATA pDef,
+ HASHID nConstId );
+
+ ERRTYPE SetConst( const RSCINST & rInst, HASHID nValueId,
+ long nValue );
+ ERRTYPE SetNotConst( const RSCINST & rInst, HASHID nConstId );
+ void WriteSrc( const RSCINST & rInst, FILE * fOutput,
+ RscTypCont * pTC, USHORT nTab, const char * );
+ ERRTYPE WriteRc( const RSCINST & rInst, RscWriteRc & aMem,
+ RscTypCont * pTC, USHORT, BOOL bExtra );
+};
+
+/******************* R s c C l i e n t ***********************************/
+class RscClient : public RscTop
+{
+ RscFlag * pRefClass; //Klasse die als Server benutzt wird
+ HASHID nConstId; //Id des zu setzenden Wertes
+public:
+ RscClient( HASHID nId, USHORT nTypId, RscFlag * pClass,
+ HASHID nConstantId );
+ virtual RSCCLASS_TYPE GetClassType() const;
+ RSCINST Create( RSCINST * pInst, const RSCINST & rDflt, BOOL );
+ USHORT Size(){ return( pRefClass->Size() ); };
+
+ // Eine Zuweisung an eine Variable
+ BOOL IsDefault( const RSCINST & rInst ){
+ return( pRefClass->IsDefault( rInst, nConstId ) );
+ };
+ // Als Default setzen
+ BOOL IsValueDefault( const RSCINST & rInst, CLASS_DATA pDef ){
+ return pRefClass->IsValueDefault( rInst,
+ pDef, nConstId );
+ }
+ ERRTYPE SetBool( const RSCINST & rInst, BOOL bValue ){
+ if( bValue )
+ return( pRefClass->SetConst( rInst, nConstId, bValue ) );
+ else
+ return( pRefClass->
+ SetNotConst( rInst, nConstId ) );
+ };
+ ERRTYPE GetBool( const RSCINST & rInst, BOOL * pB ){
+ *pB = pRefClass->IsSet( rInst, nConstId );
+ return( ERR_OK );
+ };
+ void WriteSrc( const RSCINST & rInst, FILE * fOutput,
+ RscTypCont * pTC, USHORT nTab, const char * );
+};
+
+#endif // _RSCFLAG_HXX
diff --git a/rsc/inc/rschash.hxx b/rsc/inc/rschash.hxx
new file mode 100644
index 000000000000..0ef00f7020a6
--- /dev/null
+++ b/rsc/inc/rschash.hxx
@@ -0,0 +1,170 @@
+/*************************************************************************
+ *
+ * $RCSfile: rschash.hxx,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 16:42:54 $
+ *
+ * The Contents of this file are made available subject to the terms of
+ * either of the following licenses
+ *
+ * - GNU Lesser General Public License Version 2.1
+ * - Sun Industry Standards Source License Version 1.1
+ *
+ * Sun Microsystems Inc., October, 2000
+ *
+ * GNU Lesser General Public License Version 2.1
+ * =============================================
+ * Copyright 2000 by Sun Microsystems, Inc.
+ * 901 San Antonio Road, Palo Alto, CA 94303, USA
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1, as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ *
+ *
+ * Sun Industry Standards Source License Version 1.1
+ * =================================================
+ * The contents of this file are subject to the Sun Industry Standards
+ * Source License Version 1.1 (the "License"); You may not use this file
+ * except in compliance with the License. You may obtain a copy of the
+ * License at http://www.openoffice.org/license.html.
+ *
+ * Software provided under this License is provided on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
+ * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
+ * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
+ * See the License for the specific provisions governing your rights and
+ * obligations concerning the Software.
+ *
+ * The Initial Developer of the Original Code is: Sun Microsystems, Inc.
+ *
+ * Copyright: 2000 by Sun Microsystems, Inc.
+ *
+ * All Rights Reserved.
+ *
+ * Contributor(s): _______________________________________
+ *
+ *
+ ************************************************************************/
+/************************************************************************
+
+ Source Code Control System - Header
+
+ $Header: /zpool/svn/migration/cvs_rep_09_09_08/code/rsc/inc/rschash.hxx,v 1.1.1.1 2000-09-18 16:42:54 hr Exp $
+
+ Source Code Control System - Update
+
+ $Log: not supported by cvs2svn $
+ Revision 1.6 2000/09/17 12:51:09 willem.vandorp
+ OpenOffice header added.
+
+ Revision 1.5 2000/07/26 17:13:17 willem.vandorp
+ Headers/footers replaced
+
+ Revision 1.4 1997/08/27 18:18:10 MM
+ neue Headerstruktur
+
+
+ Rev 1.3 27 Aug 1997 18:18:10 MM
+ neue Headerstruktur
+
+ Rev 1.2 21 Nov 1995 19:49:20 TLX
+ Neuer Link
+
+ Rev 1.1 04 May 1995 10:17:20 mk
+ ^Z am Ende
+
+ Rev 1.0 10 Aug 1992 07:14:22 MM
+ Initial revision.
+
+ Rev 1.4 23 Mar 1992 15:23:50 MM
+
+ Rev 1.3 26 Nov 1991 08:56:06 MM
+
+ Rev 1.2 11 Sep 1991 12:20:10 MM
+
+ Rev 1.1 18 Jul 1991 12:53:26 MM
+ Unix Anpassung
+
+ Rev 1.0 17 Jun 1991 14:54:46 MM
+ Initial revision.
+
+ Rev 1.0 08 Feb 1991 13:42:52 MM
+ Initial revision.
+
+**************************************************************************/
+
+#ifndef _RSCHASH_HXX
+#define _RSCHASH_HXX
+
+#ifndef _RSCTOOLS_HXX
+#include <rsctools.hxx>
+#endif
+
+/****************** T Y P E S ********************************************/
+/****************** C L A S S E S ****************************************/
+/****************** S t r i n g - C o n **********************************/
+class StringCon{
+private:
+ USHORT nMax; // sizeof character field
+ USHORT nFill; // index after last entry
+ char * pField; // pointer to character field
+public:
+ StringCon( USHORT nMaxEntries ); // maximum numbers of characters
+ ~StringCon();
+ char *Put( const char * pStr ); // put string in field
+};
+
+/****************** H a s h - T a b e l **********************************/
+class HashTabel{
+private:
+ USHORT nMax; // size of hash-tabel
+ USHORT nFill; // elements in hash-tabel
+ ULONG lAsk; // Anzahl der Anfragen
+ ULONG lTry; // Anzahl der Versuche
+protected:
+ HASHID Test_Insert( const void *, BOOL bInsert );
+public:
+ HashTabel( USHORT nMaxEntries ); // max size of hash-tabel
+ ~HashTabel();
+ HASHID Test( const void * ); // test of insert
+ HASHID Insert( const void * pElement ); // insert in hashtabel
+ virtual USHORT HashFunc( const void * ){ return( 0 ); };
+ // get hash value from subclass
+ virtual BOOL IsEntry( HASHID ){ return( FALSE ); };
+ // is field
+ // nIndex = index in Field
+ virtual COMPARE Compare( const void * , HASHID )
+ { return( EQUAL ); }; // compare element with entry
+};
+
+/****************** H a s h - S t r i n g ********************************/
+class HashString : public HashTabel{
+private:
+ StringCon * paSC; // container of strings
+ char * * ppStr; // pointer to char * array
+public:
+ HashString( USHORT nMaxEntries ); // max size of hash-tabel
+ ~HashString();
+ USHORT HashFunc( const void * pElement ); // return hash value
+ BOOL IsEntry( HASHID nIndex );
+ COMPARE Compare( const void * pElement, HASHID nIndex );
+ HASHID Insert( const char * pStr ); // test of insert string
+ HASHID Test( const char * pStr ); // insert string
+ char * Get( HASHID nIndex ); // return pointer to string
+};
+
+#endif // _RSCHASH_HXX
+
diff --git a/rsc/inc/rscinst.hxx b/rsc/inc/rscinst.hxx
new file mode 100644
index 000000000000..f0a982c21217
--- /dev/null
+++ b/rsc/inc/rscinst.hxx
@@ -0,0 +1,310 @@
+/*************************************************************************
+ *
+ * $RCSfile: rscinst.hxx,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 16:42:54 $
+ *
+ * The Contents of this file are made available subject to the terms of
+ * either of the following licenses
+ *
+ * - GNU Lesser General Public License Version 2.1
+ * - Sun Industry Standards Source License Version 1.1
+ *
+ * Sun Microsystems Inc., October, 2000
+ *
+ * GNU Lesser General Public License Version 2.1
+ * =============================================
+ * Copyright 2000 by Sun Microsystems, Inc.
+ * 901 San Antonio Road, Palo Alto, CA 94303, USA
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1, as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ *
+ *
+ * Sun Industry Standards Source License Version 1.1
+ * =================================================
+ * The contents of this file are subject to the Sun Industry Standards
+ * Source License Version 1.1 (the "License"); You may not use this file
+ * except in compliance with the License. You may obtain a copy of the
+ * License at http://www.openoffice.org/license.html.
+ *
+ * Software provided under this License is provided on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
+ * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
+ * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
+ * See the License for the specific provisions governing your rights and
+ * obligations concerning the Software.
+ *
+ * The Initial Developer of the Original Code is: Sun Microsystems, Inc.
+ *
+ * Copyright: 2000 by Sun Microsystems, Inc.
+ *
+ * All Rights Reserved.
+ *
+ * Contributor(s): _______________________________________
+ *
+ *
+ ************************************************************************/
+/************************************************************************
+
+ Source Code Control System - Header
+
+ $Header: /zpool/svn/migration/cvs_rep_09_09_08/code/rsc/inc/rscinst.hxx,v 1.1.1.1 2000-09-18 16:42:54 hr Exp $
+
+ Source Code Control System - Update
+
+ $Log: not supported by cvs2svn $
+ Revision 1.14 2000/09/17 12:51:09 willem.vandorp
+ OpenOffice header added.
+
+ Revision 1.13 2000/07/26 17:13:17 willem.vandorp
+ Headers/footers replaced
+
+ Revision 1.12 2000/07/11 17:00:28 th
+ Unicode
+
+ Revision 1.11 1999/09/07 13:30:02 mm
+ UniCode
+
+ Revision 1.10 1997/08/27 18:18:06 MM
+ neue Headerstruktur
+
+**************************************************************************/
+
+#ifndef _RSCINST_HXX
+#define _RSCINST_HXX
+
+#ifndef _RSCALL_H
+#include <rscall.h>
+#endif
+#ifndef _RSCERROR_H
+#include <rscerror.h>
+#endif
+#ifndef _RSCTOOLS_HXX
+#include <rsctools.hxx>
+#endif
+
+/******************* C l a s s e s F o r w a r d s *********************/
+class RscTypCont;
+class RscCmdLine;
+class REResourceList;
+class RscTop;
+class RscInstCopy;
+
+/******************* F u n c t i o n F o r w a r d s *******************/
+HASHID HashId( const char * ); // Gibt zu einem String eine HashId
+const char * GetHashString( HASHID ); // Gibt zu einer HASHID einen String
+ // NULL, wenn kein Eintrag vorhanden
+
+/******************* S t r u c t s ***************************************/
+
+/****************** C L A S S E S ****************************************/
+class RscInst
+{
+ void MakeCopy( RSCINST aCopyInst );
+ static RSCINST GetSysLangInst( RSCINST & rInst );
+public:
+ RSCINST aInst;
+
+ RscInst();
+ RscInst( const RscInst & rInst );
+ RscInst( RSCINST aTmpI );
+ RscInst& operator = ( const RscInst& rRscInst );
+ ~RscInst();
+ void OverWrite( RscInstCopy & rInst );
+ BOOL IsInst() const { return( aInst.IsInst() ); }
+
+ // Listen Methoden
+ ERRTYPE SetElement( const RscId & rName, RscInstCopy & rInst );
+ ERRTYPE SetPosEle( USHORT nPos, RscInstCopy & rInst );
+ ERRTYPE SetPosRscId( USHORT nPos, const RscId & rId );
+ SUBINFO_STRUCT GetInfoEle( USHORT nPos );
+ USHORT GetCount();
+ RscInst GetElement( RscTop * pClass, const RscId & rName );
+ RscInst GetPosEle( USHORT nPos );
+ ERRTYPE MovePosEle( USHORT nDestPos, USHORT nSourcePos );
+ ERRTYPE DeleteElement( RscTop * pClass, const RscId & rName );
+ ERRTYPE DeletePosEle( USHORT nPos );
+
+ ERRTYPE SetVar( HASHID nVarName, RscInstCopy & rInst );
+ ERRTYPE SetConst( HASHID nVarName, HASHID nConstId );
+ ERRTYPE SetBool( HASHID nVarName, BOOL );
+
+ // Hack fuer X, Y, Width, Height
+ static ERRTYPE SetCorrectValues( RSCINST & rInst, RSCINST & rVarInst,
+ long lValue, USHORT nTupelIdx );
+ ERRTYPE SetNumber( HASHID nVarName, long );
+
+ ERRTYPE SetString( HASHID nVarName, const char * );
+ ERRTYPE SetConst( HASHID nConstId );
+ ERRTYPE SetBool( BOOL );
+ ERRTYPE SetNumber( long );
+ ERRTYPE SetString( const char * );
+ ERRTYPE SetRef( const RscId & rRscId );
+ ERRTYPE SetDefault( HASHID nVarName );
+
+ RscInst GetVar( HASHID nVarName );
+ HASHID GetConst( HASHID nVarName = HASH_NONAME );
+ USHORT GetConstPos( HASHID nVarName = HASH_NONAME );
+ BOOL GetBool( HASHID nVarName = HASH_NONAME );
+
+ // Hack fuer X, Y, Width, Height
+ static long GetCorrectValues( RSCINST & rInst, RSCINST & rVarInst,
+ USHORT nTupelIdx );
+ long GetNumber( HASHID nVarName = HASH_NONAME );
+
+ const char *GetString( HASHID nVarName = HASH_NONAME );
+ RscId GetRef();
+ BOOL IsDefault( HASHID nVarName );
+ BOOL IsConsistent( RscInconsList * pList );
+
+ HASHID GetClassEnum( HASHID nVarName, USHORT nPos );
+ HASHID GetClassEnum( USHORT nPos );
+ RscTop * GetClassType(){ return aInst.pClass; };
+ HASHID GetClassName();
+ void EnumClassVariables( void * pData, VarEnumCallbackProc ) const;
+ ERRTYPE WriteRc( RscWriteRc & aMem );
+};
+
+class RscInstCopy : public RscInst {
+ void MakeCopy( RSCINST aCopyInst );
+public:
+ RscInstCopy();
+ RscInstCopy( const RscInstCopy & rInst );
+ RscInstCopy( const RscInst & rInst );
+ RscInstCopy( RSCINST aTmpI );
+ RscInstCopy( RscTop * pNewType, const RscInst & rInst );
+ RscInstCopy& operator = ( const RscInstCopy & rRscInst );
+ RscInstCopy& operator = ( const RscInst & rRscInst );
+ ~RscInstCopy();
+};
+
+class RscDataBase
+{
+friend class RscHrc;
+friend class RscSrc;
+friend class RscInst;
+
+ RscCmdLine * pCmdLine;
+ RscTypCont * pTC;
+ LanguageType nLangType;
+public:
+ RscDataBase( RscError * );
+ ~RscDataBase();
+
+// void SetLanguage( LanguageType nTyp ) { nLangType = nTyp; }
+ void SetLanguage( HASHID nId );
+ HASHID GetLanguage() const;
+
+ ByteString GetPath() const;
+ void SetPath( const ByteString & rPath );
+ // Konvertiert einen Namen in einen Typ
+ RscTop* GetClassType( HASHID nClassName );
+ // Instanz einer Klasse erzeugen
+ BOOL MakeConsistent( RscInconsList * pList );
+ // Array mit Dateinamen
+ RscFileTab* GetFileTab();
+ // Eine Dateinamen-Instanz holen
+ RscFile * GetFileStruct( ULONG lKey );
+
+ ULONG AddSrcFile( const ByteString & rFileName );
+ ULONG AddHrcFile( const ByteString & rFileName );
+ // Traegt die Include-Dateien in die Abhaengigkeitsliste
+ // von lFileKey ein
+ void ScanForIncFiles( ULONG lFileKey );
+ void RemoveFile( ULONG lKey );
+
+ // Suche ueber alle DEFINES
+ RscDefine * FindDef( const ByteString & rName );
+ ULONG GetFileKey( const ByteString & rFileName );
+};
+
+class RscHrc
+{
+protected:
+ ULONG lFileKey; // Index der Instanz
+ RscDataBase * pDataBase;// Datenbasis
+public:
+
+ // Kompilerinstanz erzeugen
+ RscHrc( RscDataBase * pDBase, ULONG lKey );
+ ~RscHrc();
+
+ // Daten von Datei uebernehmen
+ ERRTYPE ReadFile();
+
+ ULONG GetFileKey() const { return lFileKey; }
+
+ void SetDirty( BOOL bSet );
+ BOOL IsDirty();
+ void SetPathName( const ByteString & );
+ ByteString GetPathName();
+ void SetFileName( const ByteString & );
+ ByteString GetFileName();
+
+ //Depend-Datei anhaengen
+ void InsertDepend( ULONG lKey, ULONG lPos );
+
+ // DefineList holen
+ RscDefineList * GetDefineList();
+ // Suche ueber all DEFINES im Zugriff
+ RscDefine * FindDef( const ByteString & rName );
+ ERRTYPE NewDef( const ByteString & rMacroName, long lValue,
+ ULONG lPos );
+ ERRTYPE NewDef( const ByteString & rMacroName, const ByteString & rMacro,
+ ULONG lPos );
+ ERRTYPE ChangeDef( const ByteString & rMacroName, long lValue );
+ ERRTYPE ChangeDef( const ByteString & rMacroName,
+ const ByteString & rMacro );
+ BOOL IsDefUsed( const ByteString & );
+ void DeleteDef( const ByteString & rMacroName );
+ ERRTYPE ChangeDefName( const ByteString & rMacroName,
+ const ByteString & rNewName );
+
+ // Dateinamen-Instanz holen
+ RscFile * GetFileStruct();
+ //Abhaengigkeitsliste holen holen
+ RscDependList * GetDependList();
+
+ // Datei schreiben
+ ERRTYPE WriteFile();
+};
+
+class RscSrc : public RscHrc {
+public:
+ // Kompilerinstanz erzeugen
+ RscSrc( RscDataBase * pDBase, ULONG lKey );
+ ~RscSrc();
+
+
+ RscInstCopy CreateRscInst( RscTop * pClass );
+ // Instanz loeschen
+ ERRTYPE DeleteRscInst( RscTop * pClass, const RscId & rInstName );
+ // Datenbasis nach Define Veraenderung wiederherstellen
+ //Instanz global zur Verfuegung stellen
+ ERRTYPE SetRscInst( const RscId & rInstName, RscInstCopy & );
+ //Instanz holen
+ RscInst GetRscInst( RscTop* pClass, const RscId & rInstName );
+
+ // Namen und Identifier Liste fuellen
+ void FillNameIdList( REResourceList * pList );
+
+ // C++ Resourcekonstruktor schreiben
+ ERRTYPE WriteCxxFile( const ByteString &, const ByteString & rHxxName );
+ ERRTYPE WriteHxxFile( const ByteString & ); // C++ Klasskopf schreiben
+};
+
+#endif //_RSCINST_HXX
diff --git a/rsc/inc/rsckey.hxx b/rsc/inc/rsckey.hxx
new file mode 100644
index 000000000000..f4da97b39dd1
--- /dev/null
+++ b/rsc/inc/rsckey.hxx
@@ -0,0 +1,129 @@
+/*************************************************************************
+ *
+ * $RCSfile: rsckey.hxx,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 16:42:54 $
+ *
+ * The Contents of this file are made available subject to the terms of
+ * either of the following licenses
+ *
+ * - GNU Lesser General Public License Version 2.1
+ * - Sun Industry Standards Source License Version 1.1
+ *
+ * Sun Microsystems Inc., October, 2000
+ *
+ * GNU Lesser General Public License Version 2.1
+ * =============================================
+ * Copyright 2000 by Sun Microsystems, Inc.
+ * 901 San Antonio Road, Palo Alto, CA 94303, USA
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1, as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ *
+ *
+ * Sun Industry Standards Source License Version 1.1
+ * =================================================
+ * The contents of this file are subject to the Sun Industry Standards
+ * Source License Version 1.1 (the "License"); You may not use this file
+ * except in compliance with the License. You may obtain a copy of the
+ * License at http://www.openoffice.org/license.html.
+ *
+ * Software provided under this License is provided on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
+ * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
+ * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
+ * See the License for the specific provisions governing your rights and
+ * obligations concerning the Software.
+ *
+ * The Initial Developer of the Original Code is: Sun Microsystems, Inc.
+ *
+ * Copyright: 2000 by Sun Microsystems, Inc.
+ *
+ * All Rights Reserved.
+ *
+ * Contributor(s): _______________________________________
+ *
+ *
+ ************************************************************************/
+/************************************************************************
+
+ Source Code Control System - Header
+
+ $Header: /zpool/svn/migration/cvs_rep_09_09_08/code/rsc/inc/rsckey.hxx,v 1.1.1.1 2000-09-18 16:42:54 hr Exp $
+
+ Source Code Control System - Update
+
+ $Log: not supported by cvs2svn $
+ Revision 1.6 2000/09/17 12:51:09 willem.vandorp
+ OpenOffice header added.
+
+ Revision 1.5 2000/07/26 17:13:17 willem.vandorp
+ Headers/footers replaced
+
+ Revision 1.4 1997/08/27 18:18:06 MM
+ neue Headerstruktur
+
+
+ Rev 1.3 27 Aug 1997 18:18:06 MM
+ neue Headerstruktur
+
+ Rev 1.2 21 Nov 1995 19:49:18 TLX
+ Neuer Link
+
+ Rev 1.1 16 Feb 1995 19:50:50 MM
+ char * -> const char *
+
+ Rev 1.0 10 Aug 1992 07:14:30 MM
+ Initial revision.
+**************************************************************************/
+
+#ifndef _RSCKEY_HXX
+#define _RSCKEY_HXX
+
+/****************** C l a s s F o r w a r d s **************************/
+class RscTop;
+
+#ifndef _RSCALL_H
+#include <rscall.h>
+#endif
+
+typedef struct {
+ HASHID nName;
+ USHORT nTyp;
+ long yylval;
+} KEY_STRUCT;
+
+class RscNameTable {
+ BOOL bSort; //soll bei jedem einfuegen sortiert werden?
+ USHORT nEntries; //Anzahl der EintrĄge
+ KEY_STRUCT * pTable;
+public:
+ RscNameTable();
+ ~RscNameTable();
+ void SetSort( BOOL bSorted = TRUE );
+ HASHID Put( HASHID nName, USHORT nTyp, long nValue );
+ HASHID Put( HASHID nName, USHORT nTyp );
+ HASHID Put( const char * pName, USHORT nTyp, long nValue );
+ HASHID Put( const char * pName, USHORT nTyp );
+ HASHID Put( HASHID nName, USHORT nTyp, RscTop * pClass );
+ HASHID Put( const char * pName, USHORT nTyp, RscTop * pClass );
+
+ // TRUE, wurde gefunden
+ BOOL Get( HASHID nName, KEY_STRUCT * pEle );
+};
+
+
+#endif// _RSCKEY_HXX
diff --git a/rsc/inc/rsclst.hxx b/rsc/inc/rsclst.hxx
new file mode 100644
index 000000000000..2caf10123202
--- /dev/null
+++ b/rsc/inc/rsclst.hxx
@@ -0,0 +1,103 @@
+/*************************************************************************
+ *
+ * $RCSfile: rsclst.hxx,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 16:42:54 $
+ *
+ * The Contents of this file are made available subject to the terms of
+ * either of the following licenses
+ *
+ * - GNU Lesser General Public License Version 2.1
+ * - Sun Industry Standards Source License Version 1.1
+ *
+ * Sun Microsystems Inc., October, 2000
+ *
+ * GNU Lesser General Public License Version 2.1
+ * =============================================
+ * Copyright 2000 by Sun Microsystems, Inc.
+ * 901 San Antonio Road, Palo Alto, CA 94303, USA
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1, as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ *
+ *
+ * Sun Industry Standards Source License Version 1.1
+ * =================================================
+ * The contents of this file are subject to the Sun Industry Standards
+ * Source License Version 1.1 (the "License"); You may not use this file
+ * except in compliance with the License. You may obtain a copy of the
+ * License at http://www.openoffice.org/license.html.
+ *
+ * Software provided under this License is provided on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
+ * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
+ * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
+ * See the License for the specific provisions governing your rights and
+ * obligations concerning the Software.
+ *
+ * The Initial Developer of the Original Code is: Sun Microsystems, Inc.
+ *
+ * Copyright: 2000 by Sun Microsystems, Inc.
+ *
+ * All Rights Reserved.
+ *
+ * Contributor(s): _______________________________________
+ *
+ *
+ ************************************************************************/
+
+#ifndef _RSCLST_HXX
+#define _RSCLST_HXX
+
+#ifndef _TOOLS_LIST_HXX
+#include <tools/list.hxx>
+#endif
+#ifndef _RSCALL_H
+#include <rscall.h>
+#endif
+
+class REResourceList;
+
+DECLARE_LIST( RESubResourceList, REResourceList * )
+
+class REResourceList : public RESubResourceList
+{
+protected:
+ REResourceList* pParent;
+ RscId aRscId; //Id und Name des Resourceobjektes
+ ByteString aClassName;
+ BOOL bVisible;
+
+public:
+ REResourceList();
+ REResourceList( REResourceList * pParentList,
+ ByteString& rClassName,
+ const RscId & rResourceID,
+ BOOL bVisible = FALSE );
+ ~REResourceList();
+
+ REResourceList* GetParent() { return pParent; }
+ ByteString GetObjName() { return aRscId.GetName(); }
+ ByteString GetClassName() { return aClassName; }
+ RscId GetRscId() { return aRscId; }
+ void SetRscId( const RscId & rId ){ aRscId = rId; }
+
+ void SetVisible( BOOL bVis )
+ { bVisible = bVis; }
+ BOOL IsVisible() { return bVisible; }
+};
+
+#endif // _RSCLST_HXX
diff --git a/rsc/inc/rscmgr.hxx b/rsc/inc/rscmgr.hxx
new file mode 100644
index 000000000000..815944357ab7
--- /dev/null
+++ b/rsc/inc/rscmgr.hxx
@@ -0,0 +1,169 @@
+/*************************************************************************
+ *
+ * $RCSfile: rscmgr.hxx,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 16:42:54 $
+ *
+ * The Contents of this file are made available subject to the terms of
+ * either of the following licenses
+ *
+ * - GNU Lesser General Public License Version 2.1
+ * - Sun Industry Standards Source License Version 1.1
+ *
+ * Sun Microsystems Inc., October, 2000
+ *
+ * GNU Lesser General Public License Version 2.1
+ * =============================================
+ * Copyright 2000 by Sun Microsystems, Inc.
+ * 901 San Antonio Road, Palo Alto, CA 94303, USA
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1, as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ *
+ *
+ * Sun Industry Standards Source License Version 1.1
+ * =================================================
+ * The contents of this file are subject to the Sun Industry Standards
+ * Source License Version 1.1 (the "License"); You may not use this file
+ * except in compliance with the License. You may obtain a copy of the
+ * License at http://www.openoffice.org/license.html.
+ *
+ * Software provided under this License is provided on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
+ * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
+ * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
+ * See the License for the specific provisions governing your rights and
+ * obligations concerning the Software.
+ *
+ * The Initial Developer of the Original Code is: Sun Microsystems, Inc.
+ *
+ * Copyright: 2000 by Sun Microsystems, Inc.
+ *
+ * All Rights Reserved.
+ *
+ * Contributor(s): _______________________________________
+ *
+ *
+ ************************************************************************/
+/************************************************************************
+
+ Source Code Control System - Header
+
+ $Header: /zpool/svn/migration/cvs_rep_09_09_08/code/rsc/inc/rscmgr.hxx,v 1.1.1.1 2000-09-18 16:42:54 hr Exp $
+
+ Source Code Control System - Update
+
+ $Log: not supported by cvs2svn $
+ Revision 1.10 2000/09/17 12:51:09 willem.vandorp
+ OpenOffice header added.
+
+ Revision 1.9 2000/07/26 17:13:17 willem.vandorp
+ Headers/footers replaced
+
+ Revision 1.8 1997/08/27 18:18:10 MM
+ neue Headerstruktur
+
+
+ Rev 1.7 27 Aug 1997 18:18:10 MM
+ neue Headerstruktur
+
+ Rev 1.6 21 Nov 1995 19:49:08 TLX
+ Neuer Link
+
+ Rev 1.5 12 Jan 1994 15:18:06 mm
+ Alignementprobleme und Warnings fuer DEC-Alpha beseitigt
+
+ Rev 1.4 28 Oct 1993 17:12:36 mm
+ Referenzeingabe wird besser geprueft
+
+ Rev 1.3 25 Aug 1993 15:34:18 mm
+ Fehler und Warnings beseitigt
+
+ Rev 1.2 05 Jan 1993 10:50:36 mm
+ Neues Default verhalten
+
+ Rev 1.1 23 Dec 1992 14:02:32 mm
+ Sprachaenderung
+
+ Rev 1.0 10 Aug 1992 07:14:20 MM
+ Initial revision.
+
+**************************************************************************/
+
+#ifndef _RSCMGR_HXX
+#define _RSCMGR_HXX
+
+#ifndef _RSCALL_H
+#include <rscall.h>
+#endif
+#ifndef _RSCERROR_H
+#include <rscerror.h>
+#endif
+#ifndef _RSCHASH_HXX
+#include <rschash.hxx>
+#endif
+#ifndef _RSCTOP_HXX
+#include <rsctop.hxx>
+#endif
+#ifndef _RSCCLASS_HXX
+#include <rscclass.hxx>
+#endif
+
+/******************* R s c M g r *****************************************/
+class RscMgr : public RscClass {
+ struct RscMgrInst {
+ RscId aRefId; // nRefId = Referenz Identifier
+ BOOL bDflt; // Ist Default
+ void Create(){ aRefId.Create(); bDflt = TRUE; }
+ void Destroy(){ aRefId.Destroy(); }
+ };
+ ERRTYPE IsToDeep( const RSCINST & rInst, USHORT nDeep = 0 );
+public:
+ RscMgr( HASHID nId, USHORT nTypId, RscTop * pSuperCl );
+
+ void SetToDefault( const RSCINST & rInst );
+ BOOL IsDefault( const RSCINST & rInst );
+ BOOL IsValueDefault( const RSCINST & rInst, CLASS_DATA pDef );
+
+ RSCINST Create( RSCINST * pInst, const RSCINST & rDflt, BOOL );
+ void Destroy( const RSCINST & rInst );
+ USHORT Size();
+ void WriteSrcHeader( const RSCINST & aInst, FILE * fOutput,
+ RscTypCont * pTC, USHORT nTab,
+ const RscId & rId, const char * );
+
+ void WriteSrc( const RSCINST & rInst, FILE * fOutput,
+ RscTypCont * pTC, USHORT nTab, const char * );
+ ERRTYPE WriteRcHeader( const RSCINST & rInst, RscWriteRc & aMem,
+ RscTypCont * pTC, const RscId & rId,
+ USHORT, BOOL bExtra );
+ ERRTYPE WriteRc( const RSCINST & rInst, RscWriteRc & aMem,
+ RscTypCont * pTC, USHORT, BOOL bExtra );
+ ERRTYPE WriteHxxHeader( const RSCINST & rInst, FILE * fOutput,
+ RscTypCont * pTC, const RscId & rId );
+ ERRTYPE WriteHxx( const RSCINST & rInst, FILE * fOutput,
+ RscTypCont * pTC, const RscId & rId );
+ ERRTYPE WriteCxxHeader( const RSCINST & rInst, FILE * fOutput,
+ RscTypCont * pTC, const RscId & rId );
+ ERRTYPE WriteCxx( const RSCINST & rInst, FILE * fOutput,
+ RscTypCont * pTC, const RscId & rId );
+ BOOL IsConsistent( const RSCINST & rInst,
+ RscInconsList * pList = NULL );
+ ERRTYPE GetRef( const RSCINST & rInst, RscId * );
+ ERRTYPE SetRef( const RSCINST & rInst, const RscId & rRefId );
+};
+
+#endif //_RSCMGR_HXX
diff --git a/rsc/inc/rscpar.hxx b/rsc/inc/rscpar.hxx
new file mode 100644
index 000000000000..5fe35835cd37
--- /dev/null
+++ b/rsc/inc/rscpar.hxx
@@ -0,0 +1,142 @@
+/*************************************************************************
+ *
+ * $RCSfile: rscpar.hxx,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 16:42:54 $
+ *
+ * The Contents of this file are made available subject to the terms of
+ * either of the following licenses
+ *
+ * - GNU Lesser General Public License Version 2.1
+ * - Sun Industry Standards Source License Version 1.1
+ *
+ * Sun Microsystems Inc., October, 2000
+ *
+ * GNU Lesser General Public License Version 2.1
+ * =============================================
+ * Copyright 2000 by Sun Microsystems, Inc.
+ * 901 San Antonio Road, Palo Alto, CA 94303, USA
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1, as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ *
+ *
+ * Sun Industry Standards Source License Version 1.1
+ * =================================================
+ * The contents of this file are subject to the Sun Industry Standards
+ * Source License Version 1.1 (the "License"); You may not use this file
+ * except in compliance with the License. You may obtain a copy of the
+ * License at http://www.openoffice.org/license.html.
+ *
+ * Software provided under this License is provided on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
+ * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
+ * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
+ * See the License for the specific provisions governing your rights and
+ * obligations concerning the Software.
+ *
+ * The Initial Developer of the Original Code is: Sun Microsystems, Inc.
+ *
+ * Copyright: 2000 by Sun Microsystems, Inc.
+ *
+ * All Rights Reserved.
+ *
+ * Contributor(s): _______________________________________
+ *
+ *
+ ************************************************************************/
+/************************************************************************
+
+ Source Code Control System - Header
+
+ $Header: /zpool/svn/migration/cvs_rep_09_09_08/code/rsc/inc/rscpar.hxx,v 1.1.1.1 2000-09-18 16:42:54 hr Exp $
+
+**************************************************************************/
+#ifndef _RSCPAR_HXX
+#define _RSCPAR_HXX
+
+#ifndef _RSCTOOLS_HXX
+#include <rsctools.hxx>
+#endif
+#ifndef _RSCERROR_H
+#include <rscerror.h>
+#endif
+
+/****************** C L A S S E S ****************************************/
+class RscTypCont;
+class RscExpression;
+/*********** R s c F i l e I n s t ***************************************/
+
+#define READBUFFER_MAX 256
+class RscFileInst
+{
+ ERRTYPE aFirstError;// Erster Fehler
+ USHORT nErrorLine; // Zeile des ersten Fehlers
+ USHORT nErrorPos; // Position des ersten Fehlers
+ rtl_TextEncoding nCharSet; // Zeichensatz der einzulesenden Datei
+ BOOL bIncLine; // Muss Zeilennummer incrementiert werden
+ USHORT nLineNo; // Zeile in der Eingabedatei
+ ULONG lFileIndex; // Index auf Eingabedatei
+ ULONG lSrcIndex; // Index auf Basisdatei
+ FILE * fInputFile; // Eingabedatei
+ char * pInput; // Lesepuffer
+ USHORT nInputBufLen; // Laenge des Lesepuffers
+ USHORT nInputPos; // Position im Lesepuffer
+ USHORT nInputEndPos;// Ende im Lesepuffer
+ char * pLine; // Zeile
+ USHORT nLineBufLen;//Lange des Zeilenpuffres
+ USHORT nScanPos; // Position in der Zeile
+ int cLastChar;
+ BOOL bEof;
+
+public:
+ RscTypCont * pTypCont;
+ void Init(); // ctor initialisieren
+ RscFileInst( RscTypCont * pTC, ULONG lIndexSrc,
+ ULONG lFileIndex, FILE * fFile,
+ rtl_TextEncoding nSourceCharSet );
+ RscFileInst( RscTypCont * pTC, ULONG lIndexSrc,
+ ULONG lFileIndex, const ByteString &,
+ rtl_TextEncoding nSourceCharSet );
+ ~RscFileInst();
+ BOOL IsEof() const { return bEof; }
+ void SetCharSet( rtl_TextEncoding nSet ) { nCharSet = nSet; }
+ UINT16 GetCharSet() const { return (UINT16)nCharSet; }
+ void SetFileIndex( ULONG lFIndex ) { lFileIndex = lFIndex; }
+ ULONG GetFileIndex() { return( lFileIndex ); }
+ ULONG GetSrcIndex() { return( lSrcIndex ); }
+ void SetLineNo( USHORT nLine ) { nLineNo = nLine; }
+ USHORT GetLineNo() { return( nLineNo ); }
+ USHORT GetScanPos() { return( nScanPos ); }
+ char * GetLine() { return( pLine ); }
+ int GetChar();
+ int GetFastChar() { return pLine[ nScanPos ] ?
+ pLine[ nScanPos++ ] : GetChar();
+ }
+ void GetNewLine();
+ // Fehlerbehandlung
+ void SetError( ERRTYPE aError );
+ ERRTYPE GetError() { return aFirstError; }
+ USHORT GetErrorLine() { return nErrorLine; }
+ USHORT GetErrorPos() { return nErrorPos; }
+};
+
+/******************* F u n c t i o n *************************************/
+void IncludeParser( RscFileInst * pFileInst );
+ERRTYPE parser( RscFileInst * pFileInst );
+RscExpression * MacroParser( RscFileInst & rFileInst );
+
+#endif // _RSCPAR_HXX
diff --git a/rsc/inc/rscrange.hxx b/rsc/inc/rscrange.hxx
new file mode 100644
index 000000000000..48a7a80c9ea6
--- /dev/null
+++ b/rsc/inc/rscrange.hxx
@@ -0,0 +1,260 @@
+/*************************************************************************
+ *
+ * $RCSfile: rscrange.hxx,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 16:42:55 $
+ *
+ * The Contents of this file are made available subject to the terms of
+ * either of the following licenses
+ *
+ * - GNU Lesser General Public License Version 2.1
+ * - Sun Industry Standards Source License Version 1.1
+ *
+ * Sun Microsystems Inc., October, 2000
+ *
+ * GNU Lesser General Public License Version 2.1
+ * =============================================
+ * Copyright 2000 by Sun Microsystems, Inc.
+ * 901 San Antonio Road, Palo Alto, CA 94303, USA
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1, as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ *
+ *
+ * Sun Industry Standards Source License Version 1.1
+ * =================================================
+ * The contents of this file are subject to the Sun Industry Standards
+ * Source License Version 1.1 (the "License"); You may not use this file
+ * except in compliance with the License. You may obtain a copy of the
+ * License at http://www.openoffice.org/license.html.
+ *
+ * Software provided under this License is provided on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
+ * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
+ * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
+ * See the License for the specific provisions governing your rights and
+ * obligations concerning the Software.
+ *
+ * The Initial Developer of the Original Code is: Sun Microsystems, Inc.
+ *
+ * Copyright: 2000 by Sun Microsystems, Inc.
+ *
+ * All Rights Reserved.
+ *
+ * Contributor(s): _______________________________________
+ *
+ *
+ ************************************************************************/
+/************************************************************************
+
+ Source Code Control System - Header
+
+ $Header: /zpool/svn/migration/cvs_rep_09_09_08/code/rsc/inc/rscrange.hxx,v 1.1.1.1 2000-09-18 16:42:55 hr Exp $
+
+**************************************************************************/
+
+#ifndef _RSCRANGE_HXX
+#define _RSCRANGE_HXX
+
+#ifndef _RSCALL_H
+#include <rscall.h>
+#endif
+#ifndef _RSCERROR_H
+#include <rscerror.h>
+#endif
+#ifndef _RSCHASH_HXX
+#include <rschash.hxx>
+#endif
+#ifndef _RSCTOP_HXX
+#include <rsctop.hxx>
+#endif
+
+/******************* R s c R a n g e *************************************/
+class RscRange : public RscTop
+{
+protected:
+ struct RscRangeInst {
+ USHORT nValue; // nValue = Ausgangswert - nMin
+ BOOL bDflt; // Ist Default
+ };
+ long nMin; // Minimum des Bereiches
+ long nMax; // Maximum des Bereiches
+ USHORT nSize;
+public:
+ RscRange( HASHID nId, USHORT nTypId );
+ virtual RSCCLASS_TYPE GetClassType() const;
+ RSCINST Create( RSCINST * pInst, const RSCINST & rDfltInst, BOOL );
+ // Der zulaessige Bereich wird gesetzt
+ ERRTYPE SetRange( long nMinimum, long nMaximum );
+ // Gibt die Groesse der Klasse in Bytes
+ USHORT Size(){ return nSize; }
+ // Eine Zuweisung an eine Variable
+ virtual void SetToDefault( const RSCINST & rInst )
+ {
+ ((RscRangeInst*)rInst.pData)->bDflt = TRUE;
+ }
+ BOOL IsDefault( const RSCINST & rInst)
+ {
+ return( ((RscRangeInst*)rInst.pData)->bDflt );
+ };
+ // Als Default setzen
+ BOOL IsValueDefault( const RSCINST & rInst, CLASS_DATA pDef );
+ ERRTYPE SetNumber( const RSCINST &, long );
+ ERRTYPE GetNumber( const RSCINST &, long * );
+ void WriteSrc( const RSCINST &, FILE * fOutput,
+ RscTypCont * pTC, USHORT nTab, const char * );
+ ERRTYPE WriteRc( const RSCINST &, RscWriteRc & aMem,
+ RscTypCont * pTC, USHORT, BOOL bExtra );
+ void WriteRcAccess( FILE * fOutput, RscTypCont * pTC,
+ const char * );
+};
+
+/******************* R s c L o n g R a n g e ******************************/
+class RscLongRange : public RscTop
+{
+protected:
+ struct RscLongRangeInst
+ {
+ long nValue; // nValue = Ausgangswert - nMin
+ BOOL bDflt; // Ist Default
+ };
+ long nMin; // Minimum des Bereiches
+ long nMax; // Maximum des Bereiches
+ USHORT nSize;
+public:
+ RscLongRange( HASHID nId, USHORT nTypId );
+ virtual RSCCLASS_TYPE GetClassType() const;
+ RSCINST Create( RSCINST * pInst, const RSCINST & rDfltInst, BOOL );
+ // Der zulaessige Bereich wird gesetzt
+ ERRTYPE SetRange( long nMinimum, long nMaximum );
+ // Gibt die Groesse der Klasse in Bytes
+ USHORT Size(){ return nSize; }
+ // Eine Zuweisung an eine Variable
+ virtual void SetToDefault( const RSCINST & rInst )
+ {
+ ((RscLongRangeInst*)rInst.pData)->bDflt = TRUE;
+ }
+ BOOL IsDefault( const RSCINST & rInst)
+ {
+ return( ((RscLongRangeInst*)rInst.pData)->bDflt );
+ };
+ // Als Default setzen
+ BOOL IsValueDefault( const RSCINST & rInst, CLASS_DATA pDef );
+ ERRTYPE SetNumber( const RSCINST &, long );
+ ERRTYPE GetNumber( const RSCINST &, long * );
+ void WriteSrc( const RSCINST &, FILE * fOutput,
+ RscTypCont * pTC, USHORT nTab, const char * );
+ ERRTYPE WriteRc( const RSCINST &, RscWriteRc & aMem,
+ RscTypCont * pTC, USHORT, BOOL bExtra );
+ void WriteRcAccess( FILE * fOutput, RscTypCont * pTC,
+ const char * );
+
+};
+
+/******************* R s c L o n g E n u m R a n g e ******************/
+class RscLongEnumRange : public RscLongRange
+{
+public:
+ RscLongEnumRange( HASHID nId, USHORT nTypId );
+
+ ERRTYPE SetConst( const RSCINST & rInst, HASHID nValueId,
+ long nValue );
+};
+
+/******************* R s c I d R a n g e ***********************************/
+class RscIdRange : public RscTop
+{
+ USHORT nSize;
+protected:
+ long nMin; // Minimum des Bereiches
+ long nMax; // Maximum des Bereiches
+ BOOL bRcLong;// Binaere Resource 4 Byte statt 2
+public:
+ RscIdRange( HASHID nId, USHORT nTypId, BOOL bRcL = FALSE );
+ virtual RSCCLASS_TYPE GetClassType() const;
+ // Der zulaessige Bereich wird gesetzt
+ ERRTYPE SetRange( long nMinimum, long nMaximum ){
+ nMin = nMinimum;
+ nMax = nMaximum;
+ return ERR_OK;
+ }
+ RSCINST Create( RSCINST * pInst, const RSCINST & rDfltInst, BOOL );
+ void Destroy( const RSCINST & rInst );
+ USHORT Size(){ return nSize; }
+ virtual void SetToDefault( const RSCINST & rInst )
+ {
+ ((RscId*)rInst.pData)->aExp.cUnused = TRUE;
+ }
+ BOOL IsDefault( const RSCINST & rInst)
+ {
+ //cUnused wird fuer Defaultkennung verwendet
+ return ((RscId*)rInst.pData)->aExp.cUnused
+ ? TRUE : FALSE;
+ }
+ // Als Default setzen
+ BOOL IsValueDefault( const RSCINST & rInst, CLASS_DATA pDef );
+ ERRTYPE SetNumber( const RSCINST &, long );
+ ERRTYPE GetNumber( const RSCINST &, long * );
+ ERRTYPE SetRef( const RSCINST &, const RscId & rRscId );
+ ERRTYPE GetRef( const RSCINST & rInst, RscId * );
+ void WriteSrc( const RSCINST &, FILE * fOutput,
+ RscTypCont * pTC, USHORT nTab, const char * );
+ ERRTYPE WriteRc( const RSCINST &, RscWriteRc & aMem,
+ RscTypCont * pTC, USHORT, BOOL bExtra );
+ BOOL IsConsistent( const RSCINST & rInst, RscInconsList * pList );
+ void WriteRcAccess( FILE * fOutput, RscTypCont * pTC,
+ const char * );
+
+};
+
+/******************* R s c B o o l ***************************************/
+class RscBool : public RscRange
+{
+public:
+ RscBool( HASHID nId, USHORT nTypId );
+ virtual RSCCLASS_TYPE GetClassType() const;
+ // Der zulaessige Bereich wird gesetzt
+ ERRTYPE SetRange( long, long ){
+ return( ERR_UNKNOWN_METHOD );
+ };
+ ERRTYPE SetBool( const RSCINST & rInst, BOOL b ){
+ return( SetNumber( rInst, (long)b ) );
+ };
+ ERRTYPE GetBool( const RSCINST & rInst, BOOL * pB){
+ long l;
+ GetNumber( rInst, &l );
+ *pB = (0 != l);
+ return( ERR_OK );
+ };
+ void WriteSrc( const RSCINST &, FILE * fOutput,
+ RscTypCont * pTC, USHORT nTab, const char * );
+ void WriteRcAccess( FILE * fOutput, RscTypCont * pTC,
+ const char * );
+
+};
+
+class RscBreakRange : public RscRange {
+ long nOutRange;
+public:
+ RscBreakRange( HASHID nId, USHORT nTypId );
+ void SetOutRange( long nNumber ){
+ nOutRange = nNumber;
+ }
+ RSCINST Create( RSCINST * pInst, const RSCINST & rDfltInst, BOOL );
+ ERRTYPE SetNumber( const RSCINST &, long );
+};
+
+#endif // _RSCRANGE_HXX
diff --git a/rsc/inc/rscrsc.hxx b/rsc/inc/rscrsc.hxx
new file mode 100644
index 000000000000..2a37bc48e698
--- /dev/null
+++ b/rsc/inc/rscrsc.hxx
@@ -0,0 +1,158 @@
+/*************************************************************************
+ *
+ * $RCSfile: rscrsc.hxx,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 16:42:55 $
+ *
+ * The Contents of this file are made available subject to the terms of
+ * either of the following licenses
+ *
+ * - GNU Lesser General Public License Version 2.1
+ * - Sun Industry Standards Source License Version 1.1
+ *
+ * Sun Microsystems Inc., October, 2000
+ *
+ * GNU Lesser General Public License Version 2.1
+ * =============================================
+ * Copyright 2000 by Sun Microsystems, Inc.
+ * 901 San Antonio Road, Palo Alto, CA 94303, USA
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1, as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ *
+ *
+ * Sun Industry Standards Source License Version 1.1
+ * =================================================
+ * The contents of this file are subject to the Sun Industry Standards
+ * Source License Version 1.1 (the "License"); You may not use this file
+ * except in compliance with the License. You may obtain a copy of the
+ * License at http://www.openoffice.org/license.html.
+ *
+ * Software provided under this License is provided on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
+ * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
+ * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
+ * See the License for the specific provisions governing your rights and
+ * obligations concerning the Software.
+ *
+ * The Initial Developer of the Original Code is: Sun Microsystems, Inc.
+ *
+ * Copyright: 2000 by Sun Microsystems, Inc.
+ *
+ * All Rights Reserved.
+ *
+ * Contributor(s): _______________________________________
+ *
+ *
+ ************************************************************************/
+/************************************************************************
+
+ Source Code Control System - Header
+
+ $Header: /zpool/svn/migration/cvs_rep_09_09_08/code/rsc/inc/rscrsc.hxx,v 1.1.1.1 2000-09-18 16:42:55 hr Exp $
+
+**************************************************************************/
+
+#ifndef _RSCRSC_HXX
+#define _RSCRSC_HXX
+
+#ifndef _LANG_HXX //autogen
+#include <tools/lang.hxx>
+#endif
+
+
+#ifndef RSCALL_H
+#include <rscall.h>
+#endif
+#ifndef RSCERROR_H
+#include <rscerror.h>
+#endif
+#ifndef RSCTOOLS_HXX
+#include <rsctools.hxx>
+#endif
+
+class RscTypCont;
+
+/****************** T Y P E S ********************************************/
+
+#define MAX_INPUTFILES 100
+#define MAX_SYMBOLS 10
+#define MAX_INCLUDES 10
+
+/****************** R s c C m d L i n e **********************************/
+class RscCmdLine
+{
+ void Init();
+
+public:
+ RscStrList aInputList; // Liste der Quelldateien
+ RscStrList aSymbolList; // Liste der Symbole
+ ByteString aPath; // Liste der Pfade
+ CharSet nSourceCharSet; // Welcher Quellzeichensatz
+ LanguageType nLangTypeId; // Globale Sprachtyp
+ RSCBYTEORDER_TYPE nByteOrder;
+ short nCommands; // Steuerbits
+ ByteString aOutputSrs; // Name der Srs-Ausgabedatei
+ ByteString aOutputRc; // Name der Rc-Ausgabedatei
+ ByteString aOutputLst; // Name der List-Ausgabedatei
+ ByteString aOutputSrc; // Name der Src-Ausgabedatei
+ ByteString aOutputRcCtor; // Name der Ctor-Ausgabedatei
+ ByteString aOutputCxx; // Name der Cxx-Ausgabedatei
+ ByteString aOutputHxx; // Name der Hxx-Ausgabedatei
+
+ RscCmdLine( short argc, char ** argv, RscError * pEH );
+ RscCmdLine();
+
+ void SetInputFile( const ByteString & rInputName );
+ ~RscCmdLine();
+};
+/****************** R s c ************************************************/
+class RscCompiler
+{
+private:
+ RscStrList aTmpFileList; // Liste der Tmp-Dateien
+ ByteString aTmpOutputRc; // Name der TempRc-Ausgabedatei
+ ByteString aTmpOutputHxx; // Name der TempHxx-Ausgabedatei
+ ByteString aTmpOutputCxx; // Name der TempCxx-Ausgabedatei
+ ByteString aTmpOutputRcCtor; // Name der Temp Ctor-Ausgabedatei
+ ByteString aTmpOutputSrc; // Name der TempSrc-Ausgabedatei
+
+ void CreateResFile( const char * pRc );
+
+ void Append( const ByteString& rOutputSrs, const ByteString& rTmpFile );
+ void OpenInput( const ByteString& rInput );
+
+public:
+ RscTypCont* pTC; // String und Id-Verwalter
+ RscCmdLine* pCL; // Kommandozeile
+ FILE * fListing; // Ausgabedatei fuer Listings
+ FILE * fExitFile; // bei Abbruch muss diese Datei geschlossen werden
+
+ RscCompiler( RscCmdLine *, RscTypCont * );
+ ~RscCompiler();
+
+ ERRTYPE Start();
+ ByteString GetTmpFileName(); // Die Dateien werden geloescht
+
+ // Include Statements lesen
+ ERRTYPE IncludeParser( ULONG lFileKey );
+ ERRTYPE ParseOneFile( ULONG lFileKey );
+ ERRTYPE CheckSyntax();
+ ERRTYPE Link();
+ void EndCompile();
+};
+
+#endif //_RSCRSC_HXX
diff --git a/rsc/inc/rscsfx.hxx b/rsc/inc/rscsfx.hxx
new file mode 100644
index 000000000000..57713e2cc740
--- /dev/null
+++ b/rsc/inc/rscsfx.hxx
@@ -0,0 +1,104 @@
+/*************************************************************************
+ *
+ * $RCSfile: rscsfx.hxx,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 16:42:55 $
+ *
+ * The Contents of this file are made available subject to the terms of
+ * either of the following licenses
+ *
+ * - GNU Lesser General Public License Version 2.1
+ * - Sun Industry Standards Source License Version 1.1
+ *
+ * Sun Microsystems Inc., October, 2000
+ *
+ * GNU Lesser General Public License Version 2.1
+ * =============================================
+ * Copyright 2000 by Sun Microsystems, Inc.
+ * 901 San Antonio Road, Palo Alto, CA 94303, USA
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1, as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ *
+ *
+ * Sun Industry Standards Source License Version 1.1
+ * =================================================
+ * The contents of this file are subject to the Sun Industry Standards
+ * Source License Version 1.1 (the "License"); You may not use this file
+ * except in compliance with the License. You may obtain a copy of the
+ * License at http://www.openoffice.org/license.html.
+ *
+ * Software provided under this License is provided on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
+ * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
+ * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
+ * See the License for the specific provisions governing your rights and
+ * obligations concerning the Software.
+ *
+ * The Initial Developer of the Original Code is: Sun Microsystems, Inc.
+ *
+ * Copyright: 2000 by Sun Microsystems, Inc.
+ *
+ * All Rights Reserved.
+ *
+ * Contributor(s): _______________________________________
+ *
+ *
+ ************************************************************************/
+/************************************************************************
+
+ Source Code Control System - Header
+
+ $Header: /zpool/svn/migration/cvs_rep_09_09_08/code/rsc/inc/rscsfx.hxx,v 1.1.1.1 2000-09-18 16:42:55 hr Exp $
+
+**************************************************************************/
+
+#ifndef _RSCSFX_HXX
+#define _RSCSFX_HXX
+
+// StarView (RSC_NOTYPE) bis (RSC_NOTYPE + 0x190)
+// Sfx (RSC_NOTYPE + 0x200) bis (RSC_NOTYPE + 0x20F)
+#define RSC_SFX_STYLE_FAMILIES (0x100 + 0x201)
+#define RSC_SFX_STYLE_FAMILY_ITEM (0x100 + 0x202)
+#define RSC_SFX_SLOT_INFO (0x100 + 0x203)
+// StarMoney (RSC_NOTYPE + 0x210) bis (RSC_NOTYPE + 0x22F)
+// Public (RSC_NOTYPE + 0x300) bis (RSC_NOTYPE + 0x3FF)
+
+//========== S F X =======================================
+enum SfxStyleFamily { SFX_STYLE_FAMILY_CHAR = 1,
+ SFX_STYLE_FAMILY_PARA = 2,
+ SFX_STYLE_FAMILY_FRAME = 4,
+ SFX_STYLE_FAMILY_PAGE = 8,
+ SFX_STYLE_FAMILY_PSEUDO = 16,
+ SFX_STYLE_FAMILY_ALL = 0x7fff
+ };
+
+
+// SfxTemplateDialog
+#define RSC_SFX_STYLE_ITEM_LIST 0x1
+#define RSC_SFX_STYLE_ITEM_BITMAP 0x2
+#define RSC_SFX_STYLE_ITEM_TEXT 0x4
+#define RSC_SFX_STYLE_ITEM_HELPTEXT 0x8
+#define RSC_SFX_STYLE_ITEM_STYLEFAMILY 0x10
+#define RSC_SFX_STYLE_ITEM_IMAGE 0x20
+
+
+// SfxSlotInfo
+#define RSC_SFX_SLOT_INFO_SLOTNAME 0x1
+#define RSC_SFX_SLOT_INFO_HELPTEXT 0x2
+
+
+#endif
diff --git a/rsc/inc/rscstr.hxx b/rsc/inc/rscstr.hxx
new file mode 100644
index 000000000000..72be37d459a3
--- /dev/null
+++ b/rsc/inc/rscstr.hxx
@@ -0,0 +1,176 @@
+/*************************************************************************
+ *
+ * $RCSfile: rscstr.hxx,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 16:42:55 $
+ *
+ * The Contents of this file are made available subject to the terms of
+ * either of the following licenses
+ *
+ * - GNU Lesser General Public License Version 2.1
+ * - Sun Industry Standards Source License Version 1.1
+ *
+ * Sun Microsystems Inc., October, 2000
+ *
+ * GNU Lesser General Public License Version 2.1
+ * =============================================
+ * Copyright 2000 by Sun Microsystems, Inc.
+ * 901 San Antonio Road, Palo Alto, CA 94303, USA
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1, as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ *
+ *
+ * Sun Industry Standards Source License Version 1.1
+ * =================================================
+ * The contents of this file are subject to the Sun Industry Standards
+ * Source License Version 1.1 (the "License"); You may not use this file
+ * except in compliance with the License. You may obtain a copy of the
+ * License at http://www.openoffice.org/license.html.
+ *
+ * Software provided under this License is provided on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
+ * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
+ * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
+ * See the License for the specific provisions governing your rights and
+ * obligations concerning the Software.
+ *
+ * The Initial Developer of the Original Code is: Sun Microsystems, Inc.
+ *
+ * Copyright: 2000 by Sun Microsystems, Inc.
+ *
+ * All Rights Reserved.
+ *
+ * Contributor(s): _______________________________________
+ *
+ *
+ ************************************************************************/
+/************************************************************************
+
+ Source Code Control System - Header
+
+ $Header: /zpool/svn/migration/cvs_rep_09_09_08/code/rsc/inc/rscstr.hxx,v 1.1.1.1 2000-09-18 16:42:55 hr Exp $
+
+ Source Code Control System - Update
+
+ $Log: not supported by cvs2svn $
+ Revision 1.12 2000/09/17 12:51:09 willem.vandorp
+ OpenOffice header added.
+
+ Revision 1.11 2000/07/26 17:13:17 willem.vandorp
+ Headers/footers replaced
+
+ Revision 1.10 1997/08/27 18:18:12 MM
+ neue Headerstruktur
+
+
+ Rev 1.9 27 Aug 1997 18:18:12 MM
+ neue Headerstruktur
+
+ Rev 1.8 12 Sep 1996 12:44:56 MM
+ Eigene Ressourcen definieren
+
+ Rev 1.7 21 Nov 1995 19:49:08 TLX
+ Neuer Link
+
+ Rev 1.6 12 Jan 1994 15:18:22 mm
+ Alignementprobleme und Warnings fuer DEC-Alpha beseitigt
+
+ Rev 1.5 25 Aug 1993 15:34:30 mm
+ Fehler und Warnings beseitigt
+
+ Rev 1.4 04 Feb 1993 17:38:44 mm
+ GetClassType Fehler verbessert und keine Inline -ctor.
+
+ Rev 1.3 03 Feb 1993 15:03:08 mm
+ GetClassType() implementiert
+
+ Rev 1.2 05 Jan 1993 10:50:44 mm
+ Neues Default verhalten
+
+ Rev 1.1 23 Dec 1992 14:02:40 mm
+ Sprachaenderung
+
+ Rev 1.0 10 Aug 1992 07:14:14 MM
+ Initial revision.
+
+ Rev 1.11 23 Mar 1992 15:24:20 MM
+
+ Rev 1.10 16 Jan 1992 12:48:06 MM
+ IsVarDefault
+**************************************************************************/
+
+#ifndef _RSCSTR_HXX
+#define _RSCSTR_HXX
+
+#ifndef _RSCALL_H
+#include <rscall.h>
+#endif
+#ifndef _RSCERROR_H
+#include <rscerror.h>
+#endif
+#ifndef _RSCHASH_HXX
+#include <rschash.hxx>
+#endif
+#ifndef _RSCTOP_HXX
+#include <rsctop.hxx>
+#endif
+
+/******************* R s c S t r i n g ***********************************/
+class RscString : public RscTop
+{
+ RscTop * pRefClass;
+ struct RscStringInst {
+ char * pStr; // Zeiger auf String
+ BOOL bDflt; // Ist Default
+ RscId aRefId; // ReferenzName
+ };
+ USHORT nSize;
+public:
+ RscString( HASHID nId, USHORT nTypId );
+ virtual RSCCLASS_TYPE GetClassType() const;
+
+ void SetRefClass( RscTop * pClass )
+ {
+ pRefClass = pClass;
+ };
+ RSCINST Create( RSCINST * pInst, const RSCINST & rDfltInst, BOOL );
+ // Der zulaessige Bereich wird gesetzt
+ void Destroy( const RSCINST & rInst );
+ USHORT Size(){ return nSize; }
+ void SetToDefault( const RSCINST & rInst )
+ {
+ ((RscStringInst*)rInst.pData)->bDflt = TRUE;
+ }
+ BOOL IsDefault( const RSCINST & rInst)
+ {
+ return( ((RscStringInst*)rInst.pData)->bDflt );
+ };
+ // Als Default setzen
+ BOOL IsValueDefault( const RSCINST & rInst, CLASS_DATA pDef );
+ ERRTYPE SetString( const RSCINST &, char * pStr );
+ ERRTYPE GetString( const RSCINST &, char ** ppStr );
+ ERRTYPE GetRef( const RSCINST & rInst, RscId * );
+ ERRTYPE SetRef( const RSCINST & rInst, const RscId & rRefId );
+ void WriteSrc( const RSCINST &, FILE * fOutput,
+ RscTypCont * pTC, USHORT nTab, const char * );
+ ERRTYPE WriteRc( const RSCINST &, RscWriteRc & aMem,
+ RscTypCont * pTC, USHORT, BOOL bExtra );
+ virtual void WriteRcAccess( FILE * fOutput, RscTypCont * pTC,
+ const char * );
+};
+
+#endif // _RSCSTR_HXX
diff --git a/rsc/inc/rsctools.hxx b/rsc/inc/rsctools.hxx
new file mode 100644
index 000000000000..d5545699b017
--- /dev/null
+++ b/rsc/inc/rsctools.hxx
@@ -0,0 +1,246 @@
+/*************************************************************************
+ *
+ * $RCSfile: rsctools.hxx,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 16:42:55 $
+ *
+ * The Contents of this file are made available subject to the terms of
+ * either of the following licenses
+ *
+ * - GNU Lesser General Public License Version 2.1
+ * - Sun Industry Standards Source License Version 1.1
+ *
+ * Sun Microsystems Inc., October, 2000
+ *
+ * GNU Lesser General Public License Version 2.1
+ * =============================================
+ * Copyright 2000 by Sun Microsystems, Inc.
+ * 901 San Antonio Road, Palo Alto, CA 94303, USA
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1, as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ *
+ *
+ * Sun Industry Standards Source License Version 1.1
+ * =================================================
+ * The contents of this file are subject to the Sun Industry Standards
+ * Source License Version 1.1 (the "License"); You may not use this file
+ * except in compliance with the License. You may obtain a copy of the
+ * License at http://www.openoffice.org/license.html.
+ *
+ * Software provided under this License is provided on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
+ * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
+ * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
+ * See the License for the specific provisions governing your rights and
+ * obligations concerning the Software.
+ *
+ * The Initial Developer of the Original Code is: Sun Microsystems, Inc.
+ *
+ * Copyright: 2000 by Sun Microsystems, Inc.
+ *
+ * All Rights Reserved.
+ *
+ * Contributor(s): _______________________________________
+ *
+ *
+ ************************************************************************/
+/************************************************************************
+
+ Source Code Control System - Header
+
+ $Header: /zpool/svn/migration/cvs_rep_09_09_08/code/rsc/inc/rsctools.hxx,v 1.1.1.1 2000-09-18 16:42:55 hr Exp $
+
+ Source Code Control System - Update
+
+ $Log: not supported by cvs2svn $
+ Revision 1.16 2000/09/17 12:51:09 willem.vandorp
+ OpenOffice header added.
+
+ Revision 1.15 2000/07/26 17:13:17 willem.vandorp
+ Headers/footers replaced
+
+ Revision 1.14 2000/07/11 16:59:41 th
+ Unicode
+
+ Revision 1.13 1999/09/20 17:25:29 pl
+ PutAt mit short
+
+ Revision 1.12 1999/09/08 11:47:39 mm
+ BigEndian/LittleEndian corrected
+
+**************************************************************************/
+struct RSHEADER_TYPE;
+class RscPtrPtr;
+
+#ifndef _RSCTOOLS_HXX
+#define _RSCTOOLS_HXX
+
+#ifdef UNX
+#include <stdlib.h>
+#endif
+#include <stdio.h>
+
+#ifndef _STRING_HXX //autogen
+#include <tools/string.hxx>
+#endif
+
+#ifndef _LIST_HXX //autogen
+#include <tools/list.hxx>
+#endif
+
+/******************* T y p e s *******************************************/
+#define HASH_NONAME 0xFFFF //not an entry in hashtabel
+typedef USHORT HASHID; // Definition von HASHID
+// Zeichensatz
+enum COMPARE { LESS = -1, EQUAL = 0, GREATER = 1 };
+
+enum RSCBYTEORDER_TYPE { RSC_BIGENDIAN, RSC_LITTLEENDIAN, RSC_SYSTEMENDIAN };
+
+/******************* M A K R O S *****************************************/
+#define ALIGNED_SIZE( nSize ) \
+ (nSize + sizeof( void * ) -1) / sizeof( void * ) * sizeof( void * )
+/******************* F u n c t i o n F o r w a r d s *******************/
+ByteString GetTmpFileName();
+BOOL Append( ByteString aDestFile, ByteString aSourceFile );
+BOOL Append( FILE * fDest, ByteString aSourceFile );
+ByteString InputFile ( char * pInput, char * pExt );
+ByteString OutputFile( ByteString aInput, char * ext );
+char * ResponseFile( RscPtrPtr * ppCmd, char ** ppArgv,
+ USHORT nArgc );
+void RscExit( USHORT nExit );
+
+/********* A n s i - F u n c t i o n F o r w a r d s *******************/
+int rsc_strnicmp( const char *string1, const char *string2, size_t count );
+int rsc_stricmp( const char *string1, const char *string2 );
+
+/****************** C L A S S E S ****************************************/
+DECLARE_LIST( RscStrList, ByteString * )
+/*********** R s c C h a r ***********************************************/
+class RscChar
+{
+public:
+ static char * MakeUTF8( char * pStr, UINT16 nTextEncoding );
+ static char * MakeUTF8FromL( char * pStr );
+};
+
+/*********** R s c M e m *************************************************/
+class RscMem
+{
+public:
+ static void * Malloc( USHORT nSize );
+ static void * Realloc( void * pMem, USHORT nSize );
+ static char * Realloc( char * pMem, USHORT nSize ){
+ return (char *)Realloc( (void *)pMem, nSize );
+ }
+ static void Free( void * pMem );
+ static void Free( char * pMem ){
+ Free( (void *)pMem );
+ }
+ static char * Assignsw( const char *psw, short nExtraSpace );
+};
+
+/****************** R s c P t r P t r ************************************/
+class RscPtrPtr
+{
+ USHORT nCount;
+ void ** pMem;
+public:
+ RscPtrPtr();
+ ~RscPtrPtr();
+ void Reset();
+ USHORT Append( void * );
+ USHORT Append( char * pStr ){
+ return( Append( (void *)pStr ) );
+ };
+ USHORT GetCount(){ return( nCount ); };
+ void * GetEntry( USHORT nEle );
+ void ** GetBlock(){ return( pMem ); };
+};
+
+/****************** R s c W r i t e R c **********************************/
+class RscWriteRc
+{
+ USHORT nLen;
+ BOOL bSwap;
+ RSCBYTEORDER_TYPE nByteOrder;
+ char * pMem;
+ char * GetPointer( USHORT nSize );
+public:
+ RscWriteRc( RSCBYTEORDER_TYPE nOrder = RSC_SYSTEMENDIAN );
+ ~RscWriteRc();
+ USHORT IncSize( USHORT nSize );// gibt die vorherige Groesse
+ void * GetBuffer()
+ {
+ return GetPointer( 0 );
+ }
+ USHORT GetShort( USHORT nPos )
+ {
+ return bSwap ? SWAPSHORT( *(USHORT*)(GetPointer(nPos)) ) : *(USHORT*)(GetPointer(nPos));
+ }
+ char * GetUTF8( USHORT nPos )
+ {
+ return GetPointer( nPos );
+ }
+
+
+ RSCBYTEORDER_TYPE GetByteOrder() const { return nByteOrder; }
+ USHORT Size(){ return( nLen ); };
+ //void Put( void * pData, USHORT nSize );
+ void Put( INT32 lVal )
+ {
+ if( bSwap )
+ {
+ Put( *(((USHORT*)&lVal) +1) );
+ Put( *(USHORT*)&lVal );
+ }
+ else
+ {
+ Put( *(USHORT*)&lVal );
+ Put( *(((USHORT*)&lVal) +1) );
+ }
+ }
+ void Put( UINT32 nValue )
+ { Put( (INT32)nValue ); }
+ void Put( USHORT nValue );
+ void Put( short nValue )
+ { Put( (USHORT)nValue ); }
+ void PutUTF8( char * pData );
+
+ void PutAt( USHORT nPos, INT32 lVal )
+ {
+ if( bSwap )
+ {
+ PutAt( nPos, *(((USHORT*)&lVal) +1) );
+ PutAt( nPos + 2, *(USHORT*)&lVal );
+ }
+ else
+ {
+ PutAt( nPos, *(USHORT*)&lVal );
+ PutAt( nPos + 2, *(((USHORT*)&lVal) +1) );
+ }
+ }
+ void PutAt( USHORT nPos, short nVal )
+ {
+ PutAt( nPos, (USHORT)nVal );
+ }
+ void PutAt( USHORT nPos, USHORT nVal )
+ {
+ *(USHORT *)(GetPointer( nPos )) = bSwap ? SWAPSHORT( nVal ) : nVal;
+ }
+};
+
+#endif // _RSCTOOLS_HXX
diff --git a/rsc/inc/rsctop.hxx b/rsc/inc/rsctop.hxx
new file mode 100644
index 000000000000..4dd365c04bc2
--- /dev/null
+++ b/rsc/inc/rsctop.hxx
@@ -0,0 +1,297 @@
+/*************************************************************************
+ *
+ * $RCSfile: rsctop.hxx,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 16:42:55 $
+ *
+ * The Contents of this file are made available subject to the terms of
+ * either of the following licenses
+ *
+ * - GNU Lesser General Public License Version 2.1
+ * - Sun Industry Standards Source License Version 1.1
+ *
+ * Sun Microsystems Inc., October, 2000
+ *
+ * GNU Lesser General Public License Version 2.1
+ * =============================================
+ * Copyright 2000 by Sun Microsystems, Inc.
+ * 901 San Antonio Road, Palo Alto, CA 94303, USA
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1, as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ *
+ *
+ * Sun Industry Standards Source License Version 1.1
+ * =================================================
+ * The contents of this file are subject to the Sun Industry Standards
+ * Source License Version 1.1 (the "License"); You may not use this file
+ * except in compliance with the License. You may obtain a copy of the
+ * License at http://www.openoffice.org/license.html.
+ *
+ * Software provided under this License is provided on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
+ * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
+ * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
+ * See the License for the specific provisions governing your rights and
+ * obligations concerning the Software.
+ *
+ * The Initial Developer of the Original Code is: Sun Microsystems, Inc.
+ *
+ * Copyright: 2000 by Sun Microsystems, Inc.
+ *
+ * All Rights Reserved.
+ *
+ * Contributor(s): _______________________________________
+ *
+ *
+ ************************************************************************/
+/************************************************************************
+
+ Source Code Control System - Header
+
+ $Header: /zpool/svn/migration/cvs_rep_09_09_08/code/rsc/inc/rsctop.hxx,v 1.1.1.1 2000-09-18 16:42:55 hr Exp $
+
+**************************************************************************/
+
+#ifndef _RSCTOP_HXX
+#define _RSCTOP_HXX
+
+#ifndef _RSCERROR_H
+#include <rscerror.h>
+#endif
+#ifndef _RSCTOOLS_HXX
+#include <rsctools.hxx>
+#endif
+#ifndef _RSCHASH_HXX
+#include <rschash.hxx>
+#endif
+#ifndef _RSCCLOBJ_HXX
+#include <rscclobj.hxx>
+#endif
+
+/****************** T Y P E S ********************************************/
+typedef short RSCVAR;
+#define VAR_POINTER 0x0001
+#define VAR_HIDDEN 0x0002
+#define VAR_NODATAINST 0x0004
+#define VAR_NORC 0x0008
+#define VAR_SVDYNAMIC 0x0010
+#define VAR_NOENUM 0x0020
+#define VAR_EXTENDABLE 0x0040 /* Auch die Ableitung einer Klasse kann angegeben werden */
+
+/****************** C L A S S E S ****************************************/
+/******************* R s c C l a s s *************************************/
+class RscTop : public RefNode
+{
+ RscTop * pSuperClass;
+ RSCINST aDfltInst;
+ USHORT nTypId;
+ RscTop * pRefClass;
+
+protected:
+ RscTop( HASHID nId, USHORT nTypIdent,
+ RscTop * pSuperCl = NULL );
+
+public:
+ ByteString aCallPar1; // Klassenaufruf ohne Typen bis ResId
+ ByteString aCallPar2; // Klassenaufruf ohne Typen ab ResId
+ ByteString aCallParType; // Klassenaufruf mit Typen
+
+ void SetSuperClass( RscTop * pClass )
+ {
+ pSuperClass = pClass;
+ }
+ RscTop* GetSuperClass() const
+ { return pSuperClass; }
+ // Gibt den Typidentifier zurueck
+ USHORT GetTypId() const
+ { return nTypId; };
+ // Gibt die Oberklasse zurueck
+ BOOL InHierarchy( RscTop * pClass );
+ BOOL IsCodeWriteable() const
+ {
+ return( 0 != aCallParType.Len() );
+ }
+ void SetCallPar( const ByteString & rPar1, const ByteString & rPar2,
+ const ByteString & rParType );
+ void SetRefClass( RscTop * pRef ) { pRefClass = pRef; }
+ RscTop* GetRefClass() const { return pRefClass; }
+ virtual RSCCLASS_TYPE GetClassType() const = 0;
+ RSCINST GetDefault();
+
+ // Vorbereitung auf den dtor aufruf
+ // Da die Klassen gegenseitige Abhaengigkeiten
+ // aufweisen koennen, kann man im dtor nicht davon
+ // ausgehen, dass alle Klassenzeiger noch gueltig sind
+ virtual void Pre_dtor();
+
+ virtual HASHID GetConstant( USHORT );
+
+ virtual RscTop * GetTypeClass() const;
+
+ // Gibt die Groesse der Klasse in Bytes
+ virtual USHORT Size();
+
+ // Gibt die Referenz zurueck
+ virtual ERRTYPE GetRef( const RSCINST & rInst, RscId * );
+
+ // Gibt die Referenz zurueck
+ virtual ERRTYPE SetRef( const RSCINST & rInst, const RscId & rRefId );
+
+ // Variable anlegen
+ virtual ERRTYPE SetVariable( HASHID nVarName, RscTop * pClass,
+ RSCINST * pDflt = NULL,
+ RSCVAR nVarType = 0, USHORT nMask = 0,
+ HASHID nDataBaseName = HASH_NONAME );
+
+ // Zaehlt alle Variablen auf
+ virtual void EnumVariables( void * pData, VarEnumCallbackProc );
+
+ // Liefert Instanz der Variablen zurueck
+ // pData, pClass im return koennen NULL sein
+ virtual RSCINST GetVariable( const RSCINST & rInst, HASHID nVarName,
+ const RSCINST & rInitInst,
+ BOOL nInitDflt = FALSE,
+ RscTop * pCreateClass = NULL );
+ virtual RSCINST GetCopyVar( const RSCINST & rInst, HASHID nVarName );
+
+ virtual RSCINST GetTupelVar( const RSCINST & rInst, USHORT nPos,
+ const RSCINST & rInitInst );
+
+ // Liefert Instanz aus einem Feld zurueck
+ // pGetInst im return kann NULL sein
+ virtual ERRTYPE GetElement( const RSCINST & rInst, const RscId & rEleName,
+ RscTop *pCreateClass, const RSCINST & rCreateInst,
+ RSCINST * pGetInst );
+
+ // Liefert Instanz aus einem Feld zurueck
+ // pGetInst im return kann NULL sein
+ virtual ERRTYPE GetValueEle( const RSCINST & rInst, long lValue,
+ RscTop * pCreateClass,
+ RSCINST * pGetInst );
+
+ // Liefert Instanz aus einem Feld zurueck
+ // pGetInst im return kann NULL sein
+ virtual ERRTYPE GetArrayEle( const RSCINST & rInst, HASHID nId,
+ RscTop * pCreateClass,
+ RSCINST * pGetInst );
+
+ virtual RSCINST SearchEle( const RSCINST & rInst, const RscId & rEleName,
+ RscTop * pClass );
+
+ // Liefert Instanz an der Position zurueck
+ virtual RSCINST GetPosEle( const RSCINST & rInst, USHORT nPos );
+
+ // verschiebt eine Instanz
+ virtual ERRTYPE MovePosEle( const RSCINST & rInst, USHORT nDestPos,
+ USHORT nSourcePos );
+
+ // aendert RscId an Position
+ virtual ERRTYPE SetPosRscId( const RSCINST & rInst, USHORT nPos,
+ const RscId & rRscId);
+
+ // Liefert Information ueber Instanz
+ // an der Position zurueck
+ virtual SUBINFO_STRUCT GetInfoEle( const RSCINST & rInst, USHORT nPos );
+
+ // Anzahl der Eintraege
+ virtual USHORT GetCount( const RSCINST & rInst );
+
+ // Eine Zuweisung an eine Variable
+ virtual ERRTYPE SetNumber( const RSCINST & rInst, long lValue );
+
+ // Eine Zuweisung an eine Variable
+ virtual ERRTYPE SetBool( const RSCINST & rInst, BOOL bValue );
+
+ // Eine Zuweisung an eine Variable
+ virtual ERRTYPE SetConst( const RSCINST & rInst, HASHID nValueId,
+ long nValue );
+
+ // Eine Zuweisung an eine Variable
+ virtual ERRTYPE SetNotConst( const RSCINST & rInst, HASHID nId );
+
+ virtual ERRTYPE SetString( const RSCINST & rInst, char * pStr );
+
+ virtual ERRTYPE GetNumber( const RSCINST & rInst, long * pN );
+
+ virtual ERRTYPE GetBool( const RSCINST & rInst, BOOL * pB );
+
+ virtual ERRTYPE GetConst( const RSCINST & rInst, HASHID * pH );
+
+ virtual ERRTYPE GetString( const RSCINST & rInst, char ** ppStr );
+
+ virtual RSCINST Create( RSCINST * pInst,
+ const RSCINST & rDefInst, BOOL bOwnClass = FALSE );
+
+ // Instanz zerstoeren
+ virtual void Destroy( const RSCINST & rInst );
+
+ // prueft auf konsistenz
+ virtual BOOL IsConsistent( const RSCINST & rInst,
+ RscInconsList * pList = NULL );
+
+ // Alles auf Default setzen
+ virtual void SetToDefault( const RSCINST & rInst );
+
+ // Ist Eingabe = Default
+ virtual BOOL IsDefault( const RSCINST & rInst );
+
+ // Gleiche Werte auf Default setzen
+ virtual BOOL IsValueDefault( const RSCINST & rInst, CLASS_DATA pDef );
+
+ // Instanz auf Default setzen
+ virtual void SetDefault( const RSCINST & rInst, HASHID nVarId );
+
+ // Default zu einer Variablen holen
+ virtual RSCINST GetDefault( HASHID nVarId );
+
+ virtual void Delete( const RSCINST & rInst, RscTop * pClass,
+ const RscId & rId );
+
+ virtual void DeletePos( const RSCINST & rInst, USHORT nPos );
+
+ // Schreibt den Kopf und das Ende einer Resource
+ // Script Datei
+ virtual void WriteSrcHeader( const RSCINST & rInst, FILE * fOutput,
+ RscTypCont * pTC, USHORT nTab,
+ const RscId & aId, const char * );
+ virtual void WriteSrc( const RSCINST & rInst, FILE * fOutput,
+ RscTypCont * pTC, USHORT nTab,const char * );
+ virtual ERRTYPE WriteRcHeader( const RSCINST & rInst, RscWriteRc & aMem,
+ RscTypCont * pTC, const RscId & aId,
+ USHORT nDeep, BOOL bExtra );
+ virtual ERRTYPE WriteRc( const RSCINST & rInst, RscWriteRc & aMem,
+ RscTypCont * pTC, USHORT nDeep, BOOL bExtra );
+
+ // Weiterleitung an Superklassen wird unterbunden
+ virtual ERRTYPE WriteHxxHeader( const RSCINST & rInst, FILE * fOutput,
+ RscTypCont * pTC, const RscId & rId );
+ virtual ERRTYPE WriteHxx( const RSCINST & rInst, FILE * fOutput,
+ RscTypCont * pTC, const RscId &rId );
+ virtual ERRTYPE WriteCxxHeader( const RSCINST & rInst, FILE * fOutput,
+ RscTypCont * pTC, const RscId &rId );
+ virtual ERRTYPE WriteCxx( const RSCINST & rInst, FILE * fOutput,
+ RscTypCont * pTC, const RscId &rId );
+
+ void WriteSyntaxHeader( FILE * fOutput, RscTypCont * pTC );
+ virtual void WriteSyntax( FILE * fOutput, RscTypCont * pTC );
+
+ virtual void WriteRcAccess( FILE * fOutput, RscTypCont * pTC,
+ const char * );
+ virtual void WriteRcCtor( FILE * fOutput, RscTypCont * pTC );
+};
+
+#endif //_RSCTOP_HXX
diff --git a/rsc/inc/rsctree.hxx b/rsc/inc/rsctree.hxx
new file mode 100644
index 000000000000..2fb07b9b4e6b
--- /dev/null
+++ b/rsc/inc/rsctree.hxx
@@ -0,0 +1,176 @@
+/*************************************************************************
+ *
+ * $RCSfile: rsctree.hxx,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 16:42:55 $
+ *
+ * The Contents of this file are made available subject to the terms of
+ * either of the following licenses
+ *
+ * - GNU Lesser General Public License Version 2.1
+ * - Sun Industry Standards Source License Version 1.1
+ *
+ * Sun Microsystems Inc., October, 2000
+ *
+ * GNU Lesser General Public License Version 2.1
+ * =============================================
+ * Copyright 2000 by Sun Microsystems, Inc.
+ * 901 San Antonio Road, Palo Alto, CA 94303, USA
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1, as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ *
+ *
+ * Sun Industry Standards Source License Version 1.1
+ * =================================================
+ * The contents of this file are subject to the Sun Industry Standards
+ * Source License Version 1.1 (the "License"); You may not use this file
+ * except in compliance with the License. You may obtain a copy of the
+ * License at http://www.openoffice.org/license.html.
+ *
+ * Software provided under this License is provided on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
+ * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
+ * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
+ * See the License for the specific provisions governing your rights and
+ * obligations concerning the Software.
+ *
+ * The Initial Developer of the Original Code is: Sun Microsystems, Inc.
+ *
+ * Copyright: 2000 by Sun Microsystems, Inc.
+ *
+ * All Rights Reserved.
+ *
+ * Contributor(s): _______________________________________
+ *
+ *
+ ************************************************************************/
+/************************************************************************
+
+ Source Code Control System - Header
+
+ $Header: /zpool/svn/migration/cvs_rep_09_09_08/code/rsc/inc/rsctree.hxx,v 1.1.1.1 2000-09-18 16:42:55 hr Exp $
+
+ Source Code Control System - Update
+
+ $Log: not supported by cvs2svn $
+ Revision 1.8 2000/09/17 12:51:10 willem.vandorp
+ OpenOffice header added.
+
+ Revision 1.7 2000/07/26 17:13:17 willem.vandorp
+ Headers/footers replaced
+
+ Revision 1.6 2000/07/11 17:01:09 th
+ Unicode
+
+ Revision 1.5 1997/08/27 18:18:02 MM
+ neue Headerstruktur
+
+**************************************************************************/
+
+#ifndef _RSCTREE_HXX
+#define _RSCTREE_HXX
+
+#ifndef _LINK_HXX
+#include <tools/link.hxx>
+#endif
+
+#ifndef _RSCTOOLS_HXX
+#include <rsctools.hxx>
+#endif
+
+/****************** C L A S S E S ****************************************/
+class BiNode
+{
+protected:
+ BiNode* pLeft; // left subtree
+ BiNode* pRight; // right subtree
+
+public:
+
+ // Wandelt eine doppelt verkettete Liste in
+ // einen binaeren Baum um
+ BiNode * ChangeDLListBTree( BiNode * pList );
+
+ BiNode();
+ virtual ~BiNode();
+
+
+ // Wandelt einen binaeren Baum in eine doppelt
+ // verkettete Liste um
+ BiNode* ChangeBTreeDLList();
+
+ BiNode * Left() const { return pLeft ; };
+ BiNode * Right() const{ return pRight ; };
+ void EnumNodes( Link aLink ) const;
+};
+
+/*************************************************************************/
+class NameNode : public BiNode
+{
+ void SubOrderTree( NameNode * pOrderNode );
+
+protected:
+ // pCmp ist Zeiger auf Namen
+ NameNode* Search( const void * pCmp ) const;
+
+public:
+ NameNode* Left() const { return (NameNode *)pLeft ; };
+ NameNode* Right() const{ return (NameNode *)pRight ; };
+ NameNode* Search( const NameNode * pName ) const;
+ // insert a new node in the b-tree
+ BOOL Insert( NameNode * pTN, USHORT * nDepth );
+ BOOL Insert( NameNode* pTN );
+ virtual COMPARE Compare( const NameNode * ) const;
+ virtual COMPARE Compare( const void * ) const;
+ NameNode* SearchParent( const NameNode * ) const;
+ // return ist neue Root
+ NameNode* Remove( NameNode * );
+ void OrderTree();
+ BOOL IsOrderTree() const;
+
+};
+
+/*************************************************************************/
+class IdNode : public NameNode
+{
+ virtual COMPARE Compare( const NameNode * ) const;
+ virtual COMPARE Compare( const void * ) const;
+
+public:
+
+ IdNode* Search( USHORT nTypName ) const;
+ virtual USHORT GetId() const;
+};
+
+/*************************************************************************/
+class StringNode : public NameNode
+{
+ virtual COMPARE Compare( const NameNode * ) const;
+ virtual COMPARE Compare( const void * ) const;
+
+protected:
+ ByteString aName;
+
+public:
+ StringNode(){};
+ StringNode( const ByteString & rStr ) { aName = rStr; }
+
+ StringNode* Search( const char * ) const;
+ ByteString GetName() const { return aName; }
+};
+
+#endif // _RSCTREE_HXX