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 ************************************************************************/
40 SvSlotElement( SvMetaSlot
* pS
, const rtl::OString
& rPrefix
)
46 typedef std::vector
< SvSlotElement
* > SvSlotElementList
;
49 typedef ::std::vector
< SvMetaClass
* > SvMetaClassList
;
51 SV_DECL_REF(SvMetaClass
)
52 class SvClassElement
: public SvPersistBase
56 SvMetaClassRef xClass
;
58 SV_DECL_PERSIST1( SvClassElement
, SvPersistBase
, 1 )
61 void SetPrefix( const rtl::OString
& rPrefix
)
62 { aPrefix
= rPrefix
; }
63 const rtl::OString
& GetPrefix() const
66 void SetAutomation( sal_Bool rAutomation
)
67 { aAutomation
= rAutomation
; }
68 sal_Bool
GetAutomation() const
69 { return aAutomation
; }
71 void SetClass( SvMetaClass
* pClass
)
73 SvMetaClass
* GetClass() const
77 SV_DECL_IMPL_REF(SvClassElement
)
78 SV_DECL_IMPL_PERSIST_LIST(SvClassElement
,SvClassElement
*)
81 SV_DECL_PERSIST_LIST(SvMetaClass
,SvMetaClass
*)
82 class SvMetaClass
: public SvMetaType
84 SvMetaAttributeMemberList aAttrList
;
85 SvClassElementMemberList aClassList
;
86 SvMetaClassRef aSuperClass
;
88 SvMetaClassRef xAutomationInterface
;
90 sal_Bool
TestAttribute( SvIdlDataBase
& rBase
, SvTokenStream
& rInStm
,
91 SvMetaAttribute
& rAttr
) const;
92 void WriteSlotStubs( const rtl::OString
& rShellName
,
93 SvSlotElementList
& rSlotList
,
94 ByteStringList
& rList
,
96 sal_uInt16
WriteSlotParamArray( SvIdlDataBase
& rBase
,
97 SvSlotElementList
& rSlotList
,
99 sal_uInt16
WriteSlots( const rtl::OString
& rShellName
, sal_uInt16 nCount
,
100 SvSlotElementList
& rSlotList
,
101 SvIdlDataBase
& rBase
,
102 SvStream
& rOutStm
);
104 void InsertSlots( SvSlotElementList
& rList
, std::vector
<sal_uLong
>& rSuperList
,
105 SvMetaClassList
& rClassList
,
106 const rtl::OString
& rPrefix
, SvIdlDataBase
& rBase
);
109 virtual void ReadAttributesSvIdl( SvIdlDataBase
& rBase
,
110 SvTokenStream
& rInStm
);
111 virtual void WriteAttributesSvIdl( SvIdlDataBase
& rBase
,
112 SvStream
& rOutStm
, sal_uInt16 nTab
);
113 virtual void ReadContextSvIdl( SvIdlDataBase
&,
114 SvTokenStream
& rInStm
);
115 virtual void WriteContextSvIdl( SvIdlDataBase
& rBase
,
116 SvStream
& rOutStm
, sal_uInt16 nTab
);
117 void WriteOdlMembers( ByteStringList
& rSuperList
,
118 sal_Bool bVariable
, sal_Bool bWriteTab
,
119 SvIdlDataBase
& rBase
,
120 SvStream
& rOutStm
, sal_uInt16 nTab
);
122 SV_DECL_META_FACTORY1( SvMetaClass
, SvMetaType
, 6 )
125 sal_Bool
GetAutomation() const
126 { return aAutomation
; }
127 SvMetaClass
* GetSuperClass() const
128 { return aSuperClass
; }
130 void FillClasses( SvMetaClassList
& rList
);
132 const SvClassElementMemberList
&
134 { return aClassList
; }
136 virtual sal_Bool
ReadSvIdl( SvIdlDataBase
&, SvTokenStream
& rInStm
);
137 virtual void WriteSvIdl( SvIdlDataBase
& rBase
, SvStream
& rOutStm
, sal_uInt16 nTab
);
138 virtual void Write( SvIdlDataBase
& rBase
, SvStream
& rOutStm
,
140 WriteType
, WriteAttribute
= 0 );
141 virtual void WriteSfx( SvIdlDataBase
& rBase
, SvStream
& rOutStm
);
142 virtual void WriteHelpIds( SvIdlDataBase
& rBase
, SvStream
& rOutStm
,
143 HelpIdTable
& rTable
);
145 SV_IMPL_REF(SvMetaClass
)
146 SV_IMPL_PERSIST_LIST(SvMetaClass
,SvMetaClass
*)
149 #endif // _OBJECT_HXX
151 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */