merge the formfield patch from ooo-build
[ooovba.git] / idl / inc / module.hxx
blob0f0e83f25a97dd9d36bda4fefb93d4224ab07136
1 /*************************************************************************
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4 *
5 * Copyright 2008 by Sun Microsystems, Inc.
7 * OpenOffice.org - a multi-platform office productivity suite
9 * $RCSfile: module.hxx,v $
10 * $Revision: 1.3 $
12 * This file is part of OpenOffice.org.
14 * OpenOffice.org is free software: you can redistribute it and/or modify
15 * it under the terms of the GNU Lesser General Public License version 3
16 * only, as published by the Free Software Foundation.
18 * OpenOffice.org is distributed in the hope that it will be useful,
19 * but WITHOUT ANY WARRANTY; without even the implied warranty of
20 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
21 * GNU Lesser General Public License version 3 for more details
22 * (a copy is included in the LICENSE file that accompanied this code).
24 * You should have received a copy of the GNU Lesser General Public License
25 * version 3 along with OpenOffice.org. If not, see
26 * <http://www.openoffice.org/license.html>
27 * for a copy of the LGPLv3 License.
29 ************************************************************************/
31 #ifndef _MODULE_HXX
32 #define _MODULE_HXX
34 #include <slot.hxx>
35 #include <object.hxx>
37 struct SvNamePos
39 SvGlobalName aUUId;
40 UINT32 nStmPos;
41 SvNamePos( const SvGlobalName & rName, UINT32 nPos )
42 : aUUId( rName )
43 , nStmPos( nPos ) {}
45 DECLARE_LIST( SvNamePosList, SvNamePos *)
47 /******************** class SvMetaModule *********************************/
48 class SvMetaModule : public SvMetaExtern
50 SvMetaClassMemberList aClassList;
51 SvMetaTypeMemberList aTypeList;
52 SvMetaAttributeMemberList aAttrList;
53 // Browser
54 String aIdlFileName;
55 SvString aHelpFileName;
56 SvString aSlotIdFile;
57 SvString aTypeLibFile;
58 SvString aModulePrefix;
60 #ifdef IDL_COMPILER
61 BOOL bImported : 1,
62 bIsModified : 1;
63 SvGlobalName aBeginName;
64 SvGlobalName aEndName;
65 SvGlobalName aNextName;
66 protected:
67 virtual void ReadAttributesSvIdl( SvIdlDataBase &, SvTokenStream & rInStm );
68 virtual void WriteAttributesSvIdl( SvIdlDataBase & rBase, SvStream & rOutStm, USHORT nTab );
69 virtual void ReadContextSvIdl( SvIdlDataBase &, SvTokenStream & rInStm );
70 virtual void WriteContextSvIdl( SvIdlDataBase & rBase, SvStream & rOutStm, USHORT nTab );
71 #endif
72 public:
73 SV_DECL_META_FACTORY1( SvMetaModule, SvMetaExtern, 13 )
74 SvMetaModule();
76 const String & GetIdlFileName() const { return aIdlFileName; }
77 const ByteString & GetModulePrefix() const { return aModulePrefix; }
79 virtual BOOL SetName( const ByteString & rName, SvIdlDataBase * = NULL );
81 const ByteString & GetHelpFileName() const { return aHelpFileName; }
82 const ByteString & GetTypeLibFileName() const { return aTypeLibFile; }
84 const SvMetaAttributeMemberList & GetAttrList() const { return aAttrList; }
85 const SvMetaTypeMemberList & GetTypeList() const { return aTypeList; }
86 const SvMetaClassMemberList & GetClassList() const { return aClassList; }
88 #ifdef IDL_COMPILER
89 SvMetaModule( const String & rIdlFileName,
90 BOOL bImported );
92 BOOL FillNextName( SvGlobalName * );
93 BOOL IsImported() const { return bImported; }
94 BOOL IsModified() const { return bIsModified; }
96 virtual BOOL ReadSvIdl( SvIdlDataBase &, SvTokenStream & rInStm );
97 virtual void WriteSvIdl( SvIdlDataBase & rBase, SvStream & rOutStm, USHORT nTab );
99 virtual void WriteAttributes( SvIdlDataBase & rBase,
100 SvStream & rOutStm, USHORT nTab,
101 WriteType, WriteAttribute = 0 );
102 // virtual void WriteSbx( SvIdlDataBase & rBase, SvStream & rOutStm, SvNamePosList & rList );
103 virtual void Write( SvIdlDataBase & rBase, SvStream & rOutStm, USHORT nTab,
104 WriteType, WriteAttribute = 0 );
105 virtual void WriteSfx( SvIdlDataBase & rBase, SvStream & rOutStm );
106 virtual void WriteHelpIds( SvIdlDataBase & rBase, SvStream & rOutStm,
107 Table* pTable );
108 virtual void WriteSrc( SvIdlDataBase & rBase, SvStream & rOutStm,
109 Table *pIdTable );
111 virtual void WriteCxx( SvIdlDataBase & rBase, SvStream & rOutStm, USHORT nTab );
112 virtual void WriteHxx( SvIdlDataBase & rBase, SvStream & rOutStm, USHORT nTab );
113 #endif
115 SV_DECL_IMPL_REF(SvMetaModule)
116 SV_DECL_IMPL_PERSIST_LIST(SvMetaModule,SvMetaModule *)
119 #endif // _MODULE_HXX