1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
3 * This file is part of the LibreOffice project.
5 * This Source Code Form is subject to the terms of the Mozilla Public
6 * License, v. 2.0. If a copy of the MPL was not distributed with this
7 * file, You can obtain one at http://mozilla.org/MPL/2.0/.
9 * This file incorporates work covered by the following license notice:
11 * Licensed to the Apache Software Foundation (ASF) under one or more
12 * contributor license agreements. See the NOTICE file distributed
13 * with this work for additional information regarding copyright
14 * ownership. The ASF licenses this file to you under the Apache
15 * License, Version 2.0 (the "License"); you may not use this file
16 * except in compliance with the License. You may obtain a copy of
17 * the License at http://www.apache.org/licenses/LICENSE-2.0 .
20 #ifndef INCLUDED_IDL_INC_OBJECT_HXX
21 #define INCLUDED_IDL_INC_OBJECT_HXX
31 SvSlotElement( SvMetaSlot
* pS
, const OString
& rPrefix
)
37 typedef std::vector
< SvSlotElement
* > SvSlotElementList
;
40 typedef ::std::vector
< SvMetaClass
* > SvMetaClassList
;
42 typedef tools::SvRef
<SvMetaClass
> SvMetaClassRef
;
43 class SvClassElement
: public SvRttiBase
47 SvMetaClassRef xClass
;
52 void SetPrefix( const OString
& rPrefix
)
53 { aPrefix
= rPrefix
; }
54 const OString
& GetPrefix() const
57 void SetAutomation( bool rAutomation
)
58 { aAutomation
= rAutomation
; }
59 bool GetAutomation() const
60 { return aAutomation
; }
62 void SetClass( SvMetaClass
* pClass
)
64 SvMetaClass
* GetClass() const
68 typedef tools::SvRef
<SvClassElement
> SvClassElementRef
;
70 class SvClassElementMemberList
: public SvRefMemberList
<SvClassElement
*> {};
72 class SvMetaClassMemberList
: public SvRefMemberList
<SvMetaClass
*> {};
74 class SvMetaClass
: public SvMetaType
76 SvMetaAttributeMemberList aAttrList
;
77 SvClassElementMemberList aClassList
;
78 SvMetaClassRef aSuperClass
;
80 SvMetaClassRef xAutomationInterface
;
82 bool TestAttribute( SvIdlDataBase
& rBase
, SvTokenStream
& rInStm
,
83 SvMetaAttribute
& rAttr
) const;
84 static void WriteSlotStubs( const OString
& rShellName
,
85 SvSlotElementList
& rSlotList
,
86 ByteStringList
& rList
,
88 static sal_uInt16
WriteSlotParamArray( SvIdlDataBase
& rBase
,
89 SvSlotElementList
& rSlotList
,
91 static sal_uInt16
WriteSlots( const OString
& rShellName
, sal_uInt16 nCount
,
92 SvSlotElementList
& rSlotList
,
93 SvIdlDataBase
& rBase
,
96 void InsertSlots( SvSlotElementList
& rList
, std::vector
<sal_uLong
>& rSuperList
,
97 SvMetaClassList
& rClassList
,
98 const OString
& rPrefix
, SvIdlDataBase
& rBase
);
101 virtual void ReadAttributesSvIdl( SvIdlDataBase
& rBase
,
102 SvTokenStream
& rInStm
) SAL_OVERRIDE
;
103 virtual void ReadContextSvIdl( SvIdlDataBase
&,
104 SvTokenStream
& rInStm
) SAL_OVERRIDE
;
109 bool GetAutomation() const
110 { return aAutomation
; }
111 SvMetaClass
* GetSuperClass() const
112 { return aSuperClass
; }
114 void FillClasses( SvMetaClassList
& rList
);
116 const SvClassElementMemberList
&
118 { return aClassList
; }
120 virtual bool ReadSvIdl( SvIdlDataBase
&, SvTokenStream
& rInStm
) SAL_OVERRIDE
;
121 virtual void WriteSfx( SvIdlDataBase
& rBase
, SvStream
& rOutStm
) SAL_OVERRIDE
;
124 #endif // INCLUDED_IDL_INC_OBJECT_HXX
126 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */