LibreOffice Module idl (master) 1
types.hxx
Go to the documentation of this file.
1/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2/*
3 * This file is part of the LibreOffice project.
4 *
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/.
8 *
9 * This file incorporates work covered by the following license notice:
10 *
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 .
18 */
19
20#ifndef INCLUDED_IDL_INC_TYPES_HXX
21#define INCLUDED_IDL_INC_TYPES_HXX
22
23#include <rtl/strbuf.hxx>
24#include <tools/ref.hxx>
25#include "basobj.hxx"
26
27class SvMetaType;
28class SvMetaSlot;
30
32{
33public:
38
39 void SetSlotId( const SvIdentifier & rId )
40 { aSlotId = rId; }
41 const SvIdentifier& GetSlotId() const;
42 SvMetaType * GetType() const;
43
44 virtual bool Test( SvTokenStream & rInStm );
45 virtual bool ReadSvIdl( SvIdlDataBase &, SvTokenStream & rInStm ) override;
46 size_t MakeSfx( OStringBuffer& rAtrrArray ) const;
47 virtual void Insert( SvSlotElementList& );
48};
49
51
53{
56 bool bIsItem;
57
58 void WriteSfxItem( std::string_view rItemName, SvIdlDataBase const & rBase,
59 SvStream & rOutStm );
60protected:
61 bool ReadHeaderSvIdl( SvTokenStream & rInStm );
62public:
63 SvMetaType();
64 SvMetaType( const OString& rTypeName );
65
66 virtual ~SvMetaType() override;
67
68 virtual void ReadContextSvIdl( SvIdlDataBase &, SvTokenStream & rInStm ) override;
69
71 GetAttrList() { return aAttrList; }
72 size_t GetAttrCount() const { return aAttrList.size(); }
73
74 void SetType( MetaTypeType nT );
76 SvMetaType * GetBaseType() const;
77 SvMetaType * GetReturnType() const;
78 void SetItem(bool b) { bIsItem = b; }
79 bool IsItem() const { return bIsItem; }
80
81 virtual bool ReadSvIdl( SvIdlDataBase &, SvTokenStream & rInStm ) override;
82
83 size_t MakeSfx( OStringBuffer& rAtrrArray );
84 virtual void WriteSfx( SvIdlDataBase & rBase, SvStream & rOutStm );
85 bool ReadMethodArgs( SvIdlDataBase & rBase,
86 SvTokenStream & rInStm );
87};
88
89class SvMetaTypeString final : public SvMetaType
90{
91public:
93};
94
95class SvMetaEnumValue final : public SvMetaObject
96{
97public:
99};
100
101class SvMetaTypeEnum final : public SvMetaType
102{
103public:
105 OString aPrefix;
107};
108
109class SvMetaTypevoid final : public SvMetaType
110{
111public:
113};
114
115
116#endif // INCLUDED_IDL_INC_TYPES_HXX
117
118/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
SvMetaType * GetType() const
Definition: types.cxx:39
const SvIdentifier & GetSlotId() const
Definition: types.cxx:45
virtual bool Test(SvTokenStream &rInStm)
Definition: types.cxx:51
SvIdentifier aSlotId
Definition: types.hxx:35
virtual bool ReadSvIdl(SvIdlDataBase &, SvTokenStream &rInStm) override
Definition: types.cxx:60
size_t MakeSfx(OStringBuffer &rAtrrArray) const
Definition: types.cxx:99
void SetSlotId(const SvIdentifier &rId)
Definition: types.hxx:39
tools::SvRef< SvMetaType > aType
Definition: types.hxx:34
virtual void Insert(SvSlotElementList &)
Definition: types.cxx:118
OString aPrefix
Definition: types.hxx:105
SvRefMemberList< SvMetaEnumValue * > aEnumValueList
Definition: types.hxx:104
bool IsItem() const
Definition: types.hxx:79
SvMetaType()
Definition: types.cxx:122
void SetItem(bool b)
Definition: types.hxx:78
MetaTypeType nType
Definition: types.hxx:55
virtual bool ReadSvIdl(SvIdlDataBase &, SvTokenStream &rInStm) override
Definition: types.cxx:177
bool ReadMethodArgs(SvIdlDataBase &rBase, SvTokenStream &rInStm)
Definition: types.cxx:285
bool ReadHeaderSvIdl(SvTokenStream &rInStm)
Definition: types.cxx:156
MetaTypeType GetMetaTypeType() const
Definition: types.hxx:75
SvRefMemberList< SvMetaAttribute * > & GetAttrList()
Definition: types.hxx:71
size_t MakeSfx(OStringBuffer &rAtrrArray)
Definition: types.cxx:199
void WriteSfxItem(std::string_view rItemName, SvIdlDataBase const &rBase, SvStream &rOutStm)
Definition: types.cxx:217
bool bIsItem
Definition: types.hxx:56
SvMetaType * GetBaseType() const
Definition: types.cxx:142
void SetType(MetaTypeType nT)
Definition: types.cxx:137
virtual void ReadContextSvIdl(SvIdlDataBase &, SvTokenStream &rInStm) override
Definition: types.cxx:188
virtual ~SvMetaType() override
Definition: types.cxx:134
SvRefMemberList< SvMetaAttribute * > aAttrList
Definition: types.hxx:54
SvMetaType * GetReturnType() const
Definition: types.cxx:149
size_t GetAttrCount() const
Definition: types.hxx:72
virtual void WriteSfx(SvIdlDataBase &rBase, SvStream &rOutStm)
Definition: types.cxx:274
MetaTypeType
Definition: types.hxx:50
@ Enum
Definition: types.hxx:50
@ Interface
Definition: types.hxx:50
@ Struct
Definition: types.hxx:50
@ Shell
Definition: types.hxx:50
@ Method
Definition: types.hxx:50
@ Base
Definition: types.hxx:50
SvRefMemberList< SvMetaSlot * > SvSlotElementList
Definition: types.hxx:28