Version 6.1.4.1, tag libreoffice-6.1.4.1
[LibreOffice.git] / idl / inc / object.hxx
blobd385fe0367cc681ef1f24dbde37ce95d7cce9b6d
1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 /*
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
23 #include "types.hxx"
24 #include "slot.hxx"
25 #include <vector>
27 class SvMetaClass;
28 typedef ::std::vector< SvMetaClass* > SvMetaClassList;
30 class SvClassElement
32 OString aPrefix;
33 tools::SvRef<SvMetaClass> xClass;
34 public:
35 SvClassElement();
36 SvClassElement(SvMetaClass* pClass) { xClass = pClass; }
38 void SetPrefix( const OString& rPrefix )
39 { aPrefix = rPrefix; }
40 const OString& GetPrefix() const
41 { return aPrefix; }
43 void SetClass( SvMetaClass * pClass )
44 { xClass = pClass; }
45 SvMetaClass * GetClass() const
46 { return xClass.get(); }
50 class SvMetaClass : public SvMetaType
52 public:
53 tools::SvRef<SvMetaClass> aSuperClass;
54 std::vector<SvClassElement> aClassElementList;
55 SvRefMemberList<SvMetaAttribute *> aAttrList;
56 bool TestAttribute( SvIdlDataBase & rBase, SvTokenStream & rInStm,
57 SvMetaAttribute & rAttr ) const;
58 private:
60 static void WriteSlotStubs( const OString& rShellName,
61 SvSlotElementList & rSlotList,
62 ByteStringList & rList,
63 SvStream & rOutStm );
64 static sal_uInt16 WriteSlotParamArray( SvIdlDataBase & rBase,
65 SvSlotElementList & rSlotList,
66 SvStream & rOutStm );
67 static sal_uInt16 WriteSlots( const OString& rShellName,
68 SvSlotElementList & rSlotList,
69 SvIdlDataBase & rBase,
70 SvStream & rOutStm );
72 void InsertSlots( SvSlotElementList& rList, std::vector<sal_uLong>& rSuperList,
73 SvMetaClassList & rClassList,
74 const OString& rPrefix, SvIdlDataBase& rBase );
76 public:
77 SvMetaClass();
78 virtual void ReadContextSvIdl( SvIdlDataBase &,
79 SvTokenStream & rInStm ) override;
81 void FillClasses( SvMetaClassList & rList );
83 virtual void WriteSfx( SvIdlDataBase & rBase, SvStream & rOutStm ) override;
86 #endif // INCLUDED_IDL_INC_OBJECT_HXX
88 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */