LibreOffice Module idl (master) 1
object.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_OBJECT_HXX
21#define INCLUDED_IDL_INC_OBJECT_HXX
22
23#include "types.hxx"
24
25#include <tools/solar.h>
26
27#include <vector>
28
29class SvMetaClass;
30typedef ::std::vector< SvMetaClass* > SvMetaClassList;
31
33{
34 OString aPrefix;
36public:
38 SvClassElement(SvMetaClass* pClass) { xClass = pClass; }
39
40 void SetPrefix( const OString& rPrefix )
41 { aPrefix = rPrefix; }
42 const OString& GetPrefix() const
43 { return aPrefix; }
44
45 void SetClass( SvMetaClass * pClass )
46 { xClass = pClass; }
48 { return xClass.get(); }
49};
50
51
52class SvMetaClass : public SvMetaType
53{
54public:
56 std::vector<SvClassElement> aClassElementList;
58 bool TestAttribute( SvIdlDataBase & rBase, SvTokenStream & rInStm,
59 SvMetaAttribute & rAttr ) const;
60private:
61
62 static void WriteSlotStubs( std::string_view rShellName,
63 SvSlotElementList & rSlotList,
64 std::vector<OString> & rList,
65 SvStream & rOutStm );
66 static sal_uInt16 WriteSlotParamArray( SvIdlDataBase & rBase,
67 SvSlotElementList & rSlotList,
68 SvStream & rOutStm );
69 static sal_uInt16 WriteSlots( std::string_view rShellName,
70 SvSlotElementList & rSlotList,
71 SvIdlDataBase & rBase,
72 SvStream & rOutStm );
73
74 void InsertSlots( SvSlotElementList& rList, std::vector<sal_uInt32>& rSuperList,
75 SvMetaClassList & rClassList,
76 const OString& rPrefix, SvIdlDataBase& rBase );
77
78public:
80 virtual void ReadContextSvIdl( SvIdlDataBase &,
81 SvTokenStream & rInStm ) override;
82
83 void FillClasses( SvMetaClassList & rList );
84
85 virtual void WriteSfx( SvIdlDataBase & rBase, SvStream & rOutStm ) override;
86};
87
88#endif // INCLUDED_IDL_INC_OBJECT_HXX
89
90/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
SvClassElement(SvMetaClass *pClass)
Definition: object.hxx:38
const OString & GetPrefix() const
Definition: object.hxx:42
OString aPrefix
Definition: object.hxx:34
void SetClass(SvMetaClass *pClass)
Definition: object.hxx:45
tools::SvRef< SvMetaClass > xClass
Definition: object.hxx:35
void SetPrefix(const OString &rPrefix)
Definition: object.hxx:40
SvMetaClass * GetClass() const
Definition: object.hxx:47
SvRefMemberList< SvMetaAttribute * > aAttrList
Definition: object.hxx:57
bool TestAttribute(SvIdlDataBase &rBase, SvTokenStream &rInStm, SvMetaAttribute &rAttr) const
Definition: object.cxx:101
void FillClasses(SvMetaClassList &rList)
Definition: object.cxx:229
virtual void WriteSfx(SvIdlDataBase &rBase, SvStream &rOutStm) override
Definition: object.cxx:265
static void WriteSlotStubs(std::string_view rShellName, SvSlotElementList &rSlotList, std::vector< OString > &rList, SvStream &rOutStm)
Definition: object.cxx:252
void InsertSlots(SvSlotElementList &rList, std::vector< sal_uInt32 > &rSuperList, SvMetaClassList &rClassList, const OString &rPrefix, SvIdlDataBase &rBase)
Definition: object.cxx:167
static sal_uInt16 WriteSlots(std::string_view rShellName, SvSlotElementList &rSlotList, SvIdlDataBase &rBase, SvStream &rOutStm)
Definition: object.cxx:150
virtual void ReadContextSvIdl(SvIdlDataBase &, SvTokenStream &rInStm) override
Definition: object.cxx:41
std::vector< SvClassElement > aClassElementList
Definition: object.hxx:56
static sal_uInt16 WriteSlotParamArray(SvIdlDataBase &rBase, SvSlotElementList &rSlotList, SvStream &rOutStm)
Definition: object.cxx:136
SvMetaClass()
Definition: object.cxx:37
tools::SvRef< SvMetaClass > aSuperClass
Definition: object.hxx:55
T * get() const
::std::vector< SvMetaClass * > SvMetaClassList
Definition: object.hxx:29