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/solar.h>
25 #include <tools/ref.hxx>
30 typedef SvRefMemberList
< SvMetaSlot
* > SvSlotElementList
;
32 class SvMetaAttribute
: public SvMetaReference
35 tools::SvRef
<SvMetaType
> aType
;
38 SvMetaAttribute( SvMetaType
* );
40 void SetSlotId( const SvIdentifier
& rId
)
42 const SvIdentifier
& GetSlotId() const;
43 SvMetaType
* GetType() const;
45 virtual bool Test( SvTokenStream
& rInStm
);
46 virtual bool ReadSvIdl( SvIdlDataBase
&, SvTokenStream
& rInStm
) override
;
47 sal_uLong
MakeSfx( OStringBuffer
& rAtrrArray
) const;
48 virtual void Insert( SvSlotElementList
& );
51 enum MetaTypeType
{ Method
, Struct
, Base
, Enum
, Interface
, Shell
};
53 class SvMetaType
: public SvMetaReference
55 SvRefMemberList
<SvMetaAttribute
*> aAttrList
;
59 void WriteSfxItem( const OString
& rItemName
, SvIdlDataBase
const & rBase
,
62 bool ReadHeaderSvIdl( SvTokenStream
& rInStm
);
65 SvMetaType( const OString
& rTypeName
);
67 virtual ~SvMetaType() override
;
69 virtual void ReadContextSvIdl( SvIdlDataBase
&, SvTokenStream
& rInStm
) override
;
71 SvRefMemberList
<SvMetaAttribute
*>&
72 GetAttrList() { return aAttrList
; }
73 sal_uLong
GetAttrCount() const { return aAttrList
.size(); }
75 void SetType( MetaTypeType nT
);
76 MetaTypeType
GetMetaTypeType() const { return nType
; }
77 SvMetaType
* GetBaseType() const;
78 SvMetaType
* GetReturnType() const;
79 void SetItem(bool b
) { bIsItem
= b
; }
80 bool IsItem() const { return bIsItem
; }
82 virtual bool ReadSvIdl( SvIdlDataBase
&, SvTokenStream
& rInStm
) override
;
84 sal_uLong
MakeSfx( OStringBuffer
& rAtrrArray
);
85 virtual void WriteSfx( SvIdlDataBase
& rBase
, SvStream
& rOutStm
);
86 bool ReadMethodArgs( SvIdlDataBase
& rBase
,
87 SvTokenStream
& rInStm
);
90 class SvMetaTypeString
: public SvMetaType
96 class SvMetaEnumValue
: public SvMetaObject
102 class SvMetaTypeEnum
: public SvMetaType
105 SvRefMemberList
<SvMetaEnumValue
*> aEnumValueList
;
110 class SvMetaTypevoid
: public SvMetaType
117 #endif // INCLUDED_IDL_INC_TYPES_HXX
119 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */