2010-10-27 13:11:31 +01:00
|
|
|
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
|
2012-07-11 19:49:09 +01:00
|
|
|
/*
|
|
|
|
* This file is part of the LibreOffice project.
|
|
|
|
*
|
|
|
|
* This Source Code Form is subject to the terms of the Mozilla Public
|
|
|
|
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
|
|
|
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
|
|
|
*
|
|
|
|
* This file incorporates work covered by the following license notice:
|
|
|
|
*
|
|
|
|
* Licensed to the Apache Software Foundation (ASF) under one or more
|
|
|
|
* contributor license agreements. See the NOTICE file distributed
|
|
|
|
* with this work for additional information regarding copyright
|
|
|
|
* ownership. The ASF licenses this file to you under the Apache
|
|
|
|
* License, Version 2.0 (the "License"); you may not use this file
|
|
|
|
* except in compliance with the License. You may obtain a copy of
|
|
|
|
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
|
|
|
|
*/
|
2000-09-18 15:33:13 +00:00
|
|
|
|
2014-04-18 22:32:17 +02:00
|
|
|
#ifndef INCLUDED_IDL_INC_OBJECT_HXX
|
|
|
|
#define INCLUDED_IDL_INC_OBJECT_HXX
|
2000-09-18 15:33:13 +00:00
|
|
|
|
|
|
|
#include <types.hxx>
|
|
|
|
#include <slot.hxx>
|
2010-12-30 07:02:52 -08:00
|
|
|
#include <vector>
|
2000-09-18 15:33:13 +00:00
|
|
|
|
|
|
|
struct SvSlotElement
|
|
|
|
{
|
|
|
|
SvMetaSlotRef xSlot;
|
2013-04-07 12:06:47 +02:00
|
|
|
OString aPrefix;
|
|
|
|
SvSlotElement( SvMetaSlot * pS, const OString& rPrefix )
|
2012-01-26 09:46:41 +00:00
|
|
|
: xSlot( pS )
|
|
|
|
, aPrefix( rPrefix )
|
|
|
|
{
|
|
|
|
}
|
2000-09-18 15:33:13 +00:00
|
|
|
};
|
2011-04-20 20:59:37 -07:00
|
|
|
typedef std::vector< SvSlotElement* > SvSlotElementList;
|
2010-12-30 07:02:52 -08:00
|
|
|
|
2000-09-18 15:33:13 +00:00
|
|
|
class SvMetaClass;
|
2010-12-30 07:02:52 -08:00
|
|
|
typedef ::std::vector< SvMetaClass* > SvMetaClassList;
|
2000-09-18 15:33:13 +00:00
|
|
|
|
2014-04-07 12:31:09 +02:00
|
|
|
typedef tools::SvRef<SvMetaClass> SvMetaClassRef;
|
2014-10-16 08:12:19 +02:00
|
|
|
class SvClassElement : public SvRttiBase
|
2000-09-18 15:33:13 +00:00
|
|
|
{
|
|
|
|
SvBOOL aAutomation;
|
2013-04-07 12:06:47 +02:00
|
|
|
OString aPrefix;
|
2000-09-18 15:33:13 +00:00
|
|
|
SvMetaClassRef xClass;
|
|
|
|
public:
|
2014-10-16 08:12:19 +02:00
|
|
|
TYPEINFO_OVERRIDE();
|
2000-09-18 15:33:13 +00:00
|
|
|
SvClassElement();
|
|
|
|
|
2013-04-07 12:06:47 +02:00
|
|
|
void SetPrefix( const OString& rPrefix )
|
2000-09-18 15:33:13 +00:00
|
|
|
{ aPrefix = rPrefix; }
|
2013-04-07 12:06:47 +02:00
|
|
|
const OString& GetPrefix() const
|
2000-09-18 15:33:13 +00:00
|
|
|
{ return aPrefix; }
|
|
|
|
|
2014-05-08 11:42:16 +02:00
|
|
|
void SetAutomation( bool rAutomation )
|
2000-09-18 15:33:13 +00:00
|
|
|
{ aAutomation = rAutomation; }
|
2014-05-08 11:42:16 +02:00
|
|
|
bool GetAutomation() const
|
2000-09-18 15:33:13 +00:00
|
|
|
{ return aAutomation; }
|
|
|
|
|
|
|
|
void SetClass( SvMetaClass * pClass )
|
|
|
|
{ xClass = pClass; }
|
|
|
|
SvMetaClass * GetClass() const
|
|
|
|
{ return xClass; }
|
|
|
|
};
|
|
|
|
|
2014-04-07 12:31:09 +02:00
|
|
|
typedef tools::SvRef<SvClassElement> SvClassElementRef;
|
2000-09-18 15:33:13 +00:00
|
|
|
|
2014-10-16 08:12:19 +02:00
|
|
|
class SvClassElementMemberList : public SvRefMemberList<SvClassElement *> {};
|
2012-08-07 16:56:51 +02:00
|
|
|
|
2014-10-16 08:12:19 +02:00
|
|
|
class SvMetaClassMemberList : public SvRefMemberList<SvMetaClass *> {};
|
2012-08-07 16:56:51 +02:00
|
|
|
|
2000-09-18 15:33:13 +00:00
|
|
|
class SvMetaClass : public SvMetaType
|
|
|
|
{
|
|
|
|
SvMetaAttributeMemberList aAttrList;
|
|
|
|
SvClassElementMemberList aClassList;
|
|
|
|
SvMetaClassRef aSuperClass;
|
|
|
|
SvBOOL aAutomation;
|
|
|
|
SvMetaClassRef xAutomationInterface;
|
|
|
|
|
2014-05-08 11:42:16 +02:00
|
|
|
bool TestAttribute( SvIdlDataBase & rBase, SvTokenStream & rInStm,
|
2000-09-18 15:33:13 +00:00
|
|
|
SvMetaAttribute & rAttr ) const;
|
2013-04-07 12:06:47 +02:00
|
|
|
void WriteSlotStubs( const OString& rShellName,
|
2000-09-18 15:33:13 +00:00
|
|
|
SvSlotElementList & rSlotList,
|
|
|
|
ByteStringList & rList,
|
|
|
|
SvStream & rOutStm );
|
2010-11-03 15:49:08 +01:00
|
|
|
sal_uInt16 WriteSlotParamArray( SvIdlDataBase & rBase,
|
2000-09-18 15:33:13 +00:00
|
|
|
SvSlotElementList & rSlotList,
|
|
|
|
SvStream & rOutStm );
|
2013-04-07 12:06:47 +02:00
|
|
|
sal_uInt16 WriteSlots( const OString& rShellName, sal_uInt16 nCount,
|
2000-09-18 15:33:13 +00:00
|
|
|
SvSlotElementList & rSlotList,
|
|
|
|
SvIdlDataBase & rBase,
|
|
|
|
SvStream & rOutStm );
|
|
|
|
|
2011-03-12 02:42:58 +01:00
|
|
|
void InsertSlots( SvSlotElementList& rList, std::vector<sal_uLong>& rSuperList,
|
2000-09-18 15:33:13 +00:00
|
|
|
SvMetaClassList & rClassList,
|
2013-04-07 12:06:47 +02:00
|
|
|
const OString& rPrefix, SvIdlDataBase& rBase );
|
2000-09-18 15:33:13 +00:00
|
|
|
|
|
|
|
protected:
|
|
|
|
virtual void ReadAttributesSvIdl( SvIdlDataBase & rBase,
|
2014-03-26 16:37:00 +01:00
|
|
|
SvTokenStream & rInStm ) SAL_OVERRIDE;
|
2000-09-18 15:33:13 +00:00
|
|
|
virtual void ReadContextSvIdl( SvIdlDataBase &,
|
2014-03-26 16:37:00 +01:00
|
|
|
SvTokenStream & rInStm ) SAL_OVERRIDE;
|
2000-09-18 15:33:13 +00:00
|
|
|
public:
|
2014-10-16 08:12:19 +02:00
|
|
|
TYPEINFO_OVERRIDE();
|
2000-09-18 15:33:13 +00:00
|
|
|
SvMetaClass();
|
|
|
|
|
2014-05-08 11:42:16 +02:00
|
|
|
bool GetAutomation() const
|
2000-09-18 15:33:13 +00:00
|
|
|
{ return aAutomation; }
|
|
|
|
SvMetaClass * GetSuperClass() const
|
|
|
|
{ return aSuperClass; }
|
|
|
|
|
|
|
|
void FillClasses( SvMetaClassList & rList );
|
|
|
|
|
|
|
|
const SvClassElementMemberList&
|
|
|
|
GetClassList() const
|
|
|
|
{ return aClassList; }
|
|
|
|
|
2014-05-08 11:42:16 +02:00
|
|
|
virtual bool ReadSvIdl( SvIdlDataBase &, SvTokenStream & rInStm ) SAL_OVERRIDE;
|
2014-03-26 16:37:00 +01:00
|
|
|
virtual void WriteSfx( SvIdlDataBase & rBase, SvStream & rOutStm ) SAL_OVERRIDE;
|
2000-09-18 15:33:13 +00:00
|
|
|
};
|
|
|
|
|
2014-04-18 22:32:17 +02:00
|
|
|
#endif // INCLUDED_IDL_INC_OBJECT_HXX
|
2000-09-18 15:33:13 +00:00
|
|
|
|
2010-10-27 13:11:31 +01:00
|
|
|
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
|