xref: /trunk/main/autodoc/source/display/idl/hfi_siservice.cxx (revision cdf0e10c4e3984b49a9502b011690b615761d4a3)
1*cdf0e10cSrcweir /*************************************************************************
2*cdf0e10cSrcweir  *
3*cdf0e10cSrcweir  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4*cdf0e10cSrcweir  *
5*cdf0e10cSrcweir  * Copyright 2000, 2010 Oracle and/or its affiliates.
6*cdf0e10cSrcweir  *
7*cdf0e10cSrcweir  * OpenOffice.org - a multi-platform office productivity suite
8*cdf0e10cSrcweir  *
9*cdf0e10cSrcweir  * This file is part of OpenOffice.org.
10*cdf0e10cSrcweir  *
11*cdf0e10cSrcweir  * OpenOffice.org is free software: you can redistribute it and/or modify
12*cdf0e10cSrcweir  * it under the terms of the GNU Lesser General Public License version 3
13*cdf0e10cSrcweir  * only, as published by the Free Software Foundation.
14*cdf0e10cSrcweir  *
15*cdf0e10cSrcweir  * OpenOffice.org is distributed in the hope that it will be useful,
16*cdf0e10cSrcweir  * but WITHOUT ANY WARRANTY; without even the implied warranty of
17*cdf0e10cSrcweir  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
18*cdf0e10cSrcweir  * GNU Lesser General Public License version 3 for more details
19*cdf0e10cSrcweir  * (a copy is included in the LICENSE file that accompanied this code).
20*cdf0e10cSrcweir  *
21*cdf0e10cSrcweir  * You should have received a copy of the GNU Lesser General Public License
22*cdf0e10cSrcweir  * version 3 along with OpenOffice.org.  If not, see
23*cdf0e10cSrcweir  * <http://www.openoffice.org/license.html>
24*cdf0e10cSrcweir  * for a copy of the LGPLv3 License.
25*cdf0e10cSrcweir  *
26*cdf0e10cSrcweir  ************************************************************************/
27*cdf0e10cSrcweir 
28*cdf0e10cSrcweir #include <precomp.h>
29*cdf0e10cSrcweir #include "hfi_siservice.hxx"
30*cdf0e10cSrcweir 
31*cdf0e10cSrcweir 
32*cdf0e10cSrcweir // NOT FULLY DEFINED SERVICES
33*cdf0e10cSrcweir #include <ary/idl/i_ce.hxx>
34*cdf0e10cSrcweir #include <ary/idl/ik_function.hxx>
35*cdf0e10cSrcweir #include <ary/idl/ik_siservice.hxx>
36*cdf0e10cSrcweir #include <ary/doc/d_oldidldocu.hxx>
37*cdf0e10cSrcweir #include <toolkit/hf_docentry.hxx>
38*cdf0e10cSrcweir #include <toolkit/hf_linachain.hxx>
39*cdf0e10cSrcweir #include <toolkit/hf_navi_sub.hxx>
40*cdf0e10cSrcweir #include <toolkit/hf_title.hxx>
41*cdf0e10cSrcweir #include "hfi_doc.hxx"
42*cdf0e10cSrcweir #include "hfi_method.hxx"
43*cdf0e10cSrcweir #include "hfi_navibar.hxx"
44*cdf0e10cSrcweir #include "hfi_typetext.hxx"
45*cdf0e10cSrcweir #include "hi_env.hxx"
46*cdf0e10cSrcweir #include "hi_linkhelper.hxx"
47*cdf0e10cSrcweir 
48*cdf0e10cSrcweir 
49*cdf0e10cSrcweir 
50*cdf0e10cSrcweir namespace
51*cdf0e10cSrcweir {
52*cdf0e10cSrcweir 
53*cdf0e10cSrcweir const String
54*cdf0e10cSrcweir     C_sImplementedInterface("Supported Interface");
55*cdf0e10cSrcweir 
56*cdf0e10cSrcweir const String
57*cdf0e10cSrcweir     C_sList_Constructors("Constructors' Summary");
58*cdf0e10cSrcweir const String
59*cdf0e10cSrcweir     C_sList_Constructors_Label("ConstructorsSummary");
60*cdf0e10cSrcweir const String
61*cdf0e10cSrcweir     C_sDetails_Constructors("Constructors' Details");
62*cdf0e10cSrcweir const String
63*cdf0e10cSrcweir     C_sDetails_Constructors_Label("ConstructorsDetails");
64*cdf0e10cSrcweir 
65*cdf0e10cSrcweir 
66*cdf0e10cSrcweir enum E_SubListIndices
67*cdf0e10cSrcweir {
68*cdf0e10cSrcweir     sli_ConstructorsSummary = 0,
69*cdf0e10cSrcweir     sli_ConstructorsDetails = 1
70*cdf0e10cSrcweir };
71*cdf0e10cSrcweir 
72*cdf0e10cSrcweir } //anonymous namespace
73*cdf0e10cSrcweir 
74*cdf0e10cSrcweir 
75*cdf0e10cSrcweir HF_IdlSglIfcService::HF_IdlSglIfcService( Environment &         io_rEnv,
76*cdf0e10cSrcweir                                           Xml::Element &        o_rOut )
77*cdf0e10cSrcweir     :   HtmlFactory_Idl(io_rEnv, &o_rOut)
78*cdf0e10cSrcweir {
79*cdf0e10cSrcweir }
80*cdf0e10cSrcweir 
81*cdf0e10cSrcweir HF_IdlSglIfcService::~HF_IdlSglIfcService()
82*cdf0e10cSrcweir {
83*cdf0e10cSrcweir }
84*cdf0e10cSrcweir 
85*cdf0e10cSrcweir typedef ::ary::idl::ifc_sglifcservice::attr SglIfcServiceAttr;
86*cdf0e10cSrcweir 
87*cdf0e10cSrcweir void
88*cdf0e10cSrcweir HF_IdlSglIfcService::Produce_byData( const client & i_ce ) const
89*cdf0e10cSrcweir {
90*cdf0e10cSrcweir     Dyn<HF_NaviSubRow>
91*cdf0e10cSrcweir         pNaviSubRow( &make_Navibar(i_ce) );
92*cdf0e10cSrcweir 
93*cdf0e10cSrcweir     HF_TitleTable
94*cdf0e10cSrcweir         aTitle(CurOut());
95*cdf0e10cSrcweir     HF_LinkedNameChain
96*cdf0e10cSrcweir         aNameChain(aTitle.Add_Row());
97*cdf0e10cSrcweir 
98*cdf0e10cSrcweir     aNameChain.Produce_CompleteChain(Env().CurPosition(), nameChainLinker);
99*cdf0e10cSrcweir     produce_Title(aTitle, C_sCePrefix_Service, i_ce);
100*cdf0e10cSrcweir 
101*cdf0e10cSrcweir     HF_DocEntryList
102*cdf0e10cSrcweir         aTopList( aTitle.Add_Row() );
103*cdf0e10cSrcweir     aTopList.Produce_Term(C_sImplementedInterface);
104*cdf0e10cSrcweir 
105*cdf0e10cSrcweir     HF_IdlTypeText
106*cdf0e10cSrcweir         aImplementedInterface( Env(), aTopList.Produce_Definition(), true, &i_ce);
107*cdf0e10cSrcweir     aImplementedInterface.Produce_byData( SglIfcServiceAttr::BaseInterface(i_ce) );
108*cdf0e10cSrcweir 
109*cdf0e10cSrcweir     CurOut() << new Html::HorizontalLine;
110*cdf0e10cSrcweir 
111*cdf0e10cSrcweir     write_Docu(aTitle.Add_Row(), i_ce);
112*cdf0e10cSrcweir     CurOut() << new Html::HorizontalLine();
113*cdf0e10cSrcweir 
114*cdf0e10cSrcweir     dyn_ce_list
115*cdf0e10cSrcweir         dpConstructors;
116*cdf0e10cSrcweir     SglIfcServiceAttr::Get_Constructors(dpConstructors, i_ce);
117*cdf0e10cSrcweir     if ( (*dpConstructors).operator bool() )
118*cdf0e10cSrcweir     {
119*cdf0e10cSrcweir         produce_Members( *dpConstructors,
120*cdf0e10cSrcweir                          C_sList_Constructors,
121*cdf0e10cSrcweir                          C_sList_Constructors_Label,
122*cdf0e10cSrcweir                          C_sDetails_Constructors,
123*cdf0e10cSrcweir                          C_sDetails_Constructors_Label );
124*cdf0e10cSrcweir         pNaviSubRow->SwitchOn(sli_ConstructorsSummary);
125*cdf0e10cSrcweir         pNaviSubRow->SwitchOn(sli_ConstructorsDetails);
126*cdf0e10cSrcweir     }
127*cdf0e10cSrcweir 
128*cdf0e10cSrcweir     pNaviSubRow->Produce_Row();
129*cdf0e10cSrcweir     CurOut() << new Xml::XmlCode("<br>&nbsp;");
130*cdf0e10cSrcweir }
131*cdf0e10cSrcweir 
132*cdf0e10cSrcweir DYN HF_NaviSubRow &
133*cdf0e10cSrcweir HF_IdlSglIfcService::make_Navibar( const client & i_ce ) const
134*cdf0e10cSrcweir {
135*cdf0e10cSrcweir     HF_IdlNavigationBar
136*cdf0e10cSrcweir         aNaviBar(Env(), CurOut());
137*cdf0e10cSrcweir     aNaviBar.Produce_CeMainRow(i_ce, true);
138*cdf0e10cSrcweir 
139*cdf0e10cSrcweir     DYN HF_NaviSubRow &
140*cdf0e10cSrcweir         ret = aNaviBar.Add_SubRow();
141*cdf0e10cSrcweir     ret.AddItem(C_sList_Constructors, C_sList_Constructors_Label, false);
142*cdf0e10cSrcweir     ret.AddItem(C_sDetails_Constructors, C_sDetails_Constructors_Label, false);
143*cdf0e10cSrcweir 
144*cdf0e10cSrcweir     CurOut() << new Html::HorizontalLine();
145*cdf0e10cSrcweir     return ret;
146*cdf0e10cSrcweir }
147*cdf0e10cSrcweir 
148*cdf0e10cSrcweir typedef ary::idl::ifc_function::attr    funcAttr;
149*cdf0e10cSrcweir 
150*cdf0e10cSrcweir void
151*cdf0e10cSrcweir HF_IdlSglIfcService::produce_MemberDetails( HF_SubTitleTable &  o_table,
152*cdf0e10cSrcweir                                             const client &      i_ce ) const
153*cdf0e10cSrcweir {
154*cdf0e10cSrcweir     HF_IdlMethod
155*cdf0e10cSrcweir         aConstructor( Env(),
156*cdf0e10cSrcweir                       o_table.Add_Row()
157*cdf0e10cSrcweir                             >> *new Html::TableCell
158*cdf0e10cSrcweir                                 << new Html::ClassAttr(C_sCellStyle_MDetail) );
159*cdf0e10cSrcweir 
160*cdf0e10cSrcweir     ary::Dyn_StdConstIterator<ary::idl::Parameter>
161*cdf0e10cSrcweir         pParameters;
162*cdf0e10cSrcweir     funcAttr::Get_Parameters(pParameters, i_ce);
163*cdf0e10cSrcweir 
164*cdf0e10cSrcweir     ary::Dyn_StdConstIterator<ary::idl::Type_id>
165*cdf0e10cSrcweir         pExceptions;
166*cdf0e10cSrcweir     funcAttr::Get_Exceptions(pExceptions, i_ce);
167*cdf0e10cSrcweir 
168*cdf0e10cSrcweir     aConstructor.Produce_byData( i_ce.LocalName(),
169*cdf0e10cSrcweir                                  funcAttr::ReturnType(i_ce),
170*cdf0e10cSrcweir                                  *pParameters,
171*cdf0e10cSrcweir                                  *pExceptions,
172*cdf0e10cSrcweir                                  funcAttr::IsOneway(i_ce),
173*cdf0e10cSrcweir                                  funcAttr::HasEllipse(i_ce),
174*cdf0e10cSrcweir                                  i_ce );
175*cdf0e10cSrcweir }
176