summaryrefslogtreecommitdiff
path: root/idl/inc
diff options
context:
space:
mode:
Diffstat (limited to 'idl/inc')
-rw-r--r--idl/inc/attrib.hxx77
-rw-r--r--idl/inc/basobj.hxx294
-rw-r--r--idl/inc/bastype.hxx290
-rw-r--r--idl/inc/char.hxx41
-rw-r--r--idl/inc/command.hxx78
-rw-r--r--idl/inc/database.hxx182
-rw-r--r--idl/inc/globals.hxx242
-rw-r--r--idl/inc/hash.hxx125
-rw-r--r--idl/inc/lex.hxx271
-rw-r--r--idl/inc/makefile.mk47
-rw-r--r--idl/inc/module.hxx117
-rw-r--r--idl/inc/object.hxx170
-rw-r--r--idl/inc/pch/precompiled_idl.cxx29
-rw-r--r--idl/inc/pch/precompiled_idl.hxx32
-rw-r--r--idl/inc/slot.hxx279
-rw-r--r--idl/inc/types.hxx345
16 files changed, 2619 insertions, 0 deletions
diff --git a/idl/inc/attrib.hxx b/idl/inc/attrib.hxx
new file mode 100644
index 000000000000..1dfbaea7f4bb
--- /dev/null
+++ b/idl/inc/attrib.hxx
@@ -0,0 +1,77 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org 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 version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+#ifndef _ATTRIB_HXX
+#define _ATTRIB_HXX
+
+#ifdef IDL_COMPILER
+#include <hash.hxx>
+#include <object.hxx>
+
+/******************** class SvAttribute **********************************/
+class SvAttribute
+{
+ SvStringHashEntryRef aName;
+ CreateMetaObjectType pCreateMethod;
+ SvMetaObjectRef aTmpClass;
+public:
+ SvAttribute( SvStringHashEntry * pAttribName,
+ CreateMetaObjectType pMethod )
+ : aName( pAttribName ),
+ pCreateMethod( pMethod ) {}
+
+ SvMetaObjectRef CreateClass()
+ {
+ if( aTmpClass.Is() )
+ {
+ SvMetaObjectRef aTmp( aTmpClass );
+ aTmpClass.Clear();
+ return aTmp;
+ }
+ return pCreateMethod();
+ }
+};
+
+#define SV_ATTRIBUTE( AttributeName, PostfixClassName ) \
+ SvAttribute( SvHash_##AttributeName(), \
+ SvMeta##PostfixClassName::Create )
+
+/******************** class SvAttributeList ******************************/
+DECLARE_LIST(SvAttributeListImpl,SvAttribute*)
+class SvAttributeList : public SvAttributeListImpl
+{
+public:
+ SvAttributeList() : SvAttributeListImpl() {}
+
+ void Append( SvAttribute * pObj )
+ { Insert( pObj, LIST_APPEND ); }
+};
+
+
+#endif // IDL_COMPILER
+#endif // _ATTRIB_HXX
+
diff --git a/idl/inc/basobj.hxx b/idl/inc/basobj.hxx
new file mode 100644
index 000000000000..f6705dae8be6
--- /dev/null
+++ b/idl/inc/basobj.hxx
@@ -0,0 +1,294 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org 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 version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+#ifndef _BASOBJ_HXX
+#define _BASOBJ_HXX
+
+#include <tools/ref.hxx>
+#include <bastype.hxx>
+#include <tools/pstm.hxx>
+
+class SvTokenStream;
+class SvMetaObject;
+class SvAttributeList;
+class SvIdlDataBase;
+
+typedef SvMetaObject * (*CreateMetaObjectType)();
+#define IDL_WRITE_COMPILER 0x8000
+#define IDL_WRITE_BROWSER 0x4000
+#define IDL_WRITE_CALLING 0x2000
+#define IDL_WRITE_MASK 0xE000
+
+#define C_PREF "C_"
+
+enum WriteType
+{
+ WRITE_IDL, WRITE_ODL, WRITE_SLOTMAP, WRITE_C_HEADER, WRITE_C_SOURCE,
+ WRITE_CXX_HEADER, WRITE_CXX_SOURCE, WRITE_DOCU
+};
+
+enum
+{
+ WA_METHOD = 0x1, WA_VARIABLE = 0x2, WA_ARGUMENT = 0x4,
+ WA_STRUCT = 0x8, WA_READONLY = 0x10
+};
+typedef int WriteAttribute;
+
+/******************** Meta Factory **************************************/
+#ifdef IDL_COMPILER
+
+#define PRV_SV_DECL_META_FACTORY( Class ) \
+ static SvAttributeList * pAttribList; \
+ static SvMetaObject * Create() { return new Class; } \
+ static const char * GetClassName() { return #Class; }
+
+#define PRV_SV_IMPL_META_FACTORY( Class ) \
+ SvAttributeList * Class::pAttribList = NULL;
+
+#else
+
+#define PRV_SV_DECL_META_FACTORY( Class )
+
+#define PRV_SV_IMPL_META_FACTORY( Class )
+
+#endif // IDL_COMPILER
+
+#define SV_DECL_META_FACTORY( Class, CLASS_ID ) \
+ SV_DECL_PERSIST( Class, CLASS_ID ) \
+ PRV_SV_DECL_META_FACTORY( Class )
+
+
+#define SV_DECL_META_FACTORY1( Class, Super1, CLASS_ID ) \
+ SV_DECL_PERSIST1( Class, Super1, CLASS_ID ) \
+ PRV_SV_DECL_META_FACTORY( Class )
+
+#define SV_IMPL_META_FACTORY( Class ) \
+ PRV_SV_IMPL_META_FACTORY( Class ) \
+ SV_IMPL_PERSIST( Class )
+
+
+#define SV_IMPL_META_FACTORY1( Class, Super1 ) \
+ PRV_SV_IMPL_META_FACTORY( Class ) \
+ SV_IMPL_PERSIST1( Class, Super1 )
+
+
+/******************** class SvMetaObject ********************************/
+class SvMetaObject : public SvPersistBase
+{
+public:
+ SV_DECL_META_FACTORY1( SvMetaObject, SvPersistBase, 14 )
+ SvMetaObject();
+
+#ifdef IDL_COMPILER
+ static void WriteTab( SvStream & rOutStm, USHORT nTab );
+ static BOOL TestAndSeekSpaceOnly( SvStream &, ULONG nBegPos );
+ static void Back2Delemitter( SvStream & );
+ static void WriteStars( SvStream & );
+
+ virtual BOOL ReadSvIdl( SvIdlDataBase &, SvTokenStream & rInStm );
+ virtual void WriteSvIdl( SvIdlDataBase & rBase, SvStream & rOutStm, USHORT nTab );
+
+ virtual void Write( SvIdlDataBase & rBase, SvStream & rOutStm, USHORT nTab,
+ WriteType, WriteAttribute = 0 );
+
+ virtual void WriteCxx( SvIdlDataBase & rBase, SvStream & rOutStm, USHORT nTab );
+ virtual void WriteHxx( SvIdlDataBase & rBase, SvStream & rOutStm, USHORT nTab );
+#endif
+};
+SV_DECL_IMPL_REF(SvMetaObject)
+//SV_DECL_IMPL_PERSIST_LIST(SvMetaObject,SvMetaObject *)
+SV_DECL_PERSIST_LIST(SvMetaObject,SvMetaObject *)
+SV_IMPL_PERSIST_LIST(SvMetaObject,SvMetaObject *)
+
+
+class SvMetaObjectMemberStack
+{
+ SvMetaObjectMemberList aList;
+public:
+ SvMetaObjectMemberStack() {;}
+
+ void Push( SvMetaObject * pObj )
+ { aList.Insert( pObj, LIST_APPEND ); }
+ SvMetaObject * Pop() { return aList.Remove( aList.Count() -1 ); }
+ SvMetaObject * Top() const { return aList.GetObject( aList.Count() -1 ); }
+ void Clear() { aList.Clear(); }
+ ULONG Count() const { return aList.Count(); }
+
+ SvMetaObject * Get( TypeId nType )
+ {
+ SvMetaObject * pObj = aList.Last();
+ while( pObj )
+ {
+ if( pObj->IsA( nType ) )
+ return pObj;
+ pObj = aList.Prev();
+ }
+ return NULL;
+ }
+};
+
+/******************** class SvMetaName **********************************/
+class SvMetaName : public SvMetaObject
+{
+ SvString aName;
+ SvHelpContext aHelpContext;
+ SvHelpText aHelpText;
+ SvString aConfigName;
+ SvString aDescription;
+
+protected:
+#ifdef IDL_COMPILER
+ virtual BOOL ReadNameSvIdl( SvIdlDataBase &, SvTokenStream & rInStm );
+ void DoReadContextSvIdl( SvIdlDataBase &, SvTokenStream & rInStm,
+ char c = '\0' );
+ virtual void ReadContextSvIdl( SvIdlDataBase &, SvTokenStream & rInStm );
+ virtual void WriteContextSvIdl( SvIdlDataBase & rBase,
+ SvStream & rOutStm, USHORT nTab );
+ virtual void ReadAttributesSvIdl( SvIdlDataBase & rBase,
+ SvTokenStream & rInStm );
+ virtual void WriteAttributesSvIdl( SvIdlDataBase & rBase,
+ SvStream & rOutStm, USHORT nTab );
+ virtual void WriteAttributes( SvIdlDataBase & rBase, SvStream & rOutStm, USHORT nTab,
+ WriteType, WriteAttribute = 0);
+ virtual void WriteContext( SvIdlDataBase & rBase, SvStream & rOutStm, USHORT nTab,
+ WriteType, WriteAttribute = 0);
+#endif
+public:
+ SV_DECL_META_FACTORY1( SvMetaName, SvMetaObject, 15 )
+ SvMetaName();
+
+ virtual BOOL SetName( const ByteString & rName, SvIdlDataBase * = NULL );
+ void SetDescription( const ByteString& rText )
+ { aDescription = rText; }
+ const SvHelpContext& GetHelpContext() const { return aHelpContext; }
+ virtual const SvString & GetName() const { return aName; }
+ virtual const SvString & GetHelpText() const { return aHelpText; }
+ virtual const SvString & GetConfigName() const{ return aConfigName; }
+ virtual const SvString& GetDescription() const{ return aDescription; }
+
+#ifdef IDL_COMPILER
+ virtual BOOL Test( SvIdlDataBase &, SvTokenStream & rInStm );
+ virtual BOOL ReadSvIdl( SvIdlDataBase &, SvTokenStream & rInStm );
+ virtual void WriteSvIdl( SvIdlDataBase & rBase, SvStream & rOutStm, USHORT nTab );
+ virtual void Write( SvIdlDataBase & rBase, SvStream & rOutStm, USHORT nTab,
+ WriteType, WriteAttribute = 0);
+ void WriteDescription( SvStream& rOutStm );
+#endif
+};
+SV_DECL_IMPL_REF(SvMetaName)
+SV_DECL_IMPL_PERSIST_LIST(SvMetaName,SvMetaName *)
+
+
+/******************** class SvMetaReference *****************************/
+SV_DECL_REF(SvMetaReference)
+class SvMetaReference : public SvMetaName
+{
+protected:
+ SvMetaReferenceRef aRef;
+public:
+ SV_DECL_META_FACTORY1( SvMetaReference, SvMetaName, 17 )
+ SvMetaReference();
+
+ const SvString & GetName() const
+ {
+ return ( !aRef.Is()
+ || SvMetaName::GetName().Len() )
+ ? SvMetaName::GetName()
+ : aRef->GetName();
+ }
+
+ const SvString & GetHelpText() const
+ {
+ return ( !aRef.Is()
+ || SvMetaName::GetHelpText().Len() )
+ ? SvMetaName::GetHelpText()
+ : aRef->GetHelpText();
+ }
+
+ const SvString & GetConfigName() const
+ {
+ return ( !aRef.Is()
+ || SvMetaName::GetConfigName().Len() )
+ ? SvMetaName::GetConfigName()
+ : aRef->GetConfigName();
+ }
+
+ const SvString & GetDescription() const
+ {
+ return ( !aRef.Is()
+ || SvMetaName::GetDescription().Len() )
+ ? SvMetaName::GetDescription()
+ : aRef->GetDescription();
+ }
+ SvMetaReference * GetRef() const { return aRef; }
+ void SetRef( SvMetaReference * pRef )
+ { aRef = pRef; }
+};
+SV_IMPL_REF(SvMetaReference)
+SV_DECL_IMPL_PERSIST_LIST(SvMetaReference,SvMetaReference *)
+
+
+/******************** class SvMetaExtern *********************************/
+class SvMetaModule;
+class SvMetaExtern : public SvMetaReference
+{
+ SvMetaModule * pModule; // in welchem Modul enthalten
+
+ SvUUId aUUId;
+ SvVersion aVersion;
+ BOOL bReadUUId;
+ BOOL bReadVersion;
+public:
+ SV_DECL_META_FACTORY1( SvMetaExtern, SvMetaName, 16 )
+ SvMetaExtern();
+
+ SvMetaModule * GetModule() const;
+
+ const SvGlobalName &GetUUId() const;
+ const SvVersion & GetVersion() const { return aVersion; }
+#ifdef IDL_COMPILER
+ void SetModule( SvIdlDataBase & rBase );
+ virtual BOOL ReadSvIdl( SvIdlDataBase &, SvTokenStream & rInStm );
+ virtual void WriteSvIdl( SvIdlDataBase & rBase, SvStream & rOutStm, USHORT nTab );
+
+ virtual void Write( SvIdlDataBase & rBase, SvStream & rOutStm, USHORT nTab,
+ WriteType, WriteAttribute = 0);
+protected:
+ virtual void ReadAttributesSvIdl( SvIdlDataBase &, SvTokenStream & rInStm );
+ virtual void WriteAttributesSvIdl( SvIdlDataBase & rBase,
+ SvStream & rOutStm, USHORT nTab );
+ virtual void WriteAttributes( SvIdlDataBase & rBase, SvStream & rOutStm, USHORT nTab,
+ WriteType, WriteAttribute = 0);
+#endif
+};
+SV_DECL_IMPL_REF(SvMetaExtern)
+SV_DECL_IMPL_PERSIST_LIST(SvMetaExtern,SvMetaExtern *)
+
+
+#endif // _BASOBJ_HXX
+
+
diff --git a/idl/inc/bastype.hxx b/idl/inc/bastype.hxx
new file mode 100644
index 000000000000..99d14ac93432
--- /dev/null
+++ b/idl/inc/bastype.hxx
@@ -0,0 +1,290 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org 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 version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+#ifndef _BASTYPE_HXX
+#define _BASTYPE_HXX
+
+
+#include <tools/globname.hxx>
+#include <tools/gen.hxx>
+#include <tools/stream.hxx>
+#include <tools/unqid.hxx>
+#include <tools/string.hxx>
+
+class SvStringHashEntry;
+class SvIdlDataBase;
+class SvTokenStream;
+
+/******************** class SvUINT32 **********************************/
+class SvUINT32
+{
+ UINT32 nVal;
+public:
+ SvUINT32() { nVal = 0; }
+ SvUINT32( UINT32 n ) : nVal( n ) {}
+ SvUINT32 & operator = ( UINT32 n ) { nVal = n; return *this; }
+
+ operator UINT32 &() { return nVal; }
+
+ static UINT32 Read( SvStream & rStm );
+ static void Write( SvStream & rStm, UINT32 nVal );
+
+ friend SvStream& operator << (SvStream & rStm, const SvUINT32 & r )
+ { SvUINT32::Write( rStm, r.nVal ); return rStm; }
+ friend SvStream& operator >> (SvStream & rStm, SvUINT32 & r )
+ { r.nVal = SvUINT32::Read( rStm ); return rStm; }
+};
+
+
+/******************** class SvINT16 **********************************/
+class SvINT16
+{
+ short nVal;
+public:
+ SvINT16() { nVal = 0; }
+ SvINT16( short n ) : nVal( n ) {}
+ SvINT16 & operator = ( short n ) { nVal = n; return *this; }
+
+ operator short &() { return nVal; }
+
+ friend SvStream& operator << (SvStream & rStm, const SvINT16 & r )
+ { SvUINT32::Write( rStm, (UINT32)r.nVal ); return rStm; }
+ friend SvStream& operator >> (SvStream & rStm, SvINT16 & r )
+ { r.nVal = (short)SvUINT32::Read( rStm ); return rStm; }
+};
+
+
+/******************** class SvUINT16 **********************************/
+class SvUINT16
+{
+ USHORT nVal;
+public:
+ SvUINT16() { nVal = 0; }
+ SvUINT16( USHORT n ) : nVal( n ) {}
+ SvUINT16 & operator = ( USHORT n ) { nVal = n; return *this; }
+
+ operator UINT16 &() { return nVal; }
+
+ friend SvStream& operator << (SvStream & rStm, const SvUINT16 & r )
+ { SvUINT32::Write( rStm, (UINT32)r.nVal ); return rStm; }
+ friend SvStream& operator >> (SvStream & rStm, SvUINT16 & r )
+ { r.nVal = (USHORT)SvUINT32::Read( rStm ); return rStm; }
+};
+
+
+/******************** class SvINT32 **********************************/
+class SvINT32
+{
+ INT32 nVal;
+public:
+ SvINT32() { nVal = 0; }
+ SvINT32( INT32 n ) : nVal( n ) {}
+ SvINT32 & operator = ( INT32 n ) { nVal = n; return *this; }
+
+ operator INT32 &() { return nVal; }
+
+ friend SvStream& operator << (SvStream & rStm, const SvINT32 & r )
+ { SvUINT32::Write( rStm, (UINT32)r.nVal ); return rStm; }
+ friend SvStream& operator >> (SvStream & rStm, SvINT32 & r )
+ { r.nVal = (INT32)SvUINT32::Read( rStm ); return rStm; }
+};
+
+
+/******************** class Svint **********************************/
+class Svint
+{
+ int nVal;
+ BOOL bSet;
+public:
+ Svint() { nVal = bSet = 0; }
+ Svint( int n ) : nVal( n ), bSet( TRUE ) {}
+ Svint( int n, BOOL bSetP ) : nVal( n ), bSet( bSetP ) {}
+ Svint & operator = ( int n ) { nVal = n; bSet = TRUE; return *this; }
+
+ operator int ()const { return nVal; }
+ BOOL IsSet() const { return bSet; }
+
+ friend SvStream& operator << (SvStream & rStm, const Svint & r )
+ { SvUINT32::Write( rStm, (UINT32)r.nVal ); rStm << r.bSet; return rStm; }
+ friend SvStream& operator >> (SvStream & rStm, Svint & r )
+ { r.nVal = (int)SvUINT32::Read( rStm ); rStm >> r.bSet ; return rStm; }
+};
+
+
+/******************** class SvBOOL **********************************/
+class SvBOOL
+{
+ BOOL nVal:1,
+ bSet:1;
+public:
+ SvBOOL() { bSet = nVal = FALSE; }
+ SvBOOL( BOOL n ) : nVal( n ), bSet( TRUE ) {}
+ SvBOOL( BOOL n, BOOL bSetP ) : nVal( n ), bSet( bSetP ) {}
+ SvBOOL & operator = ( BOOL n ) { nVal = n; bSet = TRUE; return *this; }
+
+ operator BOOL() const { return nVal; }
+#ifdef STC
+ operator int() const { return nVal; }
+#endif
+ BOOL Is() const { return nVal; }
+ BOOL IsSet() const { return bSet; }
+
+ friend SvStream& operator << (SvStream &, const SvBOOL &);
+ friend SvStream& operator >> (SvStream &, SvBOOL &);
+
+#ifdef IDL_COMPILER
+ BOOL ReadSvIdl( SvStringHashEntry * pName, SvTokenStream & rInStm );
+ BOOL WriteSvIdl( SvStringHashEntry * pName, SvStream & rOutStm );
+ ByteString GetSvIdlString( SvStringHashEntry * pName );
+#endif
+};
+
+
+/******************** class SvIdentifier **********************************/
+class SvIdentifier : public ByteString
+{
+public:
+ SvIdentifier(){};
+ SvIdentifier & operator = ( const ByteString & rStr )
+ { ByteString::operator =( rStr ); return *this; }
+ friend SvStream& operator << (SvStream &, const SvIdentifier &);
+ friend SvStream& operator >> (SvStream &, SvIdentifier &);
+
+ BOOL IsSet() const { return Len() != 0; }
+#ifdef IDL_COMPILER
+ BOOL ReadSvIdl( SvStringHashEntry * pName, SvTokenStream & rInStm );
+ BOOL WriteSvIdl( SvStringHashEntry * pName, SvStream & rOutStm,
+ USHORT nTab );
+#endif
+};
+
+
+/******************** class SvIdentifier **********************************/
+class SvNumberIdentifier : public SvIdentifier
+{
+ UINT32 nValue;
+ // darf nicht benutzt werden
+ BOOL ReadSvIdl( SvStringHashEntry * pName, SvTokenStream & rInStm );
+public:
+ SvNumberIdentifier() : nValue( 0 ) {};
+ BOOL IsSet() const
+ {
+ return SvIdentifier::IsSet() || nValue != 0;
+ }
+ UINT32 GetValue() const { return nValue; }
+ void SetValue( UINT32 nVal ) { nValue = nVal; }
+
+ friend SvStream& operator << (SvStream &, const SvNumberIdentifier &);
+ friend SvStream& operator >> (SvStream &, SvNumberIdentifier &);
+#ifdef IDL_COMPILER
+ BOOL ReadSvIdl( SvIdlDataBase &, SvTokenStream & rInStm );
+ BOOL ReadSvIdl( SvIdlDataBase &, SvStringHashEntry * pName,
+ SvTokenStream & rInStm );
+#endif
+};
+
+
+/******************** class SvString **********************************/
+class SvString : public ByteString
+{
+public:
+ SvString(){};
+ SvString & operator = ( const ByteString & rStr )
+ { ByteString::operator =( rStr ); return *this; }
+ BOOL IsSet() const { return Len() != 0; }
+ friend SvStream& operator << (SvStream &, const SvString &);
+ friend SvStream& operator >> (SvStream &, SvString &);
+
+#ifdef IDL_COMPILER
+ BOOL ReadSvIdl( SvStringHashEntry * pName, SvTokenStream & rInStm );
+ BOOL WriteSvIdl( SvStringHashEntry * pName, SvStream & rOutStm,
+ USHORT nTab );
+#endif
+};
+
+
+/******************** class SvHelpText **********************************/
+class SvHelpText : public SvString
+{
+public:
+ SvHelpText() {}
+#ifdef IDL_COMPILER
+ BOOL ReadSvIdl( SvIdlDataBase &, SvTokenStream & rInStm );
+ BOOL WriteSvIdl( SvIdlDataBase & rBase, SvStream & rOutStm,
+ USHORT nTab );
+#endif
+};
+
+
+/******************** class SvHelpContext *******************************/
+class SvHelpContext : public SvNumberIdentifier
+{
+};
+
+/******************** class SvUUId *************************************/
+class SvUUId : public SvGlobalName
+{
+public:
+ SvUUId() {}
+#ifdef IDL_COMPILER
+ BOOL ReadSvIdl( SvIdlDataBase &, SvTokenStream & rInStm );
+ BOOL WriteSvIdl( SvStream & rOutStm );
+#endif
+};
+
+
+/******************** class SvVersion **********************************/
+class SvVersion
+{
+ USHORT nMajorVersion;
+ USHORT nMinorVersion;
+public:
+ SvVersion() : nMajorVersion( 1 ), nMinorVersion( 0 ) {}
+ BOOL operator == ( const SvVersion & r )
+ {
+ return (r.nMajorVersion == nMajorVersion)
+ && (r.nMinorVersion == nMinorVersion);
+ }
+ BOOL operator != ( const SvVersion & r )
+ {
+ return !(*this == r);
+ }
+
+ USHORT GetMajorVersion() const { return nMajorVersion; }
+ USHORT GetMinorVersion() const { return nMinorVersion; }
+
+ friend SvStream& operator << (SvStream &, const SvVersion &);
+ friend SvStream& operator >> (SvStream &, SvVersion &);
+#ifdef IDL_COMPILER
+ BOOL ReadSvIdl( SvTokenStream & rInStm );
+ BOOL WriteSvIdl( SvStream & rOutStm );
+#endif
+};
+
+
+#endif // _BASTYPE_HXX
+
diff --git a/idl/inc/char.hxx b/idl/inc/char.hxx
new file mode 100644
index 000000000000..fc8045f0ba54
--- /dev/null
+++ b/idl/inc/char.hxx
@@ -0,0 +1,41 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org 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 version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+#ifndef _CHAR_HXX
+#define _CHAR_HXX
+
+#include <tools/string.hxx>
+
+/******************* T y p e s *******************************************/
+class SvChar
+{
+public:
+ static char * GetTable( CharSet nSource, CharSet nDest );
+};
+
+
+#endif // _CHAR_HXX
diff --git a/idl/inc/command.hxx b/idl/inc/command.hxx
new file mode 100644
index 000000000000..53512f4854d8
--- /dev/null
+++ b/idl/inc/command.hxx
@@ -0,0 +1,78 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org 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 version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+#ifndef _COMMAND_HXX
+#define _COMMAND_HXX
+
+
+#include <tools/list.hxx>
+#include <tools/string.hxx>
+
+#ifndef STRING_LIST
+#define STRING_LIST
+DECLARE_LIST( StringList, String * )
+#endif
+
+DECLARE_LIST( ByteStringList, ByteString* )
+
+/******************** class SvCommand ************************************/
+class SvCommand
+{
+public:
+ String aDataBaseFile;
+ StringList aInFileList;
+ String aListFile;
+ String aSlotMapFile;
+ String aSfxItemFile;
+ String aODLFile;
+ String aCallingFile;
+ String aCxxFile;
+ String aHxxFile;
+ String aSrcFile;
+ String aPath;
+ String aCHeaderFile;
+ String aCSourceFile;
+ String aTargetFile;
+ ByteString aSrsLine;
+ String aHelpIdFile;
+ String aCSVFile;
+ String aExportFile;
+ String aDocuFile;
+ UINT32 nVerbosity;
+ UINT32 nFlags;
+
+ SvCommand( int argc, char ** argv );
+ ~SvCommand();
+};
+
+void Init();
+class SvIdlWorkingBase;
+BOOL ReadIdl( SvIdlWorkingBase * pDataBase, const SvCommand & rCommand );
+void DeInit();
+
+#endif // _COMMAND_HXX
+
diff --git a/idl/inc/database.hxx b/idl/inc/database.hxx
new file mode 100644
index 000000000000..0f207b64aef8
--- /dev/null
+++ b/idl/inc/database.hxx
@@ -0,0 +1,182 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org 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 version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+#ifndef _DATABASE_HXX
+#define _DATABASE_HXX
+
+#include <module.hxx>
+#include <hash.hxx>
+#include <lex.hxx>
+#include <tools/pstm.hxx>
+
+/*************************************************************************
+*************************************************************************/
+
+class SvCommand;
+
+#ifdef IDL_COMPILER
+/******************** class SvIdlError ***********************************/
+class SvIdlError
+{
+ ByteString aText;
+public:
+ UINT32 nLine, nColumn;
+
+ SvIdlError() : nLine(0), nColumn(0) {}
+ SvIdlError( UINT32 nL, UINT32 nC )
+ : nLine(nL), nColumn(nC) {}
+
+ const ByteString & GetText() const { return aText; }
+ void SetText( const ByteString & rT ) { aText = rT; }
+ BOOL IsError() const { return nLine != 0; }
+ void Clear() { nLine = nColumn = 0; }
+ SvIdlError & operator = ( const SvIdlError & rRef )
+ { aText = rRef.aText;
+ nLine = rRef.nLine;
+ nColumn = rRef.nColumn;
+ return *this;
+ }
+};
+#endif
+
+/******************** class SvIdlDataBase ********************************/
+class SvIdlDataBase
+{
+ BOOL bExport;
+ String aExportFile;
+ sal_uInt32 nUniqueId;
+ sal_uInt32 nVerbosity;
+ String aDataBaseFile;
+ SvFileStream * pStm;
+ BOOL bIsModified;
+ SvPersistStream aPersStream;
+ StringList aIdFileList;
+ SvStringHashTable * pIdTable;
+
+ SvMetaTypeMemberList aTypeList;
+ SvMetaClassMemberList aClassList;
+ SvMetaModuleMemberList aModuleList;
+ SvMetaAttributeMemberList aAttrList;
+ SvMetaTypeMemberList aTmpTypeList; // nicht Persistent
+
+protected:
+#ifdef IDL_COMPILER
+ ByteString aModulePrefix;
+ SvMetaObjectMemberStack aContextStack;
+ String aPath;
+ SvIdlError aError;
+ void WriteReset()
+ {
+ aUsedTypes.Clear();
+ aIFaceName.Erase();
+ }
+#endif
+public:
+ explicit SvIdlDataBase( const SvCommand& rCmd );
+ ~SvIdlDataBase();
+ static BOOL IsBinaryFormat( SvStream & rInStm );
+
+ void Load( SvStream & rInStm );
+ void Save( SvStream & rInStm, UINT32 nContextFlags );
+
+ SvMetaAttributeMemberList& GetAttrList() { return aAttrList; }
+ SvStringHashTable * GetIdTable() { return pIdTable; }
+ SvMetaTypeMemberList & GetTypeList();
+ SvMetaClassMemberList & GetClassList() { return aClassList; }
+ SvMetaModuleMemberList & GetModuleList() { return aModuleList; }
+ SvMetaModule * GetModule( const ByteString & rName );
+
+ // Liste der benutzten Typen beim Schreiben
+ SvMetaTypeMemberList aUsedTypes;
+ ByteString aIFaceName;
+ SvNumberIdentifier aStructSlotId;
+
+#ifdef IDL_COMPILER
+ void StartNewFile( const String& rName );
+ void SetExportFile( const String& rName )
+ { aExportFile = rName; }
+ void AppendAttr( SvMetaAttribute *pSlot );
+ const ByteString& GetActModulePrefix() const { return aModulePrefix; }
+ const SvIdlError & GetError() const { return aError; }
+ void SetError( const SvIdlError & r )
+ { aError = r; }
+
+ const String & GetPath() const { return aPath; }
+ SvMetaObjectMemberStack & GetStack() { return aContextStack; }
+
+ void Write( const ByteString & rText );
+ void WriteError( const ByteString & rErrWrn,
+ const ByteString & rFileName,
+ const ByteString & rErrorText,
+ ULONG nRow = 0, ULONG nColumn = 0 ) const;
+ void WriteError( SvTokenStream & rInStm );
+ void SetError( const ByteString & rError, SvToken * pTok );
+ void Push( SvMetaObject * pObj );
+ BOOL Pop( BOOL bOk, SvTokenStream & rInStm, UINT32 nTokPos )
+ {
+ GetStack().Pop();
+ if( bOk )
+ aError.Clear();
+ else
+ rInStm.Seek( nTokPos );
+ return bOk;
+ }
+ sal_uInt32 GetUniqueId() { return ++nUniqueId; }
+ BOOL FindId( const ByteString & rIdName, ULONG * pVal );
+ BOOL InsertId( const ByteString & rIdName, ULONG nVal );
+ BOOL ReadIdFile( const String & rFileName );
+
+ SvMetaType * FindType( const ByteString & rName );
+ static SvMetaType * FindType( const SvMetaType *, SvMetaTypeMemberList & );
+
+ SvMetaType * ReadKnownType( SvTokenStream & rInStm );
+ SvMetaAttribute * ReadKnownAttr( SvTokenStream & rInStm,
+ SvMetaType * pType = NULL );
+ SvMetaAttribute * SearchKnownAttr( const SvNumberIdentifier& );
+ SvMetaClass * ReadKnownClass( SvTokenStream & rInStm );
+#endif
+};
+
+#ifdef IDL_COMPILER
+class SvIdlWorkingBase : public SvIdlDataBase
+{
+public:
+ explicit SvIdlWorkingBase( const SvCommand& rCmd );
+
+ BOOL ReadSvIdl( SvTokenStream &, BOOL bImported, const String & rPath );
+ BOOL WriteSvIdl( SvStream & );
+
+ BOOL WriteSfx( SvStream & );
+ BOOL WriteHelpIds( SvStream & );
+ BOOL WriteSfxItem( SvStream & );
+ BOOL WriteCSV( SvStream& );
+ BOOL WriteDocumentation( SvStream& );
+};
+#endif
+
+#endif // _DATABASE_HXX
+
diff --git a/idl/inc/globals.hxx b/idl/inc/globals.hxx
new file mode 100644
index 000000000000..c3e841df05d6
--- /dev/null
+++ b/idl/inc/globals.hxx
@@ -0,0 +1,242 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org 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 version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+#ifndef _GLOBALS_HXX
+#define _GLOBALS_HXX
+
+#ifdef IDL_COMPILER
+#include <hash.hxx>
+
+#ifdef ICC
+#undef _Export
+#endif
+
+class SvIdlWorkingBase;
+class SvClassManager;
+struct SvGlobalHashNames
+{
+ SvStringHashEntryRef MM_Name;
+ SvStringHashEntryRef MM_module;
+ SvStringHashEntryRef MM_interface;
+ SvStringHashEntryRef MM_in;
+ SvStringHashEntryRef MM_out;
+ SvStringHashEntryRef MM_inout;
+ SvStringHashEntryRef MM_String;
+ SvStringHashEntryRef MM_UCHAR;
+ SvStringHashEntryRef MM_USHORT;
+ SvStringHashEntryRef MM_uuid;
+ SvStringHashEntryRef MM_HelpContext;
+ SvStringHashEntryRef MM_HelpText;
+ SvStringHashEntryRef MM_void;
+ SvStringHashEntryRef MM_shell;
+ SvStringHashEntryRef MM_Get;
+ SvStringHashEntryRef MM_Set;
+ SvStringHashEntryRef MM_SlotId;
+ SvStringHashEntryRef MM_HasCoreId;
+ SvStringHashEntryRef MM_Cachable;
+ SvStringHashEntryRef MM_Volatile;
+ SvStringHashEntryRef MM_Toggle;
+ SvStringHashEntryRef MM_AutoUpdate;
+ SvStringHashEntryRef MM_Synchron;
+ SvStringHashEntryRef MM_Asynchron;
+ SvStringHashEntryRef MM_RecordPerSet;
+ SvStringHashEntryRef MM_RecordPerItem;
+ SvStringHashEntryRef MM_RecordManual;
+ SvStringHashEntryRef MM_NoRecord;
+ SvStringHashEntryRef MM_RecordAbsolute;
+ SvStringHashEntryRef MM_enum;
+ SvStringHashEntryRef MM_UINT16;
+ SvStringHashEntryRef MM_INT16;
+ SvStringHashEntryRef MM_UINT32;
+ SvStringHashEntryRef MM_INT32;
+ SvStringHashEntryRef MM_int;
+ SvStringHashEntryRef MM_BOOL;
+ SvStringHashEntryRef MM_char;
+ SvStringHashEntryRef MM_BYTE;
+ SvStringHashEntryRef MM_float;
+ SvStringHashEntryRef MM_double;
+ SvStringHashEntryRef MM_item;
+ SvStringHashEntryRef MM_PseudoSlots;
+ SvStringHashEntryRef MM_map;
+ SvStringHashEntryRef MM_Default;
+ SvStringHashEntryRef MM_HelpFile;
+ SvStringHashEntryRef MM_Version;
+ SvStringHashEntryRef MM_import;
+ SvStringHashEntryRef MM_SlotIdFile;
+ SvStringHashEntryRef MM_SvName;
+ SvStringHashEntryRef MM_SbxName;
+ SvStringHashEntryRef MM_ItemName;
+ SvStringHashEntryRef MM_OdlName;
+ SvStringHashEntryRef MM_include;
+ SvStringHashEntryRef MM_ExecMethod;
+ SvStringHashEntryRef MM_StateMethod;
+ SvStringHashEntryRef MM_GroupId;
+ SvStringHashEntryRef MM_HasDialog;
+ SvStringHashEntryRef MM_TypeLibFile;
+ SvStringHashEntryRef MM_Export;
+ SvStringHashEntryRef MM_Automation;
+ SvStringHashEntryRef MM_PseudoPrefix;
+ SvStringHashEntryRef MM_define;
+ SvStringHashEntryRef MM_MenuConfig;
+ SvStringHashEntryRef MM_ToolBoxConfig;
+ SvStringHashEntryRef MM_StatusBarConfig;
+ SvStringHashEntryRef MM_AccelConfig;
+ SvStringHashEntryRef MM_AllConfig;
+ SvStringHashEntryRef MM_FastCall;
+ SvStringHashEntryRef MM_SbxObject;
+ SvStringHashEntryRef MM_Container;
+ SvStringHashEntryRef MM_ImageRotation;
+ SvStringHashEntryRef MM_ImageReflection;
+ SvStringHashEntryRef MM_IsCollection;
+ SvStringHashEntryRef MM_ReadOnlyDoc;
+ SvStringHashEntryRef MM_ConfigName;
+ SvStringHashEntryRef MM_union;
+ SvStringHashEntryRef MM_struct;
+ SvStringHashEntryRef MM_typedef;
+ SvStringHashEntryRef MM_Readonly;
+ SvStringHashEntryRef MM_SlotType;
+ SvStringHashEntryRef MM_ModulePrefix;
+ SvStringHashEntryRef MM_DisableFlags;
+ SvStringHashEntryRef MM_Hidden;
+ SvStringHashEntryRef MM_Description;
+ SvStringHashEntryRef MM_UnoName;
+
+ SvGlobalHashNames();
+};
+
+class IdlDll
+{
+public:
+ SvStringHashTable * pHashTable;
+ SvClassManager * pClassMgr;
+ SvGlobalHashNames * pGlobalNames;
+
+ IdlDll();
+ ~IdlDll();
+};
+
+IdlDll * GetIdlApp();
+#define IDLAPP GetIdlApp()
+
+#define SV_GLOBAL_HASH_ACCESS( Name ) \
+ if( !IDLAPP->pGlobalNames ) \
+ IDLAPP->pGlobalNames = new SvGlobalHashNames(); \
+ return IDLAPP->pGlobalNames->MM_##Name;
+
+#define HASH_INLINE( Name ) \
+inline SvStringHashEntry * SvHash_##Name() { SV_GLOBAL_HASH_ACCESS( Name ) }
+
+HASH_INLINE(Name)
+HASH_INLINE(module)
+HASH_INLINE(interface)
+HASH_INLINE(in)
+HASH_INLINE(out)
+HASH_INLINE(inout)
+HASH_INLINE(String)
+HASH_INLINE(UCHAR)
+HASH_INLINE(USHORT)
+HASH_INLINE(uuid)
+HASH_INLINE(HelpContext)
+HASH_INLINE(HelpText)
+HASH_INLINE(void)
+HASH_INLINE(shell)
+HASH_INLINE(Get)
+HASH_INLINE(Set)
+HASH_INLINE(SlotId)
+HASH_INLINE(HasCoreId)
+HASH_INLINE(Cachable)
+HASH_INLINE(Volatile)
+HASH_INLINE(Toggle)
+HASH_INLINE(AutoUpdate)
+HASH_INLINE(Synchron)
+HASH_INLINE(Asynchron)
+HASH_INLINE(RecordPerItem)
+HASH_INLINE(RecordPerSet)
+HASH_INLINE(RecordManual)
+HASH_INLINE(NoRecord)
+HASH_INLINE(RecordAbsolute)
+HASH_INLINE(enum)
+HASH_INLINE(UINT16)
+HASH_INLINE(INT16)
+HASH_INLINE(UINT32)
+HASH_INLINE(INT32)
+HASH_INLINE(int)
+HASH_INLINE(BOOL)
+HASH_INLINE(char)
+HASH_INLINE(BYTE)
+HASH_INLINE(item)
+HASH_INLINE(PseudoSlots)
+HASH_INLINE(map)
+HASH_INLINE(Default)
+HASH_INLINE(HelpFile)
+HASH_INLINE(Version)
+HASH_INLINE(import)
+HASH_INLINE(SlotIdFile)
+HASH_INLINE(SvName)
+HASH_INLINE(SbxName)
+HASH_INLINE(ItemName)
+HASH_INLINE(OdlName)
+HASH_INLINE(include)
+HASH_INLINE(ExecMethod)
+HASH_INLINE(StateMethod)
+HASH_INLINE(GroupId)
+HASH_INLINE(float)
+HASH_INLINE(double)
+HASH_INLINE(HasDialog)
+HASH_INLINE(TypeLibFile)
+HASH_INLINE(Export)
+HASH_INLINE(Automation)
+HASH_INLINE(PseudoPrefix)
+HASH_INLINE(define)
+HASH_INLINE(MenuConfig)
+HASH_INLINE(ToolBoxConfig)
+HASH_INLINE(StatusBarConfig)
+HASH_INLINE(AccelConfig)
+HASH_INLINE(AllConfig)
+HASH_INLINE(FastCall)
+HASH_INLINE(SbxObject)
+HASH_INLINE(Container)
+HASH_INLINE(ImageRotation)
+HASH_INLINE(ImageReflection)
+HASH_INLINE(IsCollection)
+HASH_INLINE(ReadOnlyDoc)
+HASH_INLINE(ConfigName)
+HASH_INLINE(union)
+HASH_INLINE(struct)
+HASH_INLINE(typedef)
+HASH_INLINE(Readonly)
+HASH_INLINE(SlotType)
+HASH_INLINE(ModulePrefix)
+HASH_INLINE(DisableFlags)
+HASH_INLINE(Hidden)
+HASH_INLINE(Description)
+HASH_INLINE(UnoName)
+
+
+#endif // IDL_COMPILER
+#endif // _GLOBALS_HXX
+
diff --git a/idl/inc/hash.hxx b/idl/inc/hash.hxx
new file mode 100644
index 000000000000..2749181d5966
--- /dev/null
+++ b/idl/inc/hash.hxx
@@ -0,0 +1,125 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org 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 version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+#ifndef _HASH_HXX
+#define _HASH_HXX
+
+
+
+#include <tools/ref.hxx>
+#include <tools/string.hxx>
+
+/****************** H a s h - T a b l e **********************************/
+class SvHashTable
+{
+ UINT32 nMax; // size of hash-tabel
+ UINT32 nFill; // elements in hash-tabel
+ UINT32 lAsk; // Anzahl der Anfragen
+ UINT32 lTry; // Anzahl der Versuche
+protected:
+ BOOL Test_Insert( const void *, BOOL bInsert, UINT32 * pInsertPos );
+
+ // compare element with entry
+ virtual StringCompare Compare( const void * , UINT32 ) const = 0;
+ // get hash value from subclass
+ virtual UINT32 HashFunc( const void * ) const = 0;
+public:
+ SvHashTable( UINT32 nMaxEntries );
+ virtual ~SvHashTable();
+
+ UINT32 GetMax() const { return nMax; }
+
+ virtual BOOL IsEntry( UINT32 ) const = 0;
+};
+
+/************** S t r i n g H a s h T a b l e E n t r y ******************/
+class SvStringHashTable;
+class SvStringHashEntry : public SvRefBase
+{
+friend class SvStringHashTable;
+ ByteString aName;
+ UINT32 nHashId;
+ ULONG nValue;
+ BOOL bHasId;
+public:
+ SvStringHashEntry() : bHasId( FALSE ) {;}
+ SvStringHashEntry( const ByteString & rName, UINT32 nIdx )
+ : aName( rName )
+ , nHashId( nIdx )
+ , nValue( 0 )
+ , bHasId( TRUE ) {}
+ ~SvStringHashEntry();
+
+ const ByteString & GetName() const { return aName; }
+ BOOL HasId() const { return bHasId; }
+ UINT32 GetId() const { return nHashId; }
+
+ void SetValue( ULONG n ) { nValue = n; }
+ ULONG GetValue() const { return nValue; }
+
+ BOOL operator == ( const SvStringHashEntry & rRef )
+ { return nHashId == rRef.nHashId; }
+ BOOL operator != ( const SvStringHashEntry & rRef )
+ { return ! operator == ( rRef ); }
+ SvStringHashEntry & operator = ( const SvStringHashEntry & rRef )
+ { SvRefBase::operator=( rRef );
+ aName = rRef.aName;
+ nHashId = rRef.nHashId;
+ nValue = rRef.nValue;
+ bHasId = rRef.bHasId;
+ return *this;
+ }
+};
+
+SV_DECL_IMPL_REF(SvStringHashEntry)
+
+/****************** S t r i n g H a s h T a b l e ************************/
+DECLARE_LIST(SvStringHashList,SvStringHashEntry *)
+
+class SvStringHashTable : public SvHashTable
+{
+ SvStringHashEntry * pEntries;
+protected:
+ virtual UINT32 HashFunc( const void * pElement ) const;
+ virtual StringCompare Compare( const void * pElement, UINT32 nIndex ) const;
+public:
+ SvStringHashTable( UINT32 nMaxEntries ); // max size of hash-tabel
+ virtual ~SvStringHashTable();
+
+ ByteString GetNearString( const ByteString & rName ) const;
+ virtual BOOL IsEntry( UINT32 nIndex ) const;
+
+ BOOL Insert( const ByteString & rStr, UINT32 * pHash ); // insert string
+ BOOL Test( const ByteString & rStr, UINT32 * pHash ) const; // test of insert string
+ SvStringHashEntry * Get ( UINT32 nIndex ) const; // return pointer to string
+ SvStringHashEntry & operator []( UINT32 nPos ) const
+ { return pEntries[ nPos ]; }
+
+ void FillHashList( SvStringHashList * rList ) const;
+};
+
+#endif // _RSCHASH_HXX
diff --git a/idl/inc/lex.hxx b/idl/inc/lex.hxx
new file mode 100644
index 000000000000..b42a7ce4b0f2
--- /dev/null
+++ b/idl/inc/lex.hxx
@@ -0,0 +1,271 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org 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 version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+#ifndef _LEX_HXX
+#define _LEX_HXX
+
+#include <hash.hxx>
+#include <tools/gen.hxx>
+#include <tools/stream.hxx>
+
+/******************** enum ***********************************************/
+enum SVTOKEN_ENUM { SVTOKEN_EMPTY, SVTOKEN_COMMENT,
+ SVTOKEN_INTEGER, SVTOKEN_STRING,
+ SVTOKEN_BOOL, SVTOKEN_IDENTIFIER,
+ SVTOKEN_CHAR, SVTOKEN_RTTIBASE,
+ SVTOKEN_EOF, SVTOKEN_HASHID };
+
+/******************** class SvToken **************************************/
+class BigInt;
+class SvToken
+{
+friend class SvTokenStream;
+ ULONG nLine, nColumn;
+ SVTOKEN_ENUM nType;
+ ByteString aString;
+ union
+ {
+ ULONG nLong;
+ BOOL bBool;
+ char cChar;
+// SvRttiBase * pComplexObj;
+ SvStringHashEntry * pHash;
+ };
+public:
+ SvToken();
+ SvToken( const SvToken & rObj );
+ SvToken( ULONG n );
+ SvToken( SVTOKEN_ENUM nTypeP, BOOL b );
+ SvToken( char c );
+ SvToken( SVTOKEN_ENUM nTypeP, const ByteString & rStr );
+// SvToken( SvRttiBase * pComplexObj );
+ SvToken( SVTOKEN_ENUM nTypeP );
+
+ SvToken & operator = ( const SvToken & rObj );
+
+ ByteString GetTokenAsString() const;
+ SVTOKEN_ENUM GetType() const { return nType; }
+
+ void SetLine( ULONG nLineP ) { nLine = nLineP; }
+ ULONG GetLine() const { return nLine; }
+
+ void SetColumn( ULONG nColumnP ) { nColumn = nColumnP; }
+ ULONG GetColumn() const { return nColumn; }
+
+ BOOL IsEmpty() const { return nType == SVTOKEN_EMPTY; }
+ BOOL IsComment() const { return nType == SVTOKEN_COMMENT; }
+ BOOL IsInteger() const { return nType == SVTOKEN_INTEGER; }
+ BOOL IsString() const { return nType == SVTOKEN_STRING; }
+ BOOL IsBool() const { return nType == SVTOKEN_BOOL; }
+ BOOL IsIdentifierHash() const
+ { return nType == SVTOKEN_HASHID; }
+ BOOL IsIdentifier() const
+ {
+ return nType == SVTOKEN_IDENTIFIER
+ || nType == SVTOKEN_HASHID;
+ }
+ BOOL IsChar() const { return nType == SVTOKEN_CHAR; }
+ BOOL IsRttiBase() const { return nType == SVTOKEN_RTTIBASE; }
+ BOOL IsEof() const { return nType == SVTOKEN_EOF; }
+
+ const ByteString & GetString() const
+ {
+ return IsIdentifierHash()
+ ? pHash->GetName()
+ : aString;
+ }
+ ULONG GetNumber() const { return nLong; }
+ BOOL GetBool() const { return bBool; }
+ char GetChar() const { return cChar; }
+// SvRttiBase *GetObject() const { return pComplexObj; }
+
+ void SetHash( SvStringHashEntry * pHashP )
+ { pHash = pHashP; nType = SVTOKEN_HASHID; }
+ BOOL HasHash() const
+ { return nType == SVTOKEN_HASHID; }
+ SvStringHashEntry * GetHash() const { return pHash; }
+ BOOL Is( SvStringHashEntry * pEntry ) const
+ { return IsIdentifierHash() && pHash == pEntry; }
+};
+
+inline SvToken::SvToken()
+ : nType( SVTOKEN_EMPTY ) {}
+
+inline SvToken::SvToken( ULONG n )
+ : nType( SVTOKEN_INTEGER ), nLong( n ) {}
+
+inline SvToken::SvToken( SVTOKEN_ENUM nTypeP, BOOL b )
+ : nType( nTypeP ), bBool( b ) {}
+
+inline SvToken::SvToken( char c )
+ : nType( SVTOKEN_CHAR ), cChar( c ) {}
+
+inline SvToken::SvToken( SVTOKEN_ENUM nTypeP, const ByteString & rStr )
+ : nType( nTypeP ), aString( rStr ) {}
+
+/*
+inline SvToken::SvToken( SvRttiBase * pObj )
+ : nType( SVTOKEN_RTTIBASE ), pComplexObj( pObj )
+ { pObj->AddRef(); }
+*/
+
+inline SvToken::SvToken( SVTOKEN_ENUM nTypeP )
+: nType( nTypeP ) {}
+
+DECLARE_LIST( SvTokenList, SvToken * )
+
+/******************** class SvTokenStream ********************************/
+class SvTokenStream
+{
+ ULONG nLine, nColumn;
+ int nBufPos;
+ int c; // naechstes Zeichen
+ CharSet nCharSet;
+ char * pCharTab; // Zeiger auf die Konverierungstabelle
+ USHORT nTabSize; // Tabulator Laenge
+ ByteString aStrTrue;
+ ByteString aStrFalse;
+ ULONG nMaxPos;
+
+ SvFileStream * pInStream;
+ SvStream & rInStream;
+ String aFileName;
+ SvTokenList aTokList;
+ SvToken * pCurToken;
+
+ void InitCtor();
+
+ ByteString aBufStr;
+ int GetNextChar();
+ int GetFastNextChar()
+ {
+ return aBufStr.GetChar((USHORT)nBufPos++);
+ }
+
+ void FillTokenList();
+ ULONG GetNumber();
+ BOOL MakeToken( SvToken & );
+ BOOL IsEof() const { return rInStream.IsEof(); }
+ void SetMax()
+ {
+ ULONG n = Tell();
+ if( n > nMaxPos )
+ nMaxPos = n;
+ }
+ void CalcColumn()
+ {
+ // wenn Zeilenende berechnung sparen
+ if( 0 != c )
+ {
+ USHORT n = 0;
+ nColumn = 0;
+ while( n < nBufPos )
+ nColumn += aBufStr.GetChar(n++) == '\t' ? nTabSize : 1;
+ }
+ }
+public:
+ SvTokenStream( const String & rFileName );
+ SvTokenStream( SvStream & rInStream, const String & rFileName );
+ ~SvTokenStream();
+
+ const String & GetFileName() const { return aFileName; }
+ SvStream & GetStream() { return rInStream; }
+
+ void SetCharSet( CharSet nSet );
+ CharSet GetCharSet() const { return nCharSet; }
+
+ void SetTabSize( USHORT nTabSizeP )
+ { nTabSize = nTabSizeP; }
+ USHORT GetTabSize() const { return nTabSize; }
+
+ SvToken * GetToken_PrevAll()
+ {
+ SvToken * pRetToken = pCurToken;
+ if( NULL == (pCurToken = aTokList.Prev()) )
+ // Current Zeiger nie Null
+ pCurToken = pRetToken;
+
+ return pRetToken;
+ }
+ SvToken * GetToken_NextAll()
+ {
+ SvToken * pRetToken = pCurToken;
+ if( NULL == (pCurToken = aTokList.Next()) )
+ // Current Zeiger nie Null
+ pCurToken = pRetToken;
+ SetMax();
+ return pRetToken;
+ }
+ SvToken * GetToken_Next()
+ {
+ // Kommentare werden initial entfernt
+ return GetToken_NextAll();
+ }
+ SvToken * GetToken() const { return pCurToken; }
+ BOOL Read( char cChar )
+ {
+ if( pCurToken->IsChar()
+ && cChar == pCurToken->GetChar() )
+ {
+ GetToken_Next();
+ return TRUE;
+ }
+ else
+ return FALSE;
+ }
+ void ReadDelemiter()
+ {
+ if( pCurToken->IsChar()
+ && (';' == pCurToken->GetChar()
+ || ',' == pCurToken->GetChar()) )
+ {
+ GetToken_Next();
+ }
+ }
+
+ UINT32 Tell() const
+ { return aTokList.GetCurPos(); }
+ void Seek( UINT32 nPos )
+ {
+ pCurToken = aTokList.Seek( nPos );
+ SetMax();
+ }
+ void SeekRel( INT32 nRelPos )
+ {
+ pCurToken = aTokList.Seek( Tell() + nRelPos );
+ SetMax();
+ }
+ void SeekEnd()
+ {
+ pCurToken = aTokList.Seek( nMaxPos );
+ }
+};
+
+
+
+#endif // _LEX_HXX
+
diff --git a/idl/inc/makefile.mk b/idl/inc/makefile.mk
new file mode 100644
index 000000000000..66b944a14867
--- /dev/null
+++ b/idl/inc/makefile.mk
@@ -0,0 +1,47 @@
+#*************************************************************************
+#
+# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+#
+# Copyright 2000, 2010 Oracle and/or its affiliates.
+#
+# OpenOffice.org - a multi-platform office productivity suite
+#
+# This file is part of OpenOffice.org.
+#
+# OpenOffice.org is free software: you can redistribute it and/or modify
+# it under the terms of the GNU Lesser General Public License version 3
+# only, as published by the Free Software Foundation.
+#
+# OpenOffice.org 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 version 3 for more details
+# (a copy is included in the LICENSE file that accompanied this code).
+#
+# You should have received a copy of the GNU Lesser General Public License
+# version 3 along with OpenOffice.org. If not, see
+# <http://www.openoffice.org/license.html>
+# for a copy of the LGPLv3 License.
+#
+#*************************************************************************
+PRJ=..
+
+PRJNAME=idl
+TARGET=inc
+
+# --- Settings -----------------------------------------------------
+
+.INCLUDE : settings.mk
+
+# --- Files --------------------------------------------------------
+# --- Targets -------------------------------------------------------
+
+.INCLUDE : target.mk
+
+.IF "$(ENABLE_PCH)"!=""
+ALLTAR : \
+ $(SLO)$/precompiled.pch \
+ $(SLO)$/precompiled_ex.pch
+
+.ENDIF # "$(ENABLE_PCH)"!=""
+
diff --git a/idl/inc/module.hxx b/idl/inc/module.hxx
new file mode 100644
index 000000000000..d35ed24affc2
--- /dev/null
+++ b/idl/inc/module.hxx
@@ -0,0 +1,117 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org 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 version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+#ifndef _MODULE_HXX
+#define _MODULE_HXX
+
+#include <slot.hxx>
+#include <object.hxx>
+
+struct SvNamePos
+{
+ SvGlobalName aUUId;
+ UINT32 nStmPos;
+ SvNamePos( const SvGlobalName & rName, UINT32 nPos )
+ : aUUId( rName )
+ , nStmPos( nPos ) {}
+};
+DECLARE_LIST( SvNamePosList, SvNamePos *)
+
+/******************** class SvMetaModule *********************************/
+class SvMetaModule : public SvMetaExtern
+{
+ SvMetaClassMemberList aClassList;
+ SvMetaTypeMemberList aTypeList;
+ SvMetaAttributeMemberList aAttrList;
+// Browser
+ String aIdlFileName;
+ SvString aHelpFileName;
+ SvString aSlotIdFile;
+ SvString aTypeLibFile;
+ SvString aModulePrefix;
+
+#ifdef IDL_COMPILER
+ BOOL bImported : 1,
+ bIsModified : 1;
+ SvGlobalName aBeginName;
+ SvGlobalName aEndName;
+ SvGlobalName aNextName;
+protected:
+ virtual void ReadAttributesSvIdl( SvIdlDataBase &, SvTokenStream & rInStm );
+ virtual void WriteAttributesSvIdl( SvIdlDataBase & rBase, SvStream & rOutStm, USHORT nTab );
+ virtual void ReadContextSvIdl( SvIdlDataBase &, SvTokenStream & rInStm );
+ virtual void WriteContextSvIdl( SvIdlDataBase & rBase, SvStream & rOutStm, USHORT nTab );
+#endif
+public:
+ SV_DECL_META_FACTORY1( SvMetaModule, SvMetaExtern, 13 )
+ SvMetaModule();
+
+ const String & GetIdlFileName() const { return aIdlFileName; }
+ const ByteString & GetModulePrefix() const { return aModulePrefix; }
+
+ virtual BOOL SetName( const ByteString & rName, SvIdlDataBase * = NULL );
+
+ const ByteString & GetHelpFileName() const { return aHelpFileName; }
+ const ByteString & GetTypeLibFileName() const { return aTypeLibFile; }
+
+ const SvMetaAttributeMemberList & GetAttrList() const { return aAttrList; }
+ const SvMetaTypeMemberList & GetTypeList() const { return aTypeList; }
+ const SvMetaClassMemberList & GetClassList() const { return aClassList; }
+
+#ifdef IDL_COMPILER
+ SvMetaModule( const String & rIdlFileName,
+ BOOL bImported );
+
+ BOOL FillNextName( SvGlobalName * );
+ BOOL IsImported() const { return bImported; }
+ BOOL IsModified() const { return bIsModified; }
+
+ virtual BOOL ReadSvIdl( SvIdlDataBase &, SvTokenStream & rInStm );
+ virtual void WriteSvIdl( SvIdlDataBase & rBase, SvStream & rOutStm, USHORT nTab );
+
+ virtual void WriteAttributes( SvIdlDataBase & rBase,
+ SvStream & rOutStm, USHORT nTab,
+ WriteType, WriteAttribute = 0 );
+// virtual void WriteSbx( SvIdlDataBase & rBase, SvStream & rOutStm, SvNamePosList & rList );
+ virtual void Write( SvIdlDataBase & rBase, SvStream & rOutStm, USHORT nTab,
+ WriteType, WriteAttribute = 0 );
+ virtual void WriteSfx( SvIdlDataBase & rBase, SvStream & rOutStm );
+ virtual void WriteHelpIds( SvIdlDataBase & rBase, SvStream & rOutStm,
+ Table* pTable );
+ virtual void WriteSrc( SvIdlDataBase & rBase, SvStream & rOutStm,
+ Table *pIdTable );
+
+ virtual void WriteCxx( SvIdlDataBase & rBase, SvStream & rOutStm, USHORT nTab );
+ virtual void WriteHxx( SvIdlDataBase & rBase, SvStream & rOutStm, USHORT nTab );
+#endif
+};
+SV_DECL_IMPL_REF(SvMetaModule)
+SV_DECL_IMPL_PERSIST_LIST(SvMetaModule,SvMetaModule *)
+
+
+#endif // _MODULE_HXX
+
diff --git a/idl/inc/object.hxx b/idl/inc/object.hxx
new file mode 100644
index 000000000000..377c5bf0a959
--- /dev/null
+++ b/idl/inc/object.hxx
@@ -0,0 +1,170 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org 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 version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+#ifndef _OBJECT_HXX
+#define _OBJECT_HXX
+
+#define _SVSTDARR_ULONGS
+//#include <svtools/svstdarr.hxx>
+#include <types.hxx>
+#include <slot.hxx>
+
+struct SvSlotElement
+{
+ SvMetaSlotRef xSlot;
+ ByteString aPrefix;
+ SvSlotElement( SvMetaSlot * pS, const ByteString & rPrefix )
+ : xSlot( pS )
+ , aPrefix( rPrefix )
+ {}
+};
+DECLARE_LIST( SvSlotElementList, SvSlotElement* )
+class SvMetaClass;
+DECLARE_LIST( SvMetaClassList, SvMetaClass* )
+
+class SvULongs : public List
+{
+public:
+ void Insert( ULONG& rId, ULONG nPos ) { ULONG nId(rId ); List::Insert( (void*) nId, nPos ); }
+ void Remove( ULONG& rId ){ ULONG nId(rId ); List::Remove( (void*) nId ); }
+ ULONG GetObject( ULONG nPos ){ return (ULONG) List::GetObject( nPos ); }
+};
+
+/******************** class SvClassElement *******************************/
+SV_DECL_REF(SvMetaClass)
+class SvClassElement : public SvPersistBase
+{
+ SvBOOL aAutomation;
+ ByteString aPrefix;
+ SvMetaClassRef xClass;
+public:
+ SV_DECL_PERSIST1( SvClassElement, SvPersistBase, 1 )
+ SvClassElement();
+
+ void SetPrefix( const ByteString & rPrefix )
+ { aPrefix = rPrefix; }
+ const ByteString & GetPrefix() const
+ { return aPrefix; }
+
+ void SetAutomation( BOOL rAutomation )
+ { aAutomation = rAutomation; }
+ BOOL GetAutomation() const
+ { return aAutomation; }
+
+ void SetClass( SvMetaClass * pClass )
+ { xClass = pClass; }
+ SvMetaClass * GetClass() const
+ { return xClass; }
+};
+
+SV_DECL_IMPL_REF(SvClassElement)
+SV_DECL_IMPL_PERSIST_LIST(SvClassElement,SvClassElement *)
+
+/******************** class SvMetaClass *********************************/
+class SvMetaModule;
+SV_DECL_PERSIST_LIST(SvMetaClass,SvMetaClass *)
+class SvMetaClass : public SvMetaType
+{
+ SvMetaAttributeMemberList aAttrList;
+ SvClassElementMemberList aClassList;
+ SvMetaClassRef aSuperClass;
+ SvBOOL aAutomation;
+ SvMetaClassRef xAutomationInterface;
+
+// void FillSbxMemberObject( SvIdlDataBase & rBase,
+// SbxObject *, StringList &,
+// BOOL bVariable );
+ BOOL TestAttribute( SvIdlDataBase & rBase, SvTokenStream & rInStm,
+ SvMetaAttribute & rAttr ) const;
+#ifdef IDL_COMPILER
+ void WriteSlotStubs( const ByteString & rShellName,
+ SvSlotElementList & rSlotList,
+ ByteStringList & rList,
+ SvStream & rOutStm );
+ USHORT WriteSlotParamArray( SvIdlDataBase & rBase,
+ SvSlotElementList & rSlotList,
+ SvStream & rOutStm );
+ USHORT WriteSlots( const ByteString & rShellName, USHORT nCount,
+ SvSlotElementList & rSlotList,
+ SvIdlDataBase & rBase,
+ SvStream & rOutStm );
+
+ void InsertSlots( SvSlotElementList& rList, SvULongs& rSuperList,
+ SvMetaClassList & rClassList,
+ const ByteString & rPrefix, SvIdlDataBase& rBase );
+
+protected:
+ virtual void ReadAttributesSvIdl( SvIdlDataBase & rBase,
+ SvTokenStream & rInStm );
+ virtual void WriteAttributesSvIdl( SvIdlDataBase & rBase,
+ SvStream & rOutStm, USHORT nTab );
+ virtual void ReadContextSvIdl( SvIdlDataBase &,
+ SvTokenStream & rInStm );
+ virtual void WriteContextSvIdl( SvIdlDataBase & rBase,
+ SvStream & rOutStm, USHORT nTab );
+ void WriteOdlMembers( ByteStringList & rSuperList,
+ BOOL bVariable, BOOL bWriteTab,
+ SvIdlDataBase & rBase,
+ SvStream & rOutStm, USHORT nTab );
+#endif
+public:
+ SV_DECL_META_FACTORY1( SvMetaClass, SvMetaType, 6 )
+ SvMetaClass();
+
+ BOOL GetAutomation() const
+ { return aAutomation; }
+ SvMetaClass * GetSuperClass() const
+ { return aSuperClass; }
+
+ void FillClasses( SvMetaClassList & rList );
+// virtual void FillSbxObject( SvIdlDataBase & rBase, SbxObject * );
+
+ const SvClassElementMemberList&
+ GetClassList() const
+ { return aClassList; }
+
+#ifdef IDL_COMPILER
+ virtual BOOL ReadSvIdl( SvIdlDataBase &, SvTokenStream & rInStm );
+ virtual void WriteSvIdl( SvIdlDataBase & rBase, SvStream & rOutStm, USHORT nTab );
+ virtual void Write( SvIdlDataBase & rBase, SvStream & rOutStm,
+ USHORT nTab,
+ WriteType, WriteAttribute = 0 );
+ virtual void WriteSfx( SvIdlDataBase & rBase, SvStream & rOutStm );
+ virtual void WriteHelpIds( SvIdlDataBase & rBase, SvStream & rOutStm,
+ Table* pTable );
+ virtual void WriteSrc( SvIdlDataBase & rBase, SvStream & rOutStm,
+ Table * pTable );
+ virtual void WriteCxx( SvIdlDataBase & rBase, SvStream & rOutStm, USHORT nTab );
+ virtual void WriteHxx( SvIdlDataBase & rBase, SvStream & rOutStm, USHORT nTab );
+#endif
+};
+SV_IMPL_REF(SvMetaClass)
+SV_IMPL_PERSIST_LIST(SvMetaClass,SvMetaClass *)
+
+
+#endif // _OBJECT_HXX
+
diff --git a/idl/inc/pch/precompiled_idl.cxx b/idl/inc/pch/precompiled_idl.cxx
new file mode 100644
index 000000000000..7ab1f99c4750
--- /dev/null
+++ b/idl/inc/pch/precompiled_idl.cxx
@@ -0,0 +1,29 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org 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 version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+#include "precompiled_idl.hxx"
+
diff --git a/idl/inc/pch/precompiled_idl.hxx b/idl/inc/pch/precompiled_idl.hxx
new file mode 100644
index 000000000000..3f2ba013434e
--- /dev/null
+++ b/idl/inc/pch/precompiled_idl.hxx
@@ -0,0 +1,32 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org 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 version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+// MARKER(update_precomp.py): Generated on 2006-09-01 17:49:49.467600
+
+#ifdef PRECOMPILED_HEADERS
+#endif
+
diff --git a/idl/inc/slot.hxx b/idl/inc/slot.hxx
new file mode 100644
index 000000000000..e44df5bd5af6
--- /dev/null
+++ b/idl/inc/slot.hxx
@@ -0,0 +1,279 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org 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 version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+#ifndef _SLOT_HXX
+#define _SLOT_HXX
+
+#include <types.hxx>
+#include <command.hxx>
+
+/******************** class SvMetaSlot **********************************/
+//class SbxObject;
+class SvMetaSlotMemberList;
+class SvMetaSlot : public SvMetaAttribute
+{
+ SvMetaTypeRef aSlotType;
+ SvMetaAttributeRef aMethod;
+ SvIdentifier aGroupId;
+ SvBOOL aHasCoreId;
+ SvIdentifier aConfigId;
+ SvIdentifier aExecMethod;
+ SvIdentifier aStateMethod;
+ SvIdentifier aDefault;
+ SvBOOL aPseudoSlots;
+ SvBOOL aGet;
+ SvBOOL aSet;
+
+ SvBOOL aCachable; // exclusiv
+ SvBOOL aVolatile;
+ SvBOOL aToggle;
+ SvBOOL aAutoUpdate;
+
+ SvBOOL aSynchron; // exclusiv
+ SvBOOL aAsynchron;
+
+ SvBOOL aRecordPerItem;// exclusiv
+ SvBOOL aRecordPerSet;
+ SvBOOL aRecordManual;
+ SvBOOL aNoRecord;
+ SvBOOL aRecordAbsolute;
+
+ SvBOOL aHasDialog;
+ SvBOOL aMenuConfig;
+ SvBOOL aToolBoxConfig;
+ SvBOOL aStatusBarConfig;
+ SvBOOL aAccelConfig;
+ SvBOOL aFastCall;
+ SvBOOL aContainer;
+ SvBOOL aImageRotation;
+ SvBOOL aImageReflection;
+ SvIdentifier aPseudoPrefix;
+ SvString aDisableFlags;
+ SvMetaSlot* pLinkedSlot;
+ SvMetaSlot* pNextSlot;
+ ULONG nListPos;
+ SvMetaEnumValue* pEnumValue;
+ SvString aUnoName;
+
+#ifdef IDL_COMPILER
+ void WriteSlot( const ByteString & rShellName,
+ USHORT nCount, const ByteString & rSlotId,
+ SvSlotElementList &rList,
+ const ByteString & rPrefix,
+ SvIdlDataBase & rBase, SvStream & rOutStm );
+ virtual void Write( SvIdlDataBase & rBase,
+ SvStream & rOutStm, USHORT nTab,
+ WriteType, WriteAttribute = 0 );
+
+ void SetEnumValue(SvMetaEnumValue *p)
+ { pEnumValue = p; }
+#endif
+protected:
+ void SetCachable( BOOL bSet )
+ {
+ aCachable = bSet;
+ if( bSet )
+ aVolatile = FALSE;
+ }
+ void SetVolatile( BOOL bSet )
+ {
+ aVolatile = bSet;
+ if( bSet )
+ aCachable = FALSE;
+ }
+ void SetToggle( BOOL bSet )
+ {
+ aToggle = bSet;
+ }
+ void SetAutoUpdate( BOOL bSet )
+ {
+ aAutoUpdate = bSet;
+ }
+
+ void SetSynchron( BOOL bSet )
+ {
+ aSynchron = bSet;
+ if( bSet )
+ aAsynchron = FALSE;
+ }
+ void SetAsynchron( BOOL bSet )
+ {
+ aAsynchron = bSet;
+ if( bSet )
+ aSynchron = FALSE;
+ }
+
+ void SetRecordPerItem( BOOL bSet )
+ {
+ aRecordPerItem = bSet;
+ if( bSet )
+ aRecordPerSet = aRecordManual = aNoRecord = FALSE;
+ }
+ void SetRecordPerSet( BOOL bSet )
+ {
+ aRecordPerSet = bSet;
+ if( bSet )
+ aRecordPerItem = aRecordManual = aNoRecord = FALSE;
+ }
+ void SetRecordManual( BOOL bSet )
+ {
+ aRecordManual = bSet;
+ if( bSet )
+ aRecordPerItem = aRecordPerSet = aNoRecord = FALSE;
+ }
+ void SetNoRecord( BOOL bSet )
+ {
+ aNoRecord = bSet;
+ if( bSet )
+ aRecordPerItem = aRecordPerSet = aRecordManual = FALSE;
+ }
+ void SetRecordAbsolute( BOOL bSet )
+ { aRecordAbsolute = bSet; }
+ void SetHasDialog( BOOL bSet )
+ { aHasDialog = bSet; }
+ void SetMenuConfig( BOOL bSet )
+ { aMenuConfig = bSet; }
+ void SetToolBoxConfig( BOOL bSet )
+ { aToolBoxConfig = bSet; }
+ void SetStatusBarConfig( BOOL bSet )
+ { aStatusBarConfig = bSet; }
+ void SetAccelConfig( BOOL bSet )
+ { aAccelConfig = bSet; }
+ void SetAllConfig( BOOL bSet )
+ {
+ aMenuConfig = bSet;
+ aToolBoxConfig = bSet;
+ aStatusBarConfig = bSet;
+ aAccelConfig = bSet;
+ }
+ void SetFastCall( BOOL bSet )
+ { aFastCall = bSet; }
+ void SetContainer( BOOL bSet )
+ { aContainer = bSet; }
+ void SetImageRotation( BOOL bSet )
+ { aImageRotation = bSet; }
+ void SetImageReflection( BOOL bSet )
+ { aImageReflection = bSet; }
+
+public:
+ SV_DECL_META_FACTORY1( SvMetaSlot, SvMetaReference, 11 )
+ SvMetaObject * MakeClone() const;
+ SvMetaSlot *Clone() const { return (SvMetaSlot *)MakeClone(); }
+
+ SvMetaSlot();
+ SvMetaSlot( SvMetaType * pType );
+
+ virtual BOOL IsVariable() const;
+ virtual BOOL IsMethod() const;
+ virtual ByteString GetMangleName( BOOL bVariable ) const;
+
+ SvMetaAttribute * GetMethod() const;
+ SvMetaType * GetSlotType() const;
+ BOOL GetHasCoreId() const;
+ const ByteString & GetGroupId() const;
+ const ByteString & GetConfigId() const;
+ const ByteString & GetExecMethod() const;
+ const ByteString & GetStateMethod() const;
+ const ByteString & GetDefault() const;
+ const ByteString & GetDisableFlags() const;
+ BOOL GetPseudoSlots() const;
+ /*
+ BOOL GetGet() const;
+ BOOL GetSet() const;
+ */
+ BOOL GetCachable() const;
+ BOOL GetVolatile() const;
+ BOOL GetToggle() const;
+ BOOL GetAutoUpdate() const;
+
+ BOOL GetSynchron() const;
+ BOOL GetAsynchron() const;
+
+ BOOL GetRecordPerItem() const;
+ BOOL GetRecordPerSet() const;
+ BOOL GetRecordManual() const;
+ BOOL GetNoRecord() const;
+ BOOL GetRecordAbsolute() const;
+
+ BOOL GetHasDialog() const;
+ const ByteString & GetPseudoPrefix() const;
+ const ByteString & GetUnoName() const;
+ BOOL GetMenuConfig() const;
+ BOOL GetToolBoxConfig() const;
+ BOOL GetStatusBarConfig() const;
+ BOOL GetAccelConfig() const;
+ BOOL GetFastCall() const;
+ BOOL GetContainer() const;
+ BOOL GetImageRotation() const;
+ BOOL GetImageReflection() const;
+ SvMetaSlot* GetLinkedSlot() const
+ { return pLinkedSlot; }
+ SvMetaSlot* GetNextSlot() const
+ { return pNextSlot; }
+ ULONG GetListPos() const
+ { return nListPos; }
+ void SetListPos(ULONG n)
+ { nListPos = n; }
+ void ResetSlotPointer()
+ { pNextSlot = pLinkedSlot = 0; }
+
+// void FillSbxObject( SvIdlDataBase & rBase, SbxObject *, BOOL bProp );
+#ifdef IDL_COMPILER
+ SvMetaEnumValue* GetEnumValue() const
+ { return pEnumValue; }
+ virtual BOOL Test( SvIdlDataBase &, SvTokenStream & rInStm );
+ virtual void ReadAttributesSvIdl( SvIdlDataBase & rBase,
+ SvTokenStream & rInStm );
+ virtual void WriteAttributesSvIdl( SvIdlDataBase & rBase,
+ SvStream & rOutStm, USHORT nTab );
+ virtual BOOL ReadSvIdl( SvIdlDataBase &, SvTokenStream & rInStm );
+ virtual void WriteSvIdl( SvIdlDataBase & rBase,
+ SvStream & rOutStm, USHORT nTab );
+ virtual void Insert( SvSlotElementList&, const ByteString & rPrefix,
+ SvIdlDataBase& );
+ void WriteSlotStubs( const ByteString & rShellName,
+ ByteStringList & rList,
+ SvStream & rOutStm );
+ USHORT WriteSlotMap( const ByteString & rShellName,
+ USHORT nCount,
+ SvSlotElementList&,
+ const ByteString &,
+ SvIdlDataBase & rBase,
+ SvStream & rOutStm );
+ USHORT WriteSlotParamArray( SvIdlDataBase & rBase,
+ SvStream & rOutStm );
+ virtual void WriteHelpId( SvIdlDataBase & rBase, SvStream & rOutStm,
+ Table * pIdTable );
+ virtual void WriteSrc( SvIdlDataBase & rBase, SvStream & rOutStm,
+ Table * pIdTable );
+ virtual void WriteCSV( SvIdlDataBase&, SvStream& );
+#endif
+};
+SV_DECL_IMPL_REF(SvMetaSlot)
+SV_DECL_IMPL_PERSIST_LIST(SvMetaSlot,SvMetaSlot *)
+
+#endif // _SLOT_HXX
diff --git a/idl/inc/types.hxx b/idl/inc/types.hxx
new file mode 100644
index 000000000000..5393981a7a4f
--- /dev/null
+++ b/idl/inc/types.hxx
@@ -0,0 +1,345 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org 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 version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+#ifndef _TYPES_HXX
+#define _TYPES_HXX
+
+#include <tools/ref.hxx>
+#include <basobj.hxx>
+
+class SvSlotElementList;
+struct SvSlotElement;
+
+/******************** class SvMetaAttribute *****************************/
+SV_DECL_REF(SvMetaType)
+SV_DECL_REF(SvMetaAttribute)
+SV_DECL_PERSIST_LIST(SvMetaAttribute,SvMetaAttribute *)
+class SvMetaAttribute : public SvMetaReference
+{
+ SvMetaTypeRef aType;
+ SvNumberIdentifier aSlotId;
+ SvBOOL aAutomation;
+ SvBOOL aExport;
+ SvBOOL aReadonly;
+ SvBOOL aIsCollection;
+ SvBOOL aReadOnlyDoc;
+ SvBOOL aHidden;
+ BOOL bNewAttr;
+
+protected:
+#ifdef IDL_COMPILER
+ virtual void WriteCSource( SvIdlDataBase & rBase,
+ SvStream & rOutStm, BOOL bSet );
+ ULONG MakeSlotValue( SvIdlDataBase & rBase, BOOL bVariable ) const;
+ virtual void WriteAttributes( SvIdlDataBase & rBase,
+ SvStream & rOutStm, USHORT nTab,
+ WriteType, WriteAttribute = 0 );
+ virtual void ReadAttributesSvIdl( SvIdlDataBase & rBase,
+ SvTokenStream & rInStm );
+ virtual void WriteAttributesSvIdl( SvIdlDataBase & rBase,
+ SvStream & rOutStm, USHORT nTab );
+#endif
+public:
+ SV_DECL_META_FACTORY1( SvMetaAttribute, SvMetaReference, 2 )
+ SvMetaAttribute();
+ SvMetaAttribute( SvMetaType * );
+
+ void SetNewAttribute( BOOL bNew )
+ { bNewAttr = bNew; }
+ BOOL IsNewAttribute() const
+ { return bNewAttr; }
+ BOOL GetReadonly() const;
+
+ void SetSlotId( const SvNumberIdentifier & rId )
+ { aSlotId = rId; }
+ const SvNumberIdentifier & GetSlotId() const;
+
+ void SetExport( BOOL bSet )
+ { aExport = bSet; }
+ BOOL GetExport() const;
+
+ void SetHidden( BOOL bSet )
+ { aHidden = bSet; }
+ BOOL GetHidden() const;
+
+ void SetAutomation( BOOL bSet )
+ { aAutomation = bSet; }
+ BOOL GetAutomation() const;
+
+ void SetIsCollection( BOOL bSet )
+ { aIsCollection = bSet; }
+ BOOL GetIsCollection() const;
+ void SetReadOnlyDoc( BOOL bSet )
+ { aReadOnlyDoc = bSet; }
+ BOOL GetReadOnlyDoc() const;
+
+ void SetType( SvMetaType * pT ) { aType = pT; }
+ SvMetaType * GetType() const;
+
+ virtual BOOL IsMethod() const;
+ virtual BOOL IsVariable() const;
+ virtual ByteString GetMangleName( BOOL bVariable ) const;
+
+// void FillSbxObject( SbxInfo * pInfo, USHORT nSbxFlags = 0 );
+// virtual void FillSbxObject( SvIdlDataBase & rBase, SbxObject * pObj, BOOL bVariable );
+
+#ifdef IDL_COMPILER
+ virtual BOOL Test( SvIdlDataBase &, SvTokenStream & rInStm );
+ virtual BOOL ReadSvIdl( SvIdlDataBase &, SvTokenStream & rInStm );
+ virtual void WriteSvIdl( SvIdlDataBase & rBase, SvStream & rOutStm, USHORT nTab );
+ virtual void WriteParam( SvIdlDataBase & rBase, SvStream & rOutStm, USHORT nTab,
+ WriteType );
+ void WriteRecursiv_Impl( SvIdlDataBase & rBase,
+ SvStream & rOutStm, USHORT nTab,
+ WriteType, WriteAttribute );
+ virtual void Write( SvIdlDataBase & rBase, SvStream & rOutStm, USHORT nTab,
+ WriteType, WriteAttribute = 0 );
+ ULONG MakeSfx( ByteString * pAtrrArray );
+ virtual void Insert( SvSlotElementList&, const ByteString & rPrefix,
+ SvIdlDataBase& );
+ virtual void WriteHelpId( SvIdlDataBase & rBase, SvStream & rOutStm,
+ Table * pIdTable );
+ virtual void WriteSrc( SvIdlDataBase & rBase, SvStream & rOutStm,
+ Table * pIdTable );
+ virtual void WriteCSV( SvIdlDataBase&, SvStream& );
+ void FillIDTable(Table *pIDTable);
+ ByteString Compare( SvMetaAttribute *pAttr );
+#endif
+};
+SV_IMPL_REF(SvMetaAttribute)
+SV_IMPL_PERSIST_LIST(SvMetaAttribute,SvMetaAttribute *)
+
+
+/******************** class SvType *********************************/
+enum { CALL_VALUE, CALL_POINTER, CALL_REFERENCE };
+enum { TYPE_METHOD, TYPE_STRUCT, TYPE_BASE, TYPE_ENUM, TYPE_UNION,
+ TYPE_CLASS, TYPE_POINTER };
+class SvMetaType : public SvMetaExtern
+{
+ SvBOOL aIn; // Eingangsparameter
+ SvBOOL aOut; // Returnparameter
+ Svint aCall0, aCall1;
+ Svint aSbxDataType;
+ SvIdentifier aSvName;
+ SvIdentifier aSbxName;
+ SvIdentifier aOdlName;
+ SvIdentifier aCName;
+ SvIdentifier aBasicPostfix;
+ SvIdentifier aBasicName;
+ SvMetaAttributeMemberList * pAttrList;
+ int nType;
+ BOOL bIsItem;
+ BOOL bIsShell;
+ char cParserChar;
+
+#ifdef IDL_COMPILER
+ void WriteSfxItem( const ByteString & rItemName, SvIdlDataBase & rBase,
+ SvStream & rOutStm );
+protected:
+ BOOL ReadNamesSvIdl( SvIdlDataBase & rBase,
+ SvTokenStream & rInStm );
+ virtual void ReadAttributesSvIdl( SvIdlDataBase &, SvTokenStream & rInStm );
+ virtual void WriteAttributesSvIdl( SvIdlDataBase & rBase, SvStream & rOutStm, USHORT nTab );
+ virtual void ReadContextSvIdl( SvIdlDataBase &, SvTokenStream & rInStm );
+ virtual void WriteContextSvIdl( SvIdlDataBase &, SvStream & rOutStm,
+ USHORT nTab );
+
+ virtual void WriteContext( SvIdlDataBase & rBase, SvStream & rOutStm,
+ USHORT nTab,
+ WriteType, WriteAttribute = 0 );
+ virtual void WriteAttributes( SvIdlDataBase & rBase, SvStream & rOutStm, USHORT nTab,
+ WriteType, WriteAttribute = 0 );
+ BOOL ReadHeaderSvIdl( SvIdlDataBase &, SvTokenStream & rInStm );
+ void WriteHeaderSvIdl( SvIdlDataBase &, SvStream & rOutStm,
+ USHORT nTab );
+#endif
+public:
+ SV_DECL_META_FACTORY1( SvMetaType, SvMetaExtern, 18 )
+ SvMetaType();
+ SvMetaType( const ByteString & rTypeName, char cParserChar,
+ const ByteString & rCName );
+ SvMetaType( const ByteString & rTypeName, const ByteString & rSbxName,
+ const ByteString & rOdlName, char cParserChar,
+ const ByteString & rCName, const ByteString & rBasicName,
+ const ByteString & rBasicPostfix/*, SbxDataType nT = SbxEMPTY */);
+
+ SvMetaAttributeMemberList & GetAttrList() const;
+ ULONG GetAttrCount() const
+ {
+ return pAttrList ? pAttrList->Count() : 0L;
+ }
+ void AppendAttr( SvMetaAttribute * pAttr )
+ {
+ GetAttrList().Append( pAttr );
+ }
+
+ void SetType( int nT );
+ int GetType() const { return nType; }
+ SvMetaType * GetBaseType() const;
+ SvMetaType * GetReturnType() const;
+ BOOL IsItem() const { return bIsItem; }
+ BOOL IsShell() const { return bIsShell; }
+
+// void SetSbxDataType( SbxDataType nT )
+// { aSbxDataType = (int)nT; }
+// SbxDataType GetSbxDataType() const;
+
+ void SetIn( BOOL b ) { aIn = b; }
+ BOOL GetIn() const;
+
+ void SetOut( BOOL b ) { aOut = b; }
+ BOOL GetOut() const;
+
+ void SetCall0( int e );
+ int GetCall0() const;
+
+ void SetCall1( int e);
+ int GetCall1() const;
+
+ void SetBasicName(const ByteString& rName)
+ { aBasicName = rName; }
+
+ const ByteString & GetBasicName() const;
+ ByteString GetBasicPostfix() const;
+ const ByteString & GetSvName() const;
+ const ByteString & GetSbxName() const;
+ const ByteString & GetOdlName() const;
+ const ByteString & GetCName() const;
+ char GetParserChar() const { return cParserChar; }
+
+ virtual BOOL SetName( const ByteString & rName, SvIdlDataBase * = NULL );
+
+// void FillSbxObject( SbxVariable * pObj, BOOL bVariable );
+
+#ifdef IDL_COMPILER
+ virtual BOOL ReadSvIdl( SvIdlDataBase &, SvTokenStream & rInStm );
+ virtual void WriteSvIdl( SvIdlDataBase & rBase,
+ SvStream & rOutStm, USHORT nTab );
+ virtual void Write( SvIdlDataBase & rBase, SvStream & rOutStm, USHORT nTab,
+ WriteType, WriteAttribute = 0 );
+ ByteString GetCString() const;
+ void WriteSvIdlType( SvIdlDataBase & rBase, SvStream & rOutStm, USHORT nTab );
+ void WriteOdlType( SvIdlDataBase & rBase, SvStream & rOutStm, USHORT nTab );
+ void AppendParserString (ByteString &rString);
+
+ ULONG MakeSfx( ByteString * pAtrrArray );
+ virtual void WriteSfx( SvIdlDataBase & rBase, SvStream & rOutStm );
+ //BOOL ReadTypePrefix( SvIdlDataBase &, SvTokenStream & rInStm );
+ BOOL ReadMethodArgs( SvIdlDataBase & rBase,
+ SvTokenStream & rInStm );
+ void WriteTypePrefix( SvIdlDataBase & rBase, SvStream & rOutStm, USHORT nTab, WriteType );
+ void WriteMethodArgs( SvIdlDataBase & rBase, SvStream & rOutStm, USHORT nTab, WriteType );
+ void WriteTheType( SvIdlDataBase & rBase, SvStream & rOutStm, USHORT nTab, WriteType );
+ ByteString GetParserString() const;
+ void WriteParamNames( SvIdlDataBase & rBase, SvStream & rOutStm,
+ const ByteString & rChief );
+#endif
+};
+SV_IMPL_REF(SvMetaType)
+DECLARE_LIST(SvMetaTypeList,SvMetaType *)
+SV_DECL_IMPL_PERSIST_LIST(SvMetaType,SvMetaType *)
+
+
+/******************** class SvTypeString *********************************/
+class SvMetaTypeString : public SvMetaType
+{
+public:
+ SV_DECL_META_FACTORY1( SvMetaTypeString, SvMetaType, 19 )
+ SvMetaTypeString();
+};
+SV_DECL_IMPL_REF(SvMetaTypeString)
+SV_DECL_IMPL_PERSIST_LIST(SvMetaTypeString,SvMetaTypeString *)
+
+
+/******************** class SvMetaEnumValue **********************************/
+class SvMetaEnumValue : public SvMetaName
+{
+ ByteString aEnumValue;
+public:
+ SV_DECL_META_FACTORY1( SvMetaEnumValue, SvMetaName, 20 )
+ SvMetaEnumValue();
+
+#ifdef IDL_COMPILER
+ virtual BOOL ReadSvIdl( SvIdlDataBase &, SvTokenStream & rInStm );
+ virtual void WriteSvIdl( SvIdlDataBase & rBase, SvStream & rOutStm, USHORT nTab );
+ virtual void Write( SvIdlDataBase & rBase, SvStream & rOutStm, USHORT nTab,
+ WriteType, WriteAttribute = 0 );
+#endif
+};
+SV_DECL_IMPL_REF(SvMetaEnumValue)
+SV_DECL_IMPL_PERSIST_LIST(SvMetaEnumValue,SvMetaEnumValue *)
+
+
+/******************** class SvTypeEnum *********************************/
+class SvMetaTypeEnum : public SvMetaType
+{
+ SvMetaEnumValueMemberList aEnumValueList;
+ ByteString aPrefix;
+protected:
+#ifdef IDL_COMPILER
+ virtual void ReadContextSvIdl( SvIdlDataBase &, SvTokenStream & rInStm );
+ virtual void WriteContextSvIdl( SvIdlDataBase &, SvStream & rOutStm,
+ USHORT nTab );
+ virtual void WriteContext( SvIdlDataBase & rBase, SvStream & rOutStm, USHORT nTab,
+ WriteType, WriteAttribute = 0 );
+#endif
+public:
+ SV_DECL_META_FACTORY1( SvMetaTypeEnum, SvMetaType, 21 )
+ SvMetaTypeEnum();
+
+ USHORT GetMaxValue() const;
+ ULONG Count() const { return aEnumValueList.Count(); }
+ const ByteString & GetPrefix() const { return aPrefix; }
+ SvMetaEnumValue * GetObject( ULONG n ) const
+ { return aEnumValueList.GetObject( n ); }
+
+#ifdef IDL_COMPILER
+ virtual BOOL ReadSvIdl( SvIdlDataBase &, SvTokenStream & rInStm );
+ virtual void WriteSvIdl( SvIdlDataBase & rBase, SvStream & rOutStm, USHORT nTab );
+
+ virtual void Write( SvIdlDataBase & rBase, SvStream & rOutStm,
+ USHORT nTab,
+ WriteType, WriteAttribute = 0 );
+#endif
+};
+SV_DECL_IMPL_REF(SvMetaTypeEnum)
+SV_DECL_IMPL_PERSIST_LIST(SvMetaTypeEnum,SvMetaTypeEnum *)
+
+
+/******************** class SvTypeVoid ***********************************/
+class SvMetaTypevoid : public SvMetaType
+{
+public:
+ SV_DECL_META_FACTORY1( SvMetaTypevoid, SvMetaName, 22 )
+ SvMetaTypevoid();
+};
+SV_DECL_IMPL_REF(SvMetaTypevoid)
+SV_DECL_IMPL_PERSIST_LIST(SvMetaTypevoid,SvMetaTypevoid *)
+
+
+#endif // _TYPES_HXX
+