xref: /trunk/main/idl/inc/module.hxx (revision f3ea6674)
1*f3ea6674SAndrew Rist /**************************************************************
2cdf0e10cSrcweir  *
3*f3ea6674SAndrew Rist  * Licensed to the Apache Software Foundation (ASF) under one
4*f3ea6674SAndrew Rist  * or more contributor license agreements.  See the NOTICE file
5*f3ea6674SAndrew Rist  * distributed with this work for additional information
6*f3ea6674SAndrew Rist  * regarding copyright ownership.  The ASF licenses this file
7*f3ea6674SAndrew Rist  * to you under the Apache License, Version 2.0 (the
8*f3ea6674SAndrew Rist  * "License"); you may not use this file except in compliance
9*f3ea6674SAndrew Rist  * with the License.  You may obtain a copy of the License at
10*f3ea6674SAndrew Rist  *
11*f3ea6674SAndrew Rist  *   http://www.apache.org/licenses/LICENSE-2.0
12*f3ea6674SAndrew Rist  *
13*f3ea6674SAndrew Rist  * Unless required by applicable law or agreed to in writing,
14*f3ea6674SAndrew Rist  * software distributed under the License is distributed on an
15*f3ea6674SAndrew Rist  * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
16*f3ea6674SAndrew Rist  * KIND, either express or implied.  See the License for the
17*f3ea6674SAndrew Rist  * specific language governing permissions and limitations
18*f3ea6674SAndrew Rist  * under the License.
19*f3ea6674SAndrew Rist  *
20*f3ea6674SAndrew Rist  *************************************************************/
21*f3ea6674SAndrew Rist 
22*f3ea6674SAndrew Rist 
23cdf0e10cSrcweir 
24cdf0e10cSrcweir #ifndef _MODULE_HXX
25cdf0e10cSrcweir #define _MODULE_HXX
26cdf0e10cSrcweir 
27cdf0e10cSrcweir #include <slot.hxx>
28cdf0e10cSrcweir #include <object.hxx>
29cdf0e10cSrcweir 
30cdf0e10cSrcweir struct SvNamePos
31cdf0e10cSrcweir {
32cdf0e10cSrcweir 	SvGlobalName	aUUId;
33cdf0e10cSrcweir 	sal_uInt32  		nStmPos;
34cdf0e10cSrcweir 	SvNamePos( const SvGlobalName & rName, sal_uInt32 nPos )
35cdf0e10cSrcweir 		: aUUId( rName )
36cdf0e10cSrcweir 		, nStmPos( nPos ) {}
37cdf0e10cSrcweir };
38cdf0e10cSrcweir DECLARE_LIST( SvNamePosList, SvNamePos *)
39cdf0e10cSrcweir 
40cdf0e10cSrcweir /******************** class SvMetaModule *********************************/
41cdf0e10cSrcweir class SvMetaModule : public SvMetaExtern
42cdf0e10cSrcweir {
43cdf0e10cSrcweir     SvMetaClassMemberList   	aClassList;
44cdf0e10cSrcweir     SvMetaTypeMemberList    	aTypeList;
45cdf0e10cSrcweir     SvMetaAttributeMemberList   aAttrList;
46cdf0e10cSrcweir // Browser
47cdf0e10cSrcweir     String                  aIdlFileName;
48cdf0e10cSrcweir     SvString                aHelpFileName;
49cdf0e10cSrcweir     SvString                aSlotIdFile;
50cdf0e10cSrcweir     SvString                aTypeLibFile;
51cdf0e10cSrcweir 	SvString				aModulePrefix;
52cdf0e10cSrcweir 
53cdf0e10cSrcweir #ifdef IDL_COMPILER
54cdf0e10cSrcweir     sal_Bool                    bImported   : 1,
55cdf0e10cSrcweir                             bIsModified : 1;
56cdf0e10cSrcweir     SvGlobalName            aBeginName;
57cdf0e10cSrcweir     SvGlobalName            aEndName;
58cdf0e10cSrcweir     SvGlobalName            aNextName;
59cdf0e10cSrcweir protected:
60cdf0e10cSrcweir 	virtual void        ReadAttributesSvIdl( SvIdlDataBase &, SvTokenStream & rInStm );
61cdf0e10cSrcweir     virtual void        WriteAttributesSvIdl( SvIdlDataBase & rBase, SvStream & rOutStm, sal_uInt16 nTab );
62cdf0e10cSrcweir     virtual void        ReadContextSvIdl( SvIdlDataBase &, SvTokenStream & rInStm );
63cdf0e10cSrcweir     virtual void        WriteContextSvIdl( SvIdlDataBase & rBase, SvStream & rOutStm, sal_uInt16 nTab );
64cdf0e10cSrcweir #endif
65cdf0e10cSrcweir public:
66cdf0e10cSrcweir                         SV_DECL_META_FACTORY1( SvMetaModule, SvMetaExtern, 13 )
67cdf0e10cSrcweir                         SvMetaModule();
68cdf0e10cSrcweir 
69cdf0e10cSrcweir     const String &      GetIdlFileName() const { return aIdlFileName; }
70cdf0e10cSrcweir 	const ByteString &  	GetModulePrefix() const { return aModulePrefix; }
71cdf0e10cSrcweir 
72cdf0e10cSrcweir     virtual sal_Bool        SetName( const ByteString & rName, SvIdlDataBase * = NULL  );
73cdf0e10cSrcweir 
74cdf0e10cSrcweir     const ByteString &      GetHelpFileName() const { return aHelpFileName; }
75cdf0e10cSrcweir     const ByteString &      GetTypeLibFileName() const { return aTypeLibFile; }
76cdf0e10cSrcweir 
77cdf0e10cSrcweir     const SvMetaAttributeMemberList & GetAttrList() const { return aAttrList; }
78cdf0e10cSrcweir     const SvMetaTypeMemberList & GetTypeList() const { return aTypeList; }
79cdf0e10cSrcweir     const SvMetaClassMemberList & GetClassList() const { return aClassList; }
80cdf0e10cSrcweir 
81cdf0e10cSrcweir #ifdef IDL_COMPILER
82cdf0e10cSrcweir                         SvMetaModule( const String & rIdlFileName,
83cdf0e10cSrcweir                                       sal_Bool bImported );
84cdf0e10cSrcweir 
85cdf0e10cSrcweir     sal_Bool                FillNextName( SvGlobalName * );
86cdf0e10cSrcweir     sal_Bool                IsImported() const { return bImported; }
87cdf0e10cSrcweir     sal_Bool                IsModified() const { return bIsModified; }
88cdf0e10cSrcweir 
89cdf0e10cSrcweir     virtual sal_Bool        ReadSvIdl( SvIdlDataBase &, SvTokenStream & rInStm );
90cdf0e10cSrcweir     virtual void        WriteSvIdl( SvIdlDataBase & rBase, SvStream & rOutStm, sal_uInt16 nTab );
91cdf0e10cSrcweir 
92cdf0e10cSrcweir 	virtual void		WriteAttributes( SvIdlDataBase & rBase,
93cdf0e10cSrcweir 										SvStream & rOutStm, sal_uInt16 nTab,
94cdf0e10cSrcweir 		 						   		WriteType, WriteAttribute = 0 );
95cdf0e10cSrcweir //    virtual void        WriteSbx( SvIdlDataBase & rBase, SvStream & rOutStm, SvNamePosList & rList );
96cdf0e10cSrcweir     virtual void        Write( SvIdlDataBase & rBase, SvStream & rOutStm, sal_uInt16 nTab,
97cdf0e10cSrcweir 	 						   	WriteType, WriteAttribute = 0 );
98cdf0e10cSrcweir     virtual void        WriteSfx( SvIdlDataBase & rBase, SvStream & rOutStm );
99cdf0e10cSrcweir     virtual void        WriteHelpIds( SvIdlDataBase & rBase, SvStream & rOutStm,
100cdf0e10cSrcweir 									Table* pTable );
101cdf0e10cSrcweir     virtual void        WriteSrc( SvIdlDataBase & rBase, SvStream & rOutStm,
102cdf0e10cSrcweir                                   	Table *pIdTable );
103cdf0e10cSrcweir 
104cdf0e10cSrcweir 	virtual void        WriteCxx( SvIdlDataBase & rBase, SvStream & rOutStm, sal_uInt16 nTab );
105cdf0e10cSrcweir 	virtual void        WriteHxx( SvIdlDataBase & rBase, SvStream & rOutStm, sal_uInt16 nTab );
106cdf0e10cSrcweir #endif
107cdf0e10cSrcweir };
108cdf0e10cSrcweir SV_DECL_IMPL_REF(SvMetaModule)
109cdf0e10cSrcweir SV_DECL_IMPL_PERSIST_LIST(SvMetaModule,SvMetaModule *)
110cdf0e10cSrcweir 
111cdf0e10cSrcweir 
112cdf0e10cSrcweir #endif // _MODULE_HXX
113cdf0e10cSrcweir 
114