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_TYPES_HXX
21 #define INCLUDED_IDL_INC_TYPES_HXX
23 #include <rtl/strbuf.hxx>
24 #include <tools/ref.hxx>
29 typedef SvRefMemberList
< SvMetaSlot
* > SvSlotElementList
;
31 class SvMetaAttribute
: public SvMetaReference
34 tools::SvRef
<SvMetaType
> aType
;
37 SvMetaAttribute( SvMetaType
* );
39 void SetSlotId( const SvIdentifier
& rId
)
41 const SvIdentifier
& GetSlotId() const;
42 SvMetaType
* GetType() const;
44 virtual bool Test( SvTokenStream
& rInStm
);
45 virtual bool ReadSvIdl( SvIdlDataBase
&, SvTokenStream
& rInStm
) override
;
46 sal_uLong
MakeSfx( OStringBuffer
& rAtrrArray
) const;
47 virtual void Insert( SvSlotElementList
& );
50 enum MetaTypeType
{ Method
, Struct
, Base
, Enum
, Interface
, Shell
};
52 class SvMetaType
: public SvMetaReference
54 SvRefMemberList
<SvMetaAttribute
*> aAttrList
;
58 void WriteSfxItem( const OString
& rItemName
, SvIdlDataBase
const & rBase
,
61 bool ReadHeaderSvIdl( SvTokenStream
& rInStm
);
64 SvMetaType( const OString
& rTypeName
);
66 virtual ~SvMetaType() override
;
68 virtual void ReadContextSvIdl( SvIdlDataBase
&, SvTokenStream
& rInStm
) override
;
70 SvRefMemberList
<SvMetaAttribute
*>&
71 GetAttrList() { return aAttrList
; }
72 sal_uLong
GetAttrCount() const { return aAttrList
.size(); }
74 void SetType( MetaTypeType nT
);
75 MetaTypeType
GetMetaTypeType() const { return nType
; }
76 SvMetaType
* GetBaseType() const;
77 SvMetaType
* GetReturnType() const;
78 void SetItem(bool b
) { bIsItem
= b
; }
79 bool IsItem() const { return bIsItem
; }
81 virtual bool ReadSvIdl( SvIdlDataBase
&, SvTokenStream
& rInStm
) override
;
83 sal_uLong
MakeSfx( OStringBuffer
& rAtrrArray
);
84 virtual void WriteSfx( SvIdlDataBase
& rBase
, SvStream
& rOutStm
);
85 bool ReadMethodArgs( SvIdlDataBase
& rBase
,
86 SvTokenStream
& rInStm
);
89 class SvMetaTypeString
: public SvMetaType
95 class SvMetaEnumValue
: public SvMetaObject
101 class SvMetaTypeEnum
: public SvMetaType
104 SvRefMemberList
<SvMetaEnumValue
*> aEnumValueList
;
109 class SvMetaTypevoid
: public SvMetaType
116 #endif // INCLUDED_IDL_INC_TYPES_HXX
118 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */