LCOV - code coverage report
Current view: top level - libreoffice/autodoc/source/display/idl - hfi_siservice.cxx (source / functions) Hit Total Coverage
Test: libreoffice_filtered.info Lines: 57 57 100.0 %
Date: 2012-12-27 Functions: 7 8 87.5 %
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 "hfi_siservice.hxx"
      22             : 
      23             : 
      24             : // NOT FULLY DEFINED SERVICES
      25             : #include <ary/idl/i_ce.hxx>
      26             : #include <ary/idl/ik_function.hxx>
      27             : #include <ary/idl/ik_siservice.hxx>
      28             : #include <ary/doc/d_oldidldocu.hxx>
      29             : #include <toolkit/hf_docentry.hxx>
      30             : #include <toolkit/hf_linachain.hxx>
      31             : #include <toolkit/hf_navi_sub.hxx>
      32             : #include <toolkit/hf_title.hxx>
      33             : #include "hfi_doc.hxx"
      34             : #include "hfi_method.hxx"
      35             : #include "hfi_navibar.hxx"
      36             : #include "hfi_typetext.hxx"
      37             : #include "hi_env.hxx"
      38             : #include "hi_linkhelper.hxx"
      39             : 
      40             : 
      41             : 
      42             : namespace
      43             : {
      44             : 
      45             : const String
      46           1 :     C_sImplementedInterface("Supported Interface");
      47             : 
      48             : const String
      49           1 :     C_sList_Constructors("Constructors' Summary");
      50             : const String
      51           1 :     C_sList_Constructors_Label("ConstructorsSummary");
      52             : const String
      53           1 :     C_sDetails_Constructors("Constructors' Details");
      54             : const String
      55           1 :     C_sDetails_Constructors_Label("ConstructorsDetails");
      56             : 
      57             : 
      58             : enum E_SubListIndices
      59             : {
      60             :     sli_ConstructorsSummary = 0,
      61             :     sli_ConstructorsDetails = 1
      62             : };
      63             : 
      64             : } //anonymous namespace
      65             : 
      66             : 
      67         221 : HF_IdlSglIfcService::HF_IdlSglIfcService( Environment &         io_rEnv,
      68             :                                           Xml::Element &        o_rOut )
      69         221 :     :   HtmlFactory_Idl(io_rEnv, &o_rOut)
      70             : {
      71         221 : }
      72             : 
      73         221 : HF_IdlSglIfcService::~HF_IdlSglIfcService()
      74             : {
      75         221 : }
      76             : 
      77             : typedef ::ary::idl::ifc_sglifcservice::attr SglIfcServiceAttr;
      78             : 
      79             : void
      80         221 : HF_IdlSglIfcService::Produce_byData( const client & i_ce ) const
      81             : {
      82             :     Dyn<HF_NaviSubRow>
      83         221 :         pNaviSubRow( &make_Navibar(i_ce) );
      84             : 
      85             :     HF_TitleTable
      86         221 :         aTitle(CurOut());
      87             :     HF_LinkedNameChain
      88         221 :         aNameChain(aTitle.Add_Row());
      89             : 
      90         221 :     aNameChain.Produce_CompleteChain(Env().CurPosition(), nameChainLinker);
      91         221 :     produce_Title(aTitle, C_sCePrefix_Service, i_ce);
      92             : 
      93             :     HF_DocEntryList
      94         221 :         aTopList( aTitle.Add_Row() );
      95         221 :     aTopList.Produce_Term(C_sImplementedInterface);
      96             : 
      97             :     HF_IdlTypeText
      98         221 :         aImplementedInterface( Env(), aTopList.Produce_Definition(), &i_ce);
      99         221 :     aImplementedInterface.Produce_byData( SglIfcServiceAttr::BaseInterface(i_ce) );
     100             : 
     101         221 :     CurOut() << new Html::HorizontalLine;
     102             : 
     103         221 :     write_Docu(aTitle.Add_Row(), i_ce);
     104         221 :     CurOut() << new Html::HorizontalLine();
     105             : 
     106             :     dyn_ce_list
     107         221 :         dpConstructors;
     108         221 :     SglIfcServiceAttr::Get_Constructors(dpConstructors, i_ce);
     109         221 :     if ( (*dpConstructors).operator bool() )
     110             :     {
     111          60 :         produce_Members( *dpConstructors,
     112             :                          C_sList_Constructors,
     113             :                          C_sList_Constructors_Label,
     114             :                          C_sDetails_Constructors,
     115          60 :                          C_sDetails_Constructors_Label );
     116          60 :         pNaviSubRow->SwitchOn(sli_ConstructorsSummary);
     117          60 :         pNaviSubRow->SwitchOn(sli_ConstructorsDetails);
     118             :     }
     119             : 
     120         221 :     pNaviSubRow->Produce_Row();
     121         221 :     CurOut() << new Xml::XmlCode("<br>&nbsp;");
     122         221 : }
     123             : 
     124             : DYN HF_NaviSubRow &
     125         221 : HF_IdlSglIfcService::make_Navibar( const client & i_ce ) const
     126             : {
     127             :     HF_IdlNavigationBar
     128         221 :         aNaviBar(Env(), CurOut());
     129         221 :     aNaviBar.Produce_CeMainRow(i_ce, true);
     130             : 
     131             :     DYN HF_NaviSubRow &
     132         221 :         ret = aNaviBar.Add_SubRow();
     133         221 :     ret.AddItem(C_sList_Constructors, C_sList_Constructors_Label, false);
     134         221 :     ret.AddItem(C_sDetails_Constructors, C_sDetails_Constructors_Label, false);
     135             : 
     136         221 :     CurOut() << new Html::HorizontalLine();
     137         221 :     return ret;
     138             : }
     139             : 
     140             : typedef ary::idl::ifc_function::attr    funcAttr;
     141             : 
     142             : void
     143          93 : HF_IdlSglIfcService::produce_MemberDetails( HF_SubTitleTable &  o_table,
     144             :                                             const client &      i_ce ) const
     145             : {
     146             :     HF_IdlMethod
     147          93 :         aConstructor( Env(),
     148          93 :                       o_table.Add_Row()
     149         186 :                             >> *new Html::TableCell
     150         279 :                                 << new Html::ClassAttr(C_sCellStyle_MDetail) );
     151             : 
     152             :     ary::Dyn_StdConstIterator<ary::idl::Parameter>
     153          93 :         pParameters;
     154          93 :     funcAttr::Get_Parameters(pParameters, i_ce);
     155             : 
     156             :     ary::Dyn_StdConstIterator<ary::idl::Type_id>
     157          93 :         pExceptions;
     158          93 :     funcAttr::Get_Exceptions(pExceptions, i_ce);
     159             : 
     160          93 :     aConstructor.Produce_byData( i_ce.LocalName(),
     161             :                                  funcAttr::ReturnType(i_ce),
     162          93 :                                  *pParameters,
     163          93 :                                  *pExceptions,
     164          93 :                                  funcAttr::IsOneway(i_ce),
     165          93 :                                  funcAttr::HasEllipse(i_ce),
     166         372 :                                  i_ce );
     167          96 : }
     168             : 
     169             : /* vim:set shiftwidth=4 softtabstop=4 expandtab: */

Generated by: LCOV version 1.10