LCOV - code coverage report
Current view: top level - idl/inc - object.hxx (source / functions) Hit Total Coverage
Test: commit c8344322a7af75b84dd3ca8f78b05543a976dfd5 Lines: 18 18 100.0 %
Date: 2015-06-13 12:38:46 Functions: 15 15 100.0 %
Legend: Lines: hit not hit

          Line data    Source code
       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             : #include <slot.hxx>
      25             : #include <vector>
      26             : 
      27        5951 : struct SvSlotElement
      28             : {
      29             :     SvMetaSlotRef   xSlot;
      30             :     OString aPrefix;
      31        5951 :     SvSlotElement( SvMetaSlot * pS, const OString& rPrefix )
      32             :     : xSlot( pS )
      33        5951 :     , aPrefix( rPrefix )
      34             :     {
      35        5951 :     }
      36             : };
      37             : typedef std::vector< SvSlotElement* > SvSlotElementList;
      38             : 
      39             : class SvMetaClass;
      40             : typedef ::std::vector< SvMetaClass* > SvMetaClassList;
      41             : 
      42             : typedef tools::SvRef<SvMetaClass> SvMetaClassRef;
      43         224 : class SvClassElement : public SvRttiBase
      44             : {
      45             :     SvBOOL                      aAutomation;
      46             :     OString                aPrefix;
      47             :     SvMetaClassRef              xClass;
      48             : public:
      49             :             TYPEINFO_OVERRIDE();
      50             :             SvClassElement();
      51             : 
      52           7 :     void            SetPrefix( const OString& rPrefix )
      53           7 :                     { aPrefix = rPrefix; }
      54          94 :     const OString&  GetPrefix() const
      55          94 :                     { return aPrefix; }
      56             : 
      57          59 :     void            SetAutomation( bool rAutomation )
      58          59 :                     { aAutomation = rAutomation; }
      59             :     bool            GetAutomation() const
      60             :                     { return aAutomation; }
      61             : 
      62         112 :     void            SetClass( SvMetaClass * pClass )
      63         112 :                     { xClass = pClass; }
      64         135 :     SvMetaClass *   GetClass() const
      65         135 :                     { return xClass; }
      66             : };
      67             : 
      68             : typedef tools::SvRef<SvClassElement> SvClassElementRef;
      69             : 
      70         380 : class SvClassElementMemberList : public SvRefMemberList<SvClassElement *> {};
      71             : 
      72          32 : class SvMetaClassMemberList : public SvRefMemberList<SvMetaClass *> {};
      73             : 
      74         380 : class SvMetaClass : public SvMetaType
      75             : {
      76             :     SvMetaAttributeMemberList   aAttrList;
      77             :     SvClassElementMemberList    aClassList;
      78             :     SvMetaClassRef              aSuperClass;
      79             :     SvBOOL                      aAutomation;
      80             :     SvMetaClassRef              xAutomationInterface;
      81             : 
      82             :     bool                    TestAttribute( SvIdlDataBase & rBase, SvTokenStream & rInStm,
      83             :                                      SvMetaAttribute & rAttr ) const;
      84             :     static void             WriteSlotStubs( const OString& rShellName,
      85             :                                         SvSlotElementList & rSlotList,
      86             :                                         ByteStringList & rList,
      87             :                                         SvStream & rOutStm );
      88             :     static sal_uInt16       WriteSlotParamArray( SvIdlDataBase & rBase,
      89             :                                             SvSlotElementList & rSlotList,
      90             :                                             SvStream & rOutStm );
      91             :     static sal_uInt16       WriteSlots( const OString& rShellName, sal_uInt16 nCount,
      92             :                                     SvSlotElementList & rSlotList,
      93             :                                     SvIdlDataBase & rBase,
      94             :                                     SvStream & rOutStm );
      95             : 
      96             :     void                    InsertSlots( SvSlotElementList& rList, std::vector<sal_uLong>& rSuperList,
      97             :                                     SvMetaClassList & rClassList,
      98             :                                     const OString& rPrefix, SvIdlDataBase& rBase );
      99             : 
     100             : protected:
     101             :     virtual void    ReadAttributesSvIdl( SvIdlDataBase & rBase,
     102             :                                       SvTokenStream & rInStm ) SAL_OVERRIDE;
     103             :     virtual void    ReadContextSvIdl( SvIdlDataBase &,
     104             :                                      SvTokenStream & rInStm ) SAL_OVERRIDE;
     105             : public:
     106             :             TYPEINFO_OVERRIDE();
     107             :             SvMetaClass();
     108             : 
     109             :     bool                GetAutomation() const
     110             :                         { return aAutomation; }
     111             :     SvMetaClass *       GetSuperClass() const
     112             :                         { return aSuperClass; }
     113             : 
     114             :     void                FillClasses( SvMetaClassList & rList );
     115             : 
     116             :     const SvClassElementMemberList&
     117             :                         GetClassList() const
     118             :                         { return aClassList; }
     119             : 
     120             :     virtual bool        ReadSvIdl( SvIdlDataBase &, SvTokenStream & rInStm ) SAL_OVERRIDE;
     121             :     virtual void        WriteSfx( SvIdlDataBase & rBase, SvStream & rOutStm ) SAL_OVERRIDE;
     122             : };
     123             : 
     124             : #endif // INCLUDED_IDL_INC_OBJECT_HXX
     125             : 
     126             : /* vim:set shiftwidth=4 softtabstop=4 expandtab: */

Generated by: LCOV version 1.11