LCOV - code coverage report
Current view: top level - libreoffice/autodoc/source/ary/idl - i_service.cxx (source / functions) Hit Total Coverage
Test: libreoffice_filtered.info Lines: 48 48 100.0 %
Date: 2012-12-27 Functions: 19 19 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             : #include <precomp.h>
      21             : #include <ary/idl/i_service.hxx>
      22             : 
      23             : 
      24             : // NOT FULLY DECLARED SERVICES
      25             : #include <cosv/tpl/processor.hxx>
      26             : #include <ary/idl/ik_service.hxx>
      27             : #include <ary/doc/d_oldidldocu.hxx>
      28             : #include <sci_impl.hxx>
      29             : #include "i2s_calculator.hxx"
      30             : 
      31             : 
      32             : namespace ary
      33             : {
      34             : namespace idl
      35             : {
      36             : 
      37        1075 : Service::Service( const String &      i_sName,
      38             :                   Ce_id               i_nOwner )
      39             :     :   sName(i_sName),
      40             :         nOwner(i_nOwner),
      41             :         aIncludedServices(),
      42             :         aSupportedInterfaces(),
      43        1075 :         aProperties()
      44             : {
      45        1075 : }
      46             : 
      47        3225 : Service::~Service()
      48             : {
      49        5667 :     for ( RelationList::iterator it = aIncludedServices.begin();
      50        3778 :           it != aIncludedServices.end();
      51             :           ++it )
      52             :     {
      53         814 :         delete (*it).Info();
      54             :     }
      55             : 
      56        9072 :     for ( RelationList::iterator it = aSupportedInterfaces.begin();
      57        6048 :           it != aSupportedInterfaces.end();
      58             :           ++it )
      59             :     {
      60        1949 :         delete (*it).Info();
      61             :     }
      62        2150 : }
      63             : 
      64             : void
      65        3095 : Service::Get_SupportedInterfaces( Dyn_StdConstIterator<CommentedRelation> & o_rResult ) const
      66             : {
      67        3095 :     o_rResult = new SCI_Vector<CommentedRelation>(aSupportedInterfaces);
      68        3095 : }
      69             : 
      70             : void
      71        3091 : Service::Get_IncludedServices( Dyn_StdConstIterator<CommentedRelation> & o_rResult ) const
      72             : {
      73        3091 :     o_rResult = new SCI_Vector<CommentedRelation>(aIncludedServices);
      74        3091 : }
      75             : 
      76             : void
      77        2150 : Service::do_Accept( csv::ProcessorIfc & io_processor ) const
      78             : {
      79        2150 :     csv::CheckedCall(io_processor, *this);
      80        2150 : }
      81             : 
      82             : ClassId
      83       16733 : Service::get_AryClass() const
      84             : {
      85       16733 :     return class_id;
      86             : }
      87             : 
      88             : const String &
      89      197969 : Service::inq_LocalName() const
      90             : {
      91      197969 :     return sName;
      92             : }
      93             : 
      94             : Ce_id
      95       26059 : Service::inq_NameRoom() const
      96             : {
      97       26059 :     return nOwner;
      98             : }
      99             : 
     100             : Ce_id
     101        5316 : Service::inq_Owner() const
     102             : {
     103        5316 :     return nOwner;
     104             : }
     105             : 
     106             : E_SightLevel
     107       19093 : Service::inq_SightLevel() const
     108             : {
     109       19093 :     return sl_File;
     110             : }
     111             : 
     112             : 
     113             : namespace ifc_service
     114             : {
     115             : 
     116             : inline const Service &
     117        6450 : service_cast( const CodeEntity &  i_ce )
     118             : {
     119             :     csv_assert( i_ce.AryClass() == Service::class_id );
     120        6450 :     return static_cast< const Service& >(i_ce);
     121             : }
     122             : 
     123             : void
     124        2150 : attr::Get_IncludedServices( Dyn_StdConstIterator<CommentedRelation> & o_result,
     125             :                             const CodeEntity &                        i_ce )
     126             : {
     127        2150 :     o_result = new SCI_Vector<CommentedRelation>( service_cast(i_ce).aIncludedServices );
     128        2150 : }
     129             : 
     130             : void
     131        2150 : attr::Get_ExportedInterfaces( Dyn_StdConstIterator<CommentedRelation> & o_result,
     132             :                               const CodeEntity &                            i_ce )
     133             : {
     134        2150 :     o_result = new SCI_Vector<CommentedRelation>( service_cast(i_ce).aSupportedInterfaces );
     135        2150 : }
     136             : 
     137             : void
     138        2150 : attr::Get_Properties( Dyn_CeIterator &    o_result,
     139             :                       const CodeEntity &  i_ce )
     140             : {
     141        2150 :     o_result = new SCI_Vector<Ce_id>( service_cast(i_ce).aProperties );
     142        2150 : }
     143             : 
     144             : void
     145        1075 : xref::Get_IncludingServices( Dyn_CeIterator &    o_result,
     146             :                              const CodeEntity &  i_ce )
     147             : {
     148        1075 :     o_result = new SCI_Vector<Ce_id>(i_ce.Secondaries().List(service_2s_IncludingServices));
     149        1075 : }
     150             : 
     151             : void
     152        1075 : xref::Get_InstantiatingSingletons( Dyn_CeIterator &    o_result,
     153             :                                    const CodeEntity &  i_ce )
     154             : {
     155        1075 :     o_result = new SCI_Vector<Ce_id>(i_ce.Secondaries().List(service_2s_InstantiatingSingletons));
     156        1075 : }
     157             : 
     158             : 
     159             : } // namespace ifc_service
     160             : 
     161             : 
     162             : }   //  namespace   idl
     163           3 : }   //  namespace   ary
     164             : 
     165             : /* vim:set shiftwidth=4 softtabstop=4 expandtab: */

Generated by: LCOV version 1.10