LCOV - code coverage report
Current view: top level - libreoffice/autodoc/inc/ary/idl - i_service.hxx (source / functions) Hit Total Coverage
Test: libreoffice_filtered.info Lines: 6 6 100.0 %
Date: 2012-12-27 Functions: 3 3 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 ARY_IDL_I_SERVICE_HXX
      21             : #define ARY_IDL_I_SERVICE_HXX
      22             : 
      23             : // BASE CLASSES
      24             : #include <ary/idl/i_ce.hxx>
      25             : 
      26             : // USED SERVICES
      27             : #include <ary/idl/i_comrela.hxx>
      28             : #include <ary/stdconstiter.hxx>
      29             : #include <ary/idl/ik_service.hxx>
      30             : 
      31             : 
      32             : 
      33             : 
      34             : namespace ary
      35             : {
      36             : namespace idl
      37             : {
      38             : namespace ifc_service
      39             : {
      40             :     struct attr;
      41             : }
      42             : 
      43             : 
      44             : /** Represents an IDL service.
      45             : */
      46             : class Service : public CodeEntity
      47             : {
      48             :   public:
      49             :     enum E_ClassId { class_id = 2003 };     // See reposy.cxx
      50             : 
      51             :     // LIFECYCLE
      52             :                         Service(
      53             :                             const String &      i_sName,
      54             :                             Ce_id               i_nOwner );
      55             :                         ~Service();
      56             : 
      57             :     // INQUIRY
      58             :     void                Get_SupportedInterfaces(
      59             :                             Dyn_StdConstIterator<CommentedRelation> &
      60             :                                                 o_rResult ) const;
      61             :     void                Get_IncludedServices(
      62             :                             Dyn_StdConstIterator<CommentedRelation> &
      63             :                                                 o_rResult ) const;
      64             : 
      65             :     // ACCESS
      66             :     void                Add_Property(
      67             :                             Ce_id               i_nProperty );
      68             :     void                AddRef_IncludedService(
      69             :                             Type_id             i_nService,
      70             :                             DYN doc::OldIdlDocu *
      71             :                                                 pass_dpDocu );
      72             :     void                AddRef_SupportedInterface(
      73             :                             Type_id             i_nInterface,
      74             :                             DYN doc::OldIdlDocu *
      75             :                                                 pass_dpDocu );
      76             :   private:
      77             :     // Interface csv::ConstProcessorClient:
      78             :     virtual void        do_Accept(
      79             :                             csv::ProcessorIfc & io_processor ) const;
      80             :     // Interface ary::Object:
      81             :     virtual ClassId     get_AryClass() const;
      82             : 
      83             :     // Interface CodeEntity
      84             :     virtual const String &  inq_LocalName() const;
      85             :     virtual Ce_id           inq_NameRoom() const;
      86             :     virtual Ce_id           inq_Owner() const;
      87             :     virtual E_SightLevel    inq_SightLevel() const;
      88             : 
      89             :     // Locals
      90             :     typedef std::vector< CommentedRelation >    RelationList;
      91             :     typedef std::vector<Ce_id>                  PropertyList;
      92             :     friend struct ifc_service::attr;
      93             : 
      94             :     // DATA
      95             :     String              sName;
      96             :     Ce_id               nOwner;
      97             : 
      98             :     RelationList        aIncludedServices;
      99             :     RelationList        aSupportedInterfaces;
     100             :     PropertyList        aProperties;
     101             : };
     102             : 
     103             : 
     104             : 
     105             : 
     106             : // IMPLEMENTATION
     107             : inline void
     108        3166 : Service::Add_Property( Ce_id i_nProperty )
     109        3166 :     { aProperties.push_back(i_nProperty); }
     110             : 
     111             : inline void
     112         814 : Service::AddRef_IncludedService( Type_id                    i_nService,
     113             :                                  DYN doc::OldIdlDocu  *     pass_dpDocu )
     114         814 :     { aIncludedServices.push_back( CommentedRelation(i_nService, pass_dpDocu) ); }
     115             : 
     116             : inline void
     117        1949 : Service::AddRef_SupportedInterface( Type_id                 i_nInterface,
     118             :                                     DYN doc::OldIdlDocu *   pass_dpDocu )
     119        1949 :     { aSupportedInterfaces.push_back( CommentedRelation(i_nInterface, pass_dpDocu) ); }
     120             : 
     121             : 
     122             : 
     123             : 
     124             : 
     125             : }   // namespace idl
     126             : }   // namespace ary
     127             : #endif
     128             : 
     129             : /* vim:set shiftwidth=4 softtabstop=4 expandtab: */

Generated by: LCOV version 1.10