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 .
22 #include <rtl/strbuf.hxx>
23 #include <tools/ref.hxx>
28 typedef SvRefMemberList
< SvMetaSlot
* > SvSlotElementList
;
30 class SvMetaAttribute
: public SvMetaReference
33 tools::SvRef
<SvMetaType
> aType
;
36 SvMetaAttribute( SvMetaType
* );
38 void SetSlotId( const SvIdentifier
& rId
)
40 const SvIdentifier
& GetSlotId() const;
41 SvMetaType
* GetType() const;
43 virtual bool Test( SvTokenStream
& rInStm
);
44 virtual bool ReadSvIdl( SvIdlDataBase
&, SvTokenStream
& rInStm
) override
;
45 size_t MakeSfx( OStringBuffer
& rAtrrArray
) const;
46 virtual void Insert( SvSlotElementList
& );
49 enum MetaTypeType
{ Method
, Struct
, Base
, Enum
, Interface
, Shell
};
51 class SvMetaType
: public SvMetaReference
53 SvRefMemberList
<SvMetaAttribute
*> aAttrList
;
57 void WriteSfxItem( std::string_view rItemName
, SvIdlDataBase
const & rBase
,
60 bool ReadHeaderSvIdl( SvTokenStream
& rInStm
);
63 SvMetaType( const OString
& rTypeName
);
65 virtual ~SvMetaType() override
;
67 virtual void ReadContextSvIdl( SvIdlDataBase
&, SvTokenStream
& rInStm
) override
;
69 SvRefMemberList
<SvMetaAttribute
*>&
70 GetAttrList() { return aAttrList
; }
71 size_t GetAttrCount() const { return aAttrList
.size(); }
73 void SetType( MetaTypeType nT
);
74 MetaTypeType
GetMetaTypeType() const { return nType
; }
75 SvMetaType
* GetBaseType() const;
76 SvMetaType
* GetReturnType() const;
77 void SetItem(bool b
) { bIsItem
= b
; }
78 bool IsItem() const { return bIsItem
; }
80 virtual bool ReadSvIdl( SvIdlDataBase
&, SvTokenStream
& rInStm
) override
;
82 size_t MakeSfx( OStringBuffer
& rAtrrArray
);
83 virtual void WriteSfx( SvIdlDataBase
& rBase
, SvStream
& rOutStm
);
84 bool ReadMethodArgs( SvIdlDataBase
& rBase
,
85 SvTokenStream
& rInStm
);
88 class SvMetaTypeString final
: public SvMetaType
94 class SvMetaEnumValue final
: public SvMetaObject
100 class SvMetaTypeEnum final
: public SvMetaType
103 SvRefMemberList
<SvMetaEnumValue
*> aEnumValueList
;
108 class SvMetaTypevoid final
: public SvMetaType
114 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */