Bump for 3.6-28
[LibreOffice.git] / idl / inc / module.hxx
blob3a316050db0ff526e6ab5a78dfc5cc361bbe26fa
1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 /*************************************************************************
4 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
6 * Copyright 2000, 2010 Oracle and/or its affiliates.
8 * OpenOffice.org - a multi-platform office productivity suite
10 * This file is part of OpenOffice.org.
12 * OpenOffice.org is free software: you can redistribute it and/or modify
13 * it under the terms of the GNU Lesser General Public License version 3
14 * only, as published by the Free Software Foundation.
16 * OpenOffice.org is distributed in the hope that it will be useful,
17 * but WITHOUT ANY WARRANTY; without even the implied warranty of
18 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
19 * GNU Lesser General Public License version 3 for more details
20 * (a copy is included in the LICENSE file that accompanied this code).
22 * You should have received a copy of the GNU Lesser General Public License
23 * version 3 along with OpenOffice.org. If not, see
24 * <http://www.openoffice.org/license.html>
25 * for a copy of the LGPLv3 License.
27 ************************************************************************/
29 #ifndef _MODULE_HXX
30 #define _MODULE_HXX
32 #include <slot.hxx>
33 #include <object.hxx>
35 struct SvNamePos
37 SvGlobalName aUUId;
38 sal_uInt32 nStmPos;
39 SvNamePos( const SvGlobalName & rName, sal_uInt32 nPos )
40 : aUUId( rName )
41 , nStmPos( nPos ) {}
44 class SvMetaModule : public SvMetaExtern
46 SvMetaClassMemberList aClassList;
47 SvMetaTypeMemberList aTypeList;
48 SvMetaAttributeMemberList aAttrList;
49 // browser
50 String aIdlFileName;
51 SvString aHelpFileName;
52 SvString aSlotIdFile;
53 SvString aTypeLibFile;
54 SvString aModulePrefix;
56 sal_Bool bImported : 1,
57 bIsModified : 1;
58 SvGlobalName aBeginName;
59 SvGlobalName aEndName;
60 SvGlobalName aNextName;
61 protected:
62 virtual void ReadAttributesSvIdl( SvIdlDataBase &, SvTokenStream & rInStm );
63 virtual void WriteAttributesSvIdl( SvIdlDataBase & rBase, SvStream & rOutStm, sal_uInt16 nTab );
64 virtual void ReadContextSvIdl( SvIdlDataBase &, SvTokenStream & rInStm );
65 virtual void WriteContextSvIdl( SvIdlDataBase & rBase, SvStream & rOutStm, sal_uInt16 nTab );
66 public:
67 SV_DECL_META_FACTORY1( SvMetaModule, SvMetaExtern, 13 )
68 SvMetaModule();
70 const String & GetIdlFileName() const { return aIdlFileName; }
71 const rtl::OString& GetModulePrefix() const { return aModulePrefix.getString(); }
73 virtual sal_Bool SetName( const rtl::OString& rName, SvIdlDataBase * = NULL );
75 const rtl::OString& GetHelpFileName() const { return aHelpFileName.getString(); }
76 const rtl::OString& GetTypeLibFileName() const { return aTypeLibFile.getString(); }
78 const SvMetaAttributeMemberList & GetAttrList() const { return aAttrList; }
79 const SvMetaTypeMemberList & GetTypeList() const { return aTypeList; }
80 const SvMetaClassMemberList & GetClassList() const { return aClassList; }
82 SvMetaModule( const String & rIdlFileName,
83 sal_Bool bImported );
85 sal_Bool FillNextName( SvGlobalName * );
86 sal_Bool IsImported() const { return bImported; }
87 sal_Bool IsModified() const { return bIsModified; }
89 virtual sal_Bool ReadSvIdl( SvIdlDataBase &, SvTokenStream & rInStm );
90 virtual void WriteSvIdl( SvIdlDataBase & rBase, SvStream & rOutStm, sal_uInt16 nTab );
92 virtual void WriteAttributes( SvIdlDataBase & rBase,
93 SvStream & rOutStm, sal_uInt16 nTab,
94 WriteType, WriteAttribute = 0 );
95 virtual void Write( SvIdlDataBase & rBase, SvStream & rOutStm, sal_uInt16 nTab,
96 WriteType, WriteAttribute = 0 );
97 virtual void WriteSfx( SvIdlDataBase & rBase, SvStream & rOutStm );
98 virtual void WriteHelpIds( SvIdlDataBase & rBase, SvStream & rOutStm,
99 HelpIdTable& rTable );
101 SV_DECL_IMPL_REF(SvMetaModule)
102 SV_DECL_IMPL_PERSIST_LIST(SvMetaModule,SvMetaModule *)
105 #endif // _MODULE_HXX
107 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */