LCOV - code coverage report
Current view: top level - libreoffice/autodoc/inc/ary/idl - i_interface.hxx (source / functions) Hit Total Coverage
Test: libreoffice_filtered.info Lines: 8 8 100.0 %
Date: 2012-12-27 Functions: 4 4 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_INTERFACE_HXX
      21             : #define ARY_IDL_I_INTERFACE_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             : 
      30             : 
      31             : 
      32             : 
      33             : namespace ary
      34             : {
      35             : namespace idl
      36             : {
      37             : namespace ifc_interface
      38             : {
      39             :     struct attr;
      40             : }
      41             :     class Interface_2s;
      42             : 
      43             : 
      44             : /** Represents an IDL interface.
      45             : */
      46             : class Interface : public CodeEntity
      47             : {
      48             :   public:
      49             :     enum E_ClassId { class_id = 2001 };
      50             : 
      51             :     // LIFECYCLE
      52             :                         Interface(
      53             :                             const String &      i_sName,
      54             :                             Ce_id               i_nOwner );
      55             :                         ~Interface();
      56             :     // INQUIRY
      57             :     bool                HasBase() const;
      58             : 
      59             :     // ACCESS
      60             :     void                Add_Function(
      61             :                             Ce_id               i_nId );
      62             :     void                Add_Attribute(
      63             :                             Ce_id               i_nId );
      64             :     void                Add_Base(
      65             :                             Type_id             i_nInterface,
      66             :                             DYN doc::OldIdlDocu *
      67             :                                                 pass_dpDocu );
      68             : 
      69             :   private:
      70             :     // Interface csv::ConstProcessorClient:
      71             :     virtual void        do_Accept(
      72             :                             csv::ProcessorIfc & io_processor ) const;
      73             :     // Interface ary::Object:
      74             :     virtual ClassId     get_AryClass() const;
      75             : 
      76             :     // Interface CodeEntity:
      77             :     virtual const String &  inq_LocalName() const;
      78             :     virtual Ce_id           inq_NameRoom() const;
      79             :     virtual Ce_id           inq_Owner() const;
      80             :     virtual E_SightLevel    inq_SightLevel() const;
      81             : 
      82             :     // Local
      83             :     typedef std::vector< CommentedRelation >    RelationList;
      84             :     typedef std::vector<Ce_id>                  MemberList;
      85             :     friend struct ifc_interface::attr;
      86             : 
      87             :     // DATA
      88             :     String              sName;
      89             :     Ce_id               nOwner;
      90             :     RelationList        aBases;
      91             :     MemberList          aFunctions;
      92             :     MemberList          aAttributes;
      93             :     Dyn<Interface_2s>   p2s;
      94             : };
      95             : 
      96             : 
      97             : 
      98             : 
      99             : // IMPLEMENTATION
     100             : inline bool
     101        1644 : Interface::HasBase() const
     102        1644 :     { return aBases.size() > 0; }
     103             : inline void
     104        5502 : Interface::Add_Function( Ce_id i_nId )
     105        5502 :     { aFunctions.push_back(i_nId); }
     106             : inline void
     107         513 : Interface::Add_Attribute( Ce_id i_nId )
     108         513 :     { aAttributes.push_back(i_nId); }
     109             : inline void
     110        1820 : Interface::Add_Base( Type_id                i_nInterface,
     111             :                      DYN doc::OldIdlDocu *  pass_dpDocu )
     112        1820 :     { aBases.push_back( CommentedRelation(i_nInterface, pass_dpDocu) ); }
     113             : 
     114             : 
     115             : 
     116             : 
     117             : }   // namespace idl
     118             : }   // namespace ary
     119             : #endif
     120             : 
     121             : /* vim:set shiftwidth=4 softtabstop=4 expandtab: */

Generated by: LCOV version 1.10