1*d291ea28SAndrew Rist /**************************************************************
2cdf0e10cSrcweir  *
3*d291ea28SAndrew Rist  * Licensed to the Apache Software Foundation (ASF) under one
4*d291ea28SAndrew Rist  * or more contributor license agreements.  See the NOTICE file
5*d291ea28SAndrew Rist  * distributed with this work for additional information
6*d291ea28SAndrew Rist  * regarding copyright ownership.  The ASF licenses this file
7*d291ea28SAndrew Rist  * to you under the Apache License, Version 2.0 (the
8*d291ea28SAndrew Rist  * "License"); you may not use this file except in compliance
9*d291ea28SAndrew Rist  * with the License.  You may obtain a copy of the License at
10*d291ea28SAndrew Rist  *
11*d291ea28SAndrew Rist  *   http://www.apache.org/licenses/LICENSE-2.0
12*d291ea28SAndrew Rist  *
13*d291ea28SAndrew Rist  * Unless required by applicable law or agreed to in writing,
14*d291ea28SAndrew Rist  * software distributed under the License is distributed on an
15*d291ea28SAndrew Rist  * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
16*d291ea28SAndrew Rist  * KIND, either express or implied.  See the License for the
17*d291ea28SAndrew Rist  * specific language governing permissions and limitations
18*d291ea28SAndrew Rist  * under the License.
19*d291ea28SAndrew Rist  *
20*d291ea28SAndrew Rist  *************************************************************/
21cdf0e10cSrcweir 
22cdf0e10cSrcweir #include <precomp.h>
23cdf0e10cSrcweir #include "hfi_siservice.hxx"
24cdf0e10cSrcweir 
25cdf0e10cSrcweir 
26cdf0e10cSrcweir // NOT FULLY DEFINED SERVICES
27cdf0e10cSrcweir #include <ary/idl/i_ce.hxx>
28cdf0e10cSrcweir #include <ary/idl/ik_function.hxx>
29cdf0e10cSrcweir #include <ary/idl/ik_siservice.hxx>
30cdf0e10cSrcweir #include <ary/doc/d_oldidldocu.hxx>
31cdf0e10cSrcweir #include <toolkit/hf_docentry.hxx>
32cdf0e10cSrcweir #include <toolkit/hf_linachain.hxx>
33cdf0e10cSrcweir #include <toolkit/hf_navi_sub.hxx>
34cdf0e10cSrcweir #include <toolkit/hf_title.hxx>
35cdf0e10cSrcweir #include "hfi_doc.hxx"
36cdf0e10cSrcweir #include "hfi_method.hxx"
37cdf0e10cSrcweir #include "hfi_navibar.hxx"
38cdf0e10cSrcweir #include "hfi_typetext.hxx"
39cdf0e10cSrcweir #include "hi_env.hxx"
40cdf0e10cSrcweir #include "hi_linkhelper.hxx"
41cdf0e10cSrcweir 
42cdf0e10cSrcweir 
43cdf0e10cSrcweir 
44cdf0e10cSrcweir namespace
45cdf0e10cSrcweir {
46cdf0e10cSrcweir 
47cdf0e10cSrcweir const String
48cdf0e10cSrcweir     C_sImplementedInterface("Supported Interface");
49cdf0e10cSrcweir 
50cdf0e10cSrcweir const String
51cdf0e10cSrcweir     C_sList_Constructors("Constructors' Summary");
52cdf0e10cSrcweir const String
53cdf0e10cSrcweir     C_sList_Constructors_Label("ConstructorsSummary");
54cdf0e10cSrcweir const String
55cdf0e10cSrcweir     C_sDetails_Constructors("Constructors' Details");
56cdf0e10cSrcweir const String
57cdf0e10cSrcweir     C_sDetails_Constructors_Label("ConstructorsDetails");
58cdf0e10cSrcweir 
59cdf0e10cSrcweir 
60cdf0e10cSrcweir enum E_SubListIndices
61cdf0e10cSrcweir {
62cdf0e10cSrcweir     sli_ConstructorsSummary = 0,
63cdf0e10cSrcweir     sli_ConstructorsDetails = 1
64cdf0e10cSrcweir };
65cdf0e10cSrcweir 
66cdf0e10cSrcweir } //anonymous namespace
67cdf0e10cSrcweir 
68cdf0e10cSrcweir 
HF_IdlSglIfcService(Environment & io_rEnv,Xml::Element & o_rOut)69cdf0e10cSrcweir HF_IdlSglIfcService::HF_IdlSglIfcService( Environment &         io_rEnv,
70cdf0e10cSrcweir 										  Xml::Element &        o_rOut )
71cdf0e10cSrcweir     :   HtmlFactory_Idl(io_rEnv, &o_rOut)
72cdf0e10cSrcweir {
73cdf0e10cSrcweir }
74cdf0e10cSrcweir 
~HF_IdlSglIfcService()75cdf0e10cSrcweir HF_IdlSglIfcService::~HF_IdlSglIfcService()
76cdf0e10cSrcweir {
77cdf0e10cSrcweir }
78cdf0e10cSrcweir 
79cdf0e10cSrcweir typedef ::ary::idl::ifc_sglifcservice::attr SglIfcServiceAttr;
80cdf0e10cSrcweir 
81cdf0e10cSrcweir void
Produce_byData(const client & i_ce) const82cdf0e10cSrcweir HF_IdlSglIfcService::Produce_byData( const client & i_ce ) const
83cdf0e10cSrcweir {
84cdf0e10cSrcweir     Dyn<HF_NaviSubRow>
85cdf0e10cSrcweir         pNaviSubRow( &make_Navibar(i_ce) );
86cdf0e10cSrcweir 
87cdf0e10cSrcweir     HF_TitleTable
88cdf0e10cSrcweir         aTitle(CurOut());
89cdf0e10cSrcweir     HF_LinkedNameChain
90cdf0e10cSrcweir         aNameChain(aTitle.Add_Row());
91cdf0e10cSrcweir 
92cdf0e10cSrcweir     aNameChain.Produce_CompleteChain(Env().CurPosition(), nameChainLinker);
93cdf0e10cSrcweir     produce_Title(aTitle, C_sCePrefix_Service, i_ce);
94cdf0e10cSrcweir 
95cdf0e10cSrcweir     HF_DocEntryList
96cdf0e10cSrcweir         aTopList( aTitle.Add_Row() );
97cdf0e10cSrcweir     aTopList.Produce_Term(C_sImplementedInterface);
98cdf0e10cSrcweir 
99cdf0e10cSrcweir     HF_IdlTypeText
100cdf0e10cSrcweir         aImplementedInterface( Env(), aTopList.Produce_Definition(), true, &i_ce);
101cdf0e10cSrcweir     aImplementedInterface.Produce_byData( SglIfcServiceAttr::BaseInterface(i_ce) );
102cdf0e10cSrcweir 
103cdf0e10cSrcweir     CurOut() << new Html::HorizontalLine;
104cdf0e10cSrcweir 
105cdf0e10cSrcweir     write_Docu(aTitle.Add_Row(), i_ce);
106cdf0e10cSrcweir     CurOut() << new Html::HorizontalLine();
107cdf0e10cSrcweir 
108cdf0e10cSrcweir     dyn_ce_list
109cdf0e10cSrcweir         dpConstructors;
110cdf0e10cSrcweir     SglIfcServiceAttr::Get_Constructors(dpConstructors, i_ce);
111cdf0e10cSrcweir     if ( (*dpConstructors).operator bool() )
112cdf0e10cSrcweir     {
113cdf0e10cSrcweir         produce_Members( *dpConstructors,
114cdf0e10cSrcweir 						 C_sList_Constructors,
115cdf0e10cSrcweir 						 C_sList_Constructors_Label,
116cdf0e10cSrcweir 						 C_sDetails_Constructors,
117cdf0e10cSrcweir 						 C_sDetails_Constructors_Label );
118cdf0e10cSrcweir         pNaviSubRow->SwitchOn(sli_ConstructorsSummary);
119cdf0e10cSrcweir         pNaviSubRow->SwitchOn(sli_ConstructorsDetails);
120cdf0e10cSrcweir     }
121cdf0e10cSrcweir 
122cdf0e10cSrcweir     pNaviSubRow->Produce_Row();
123cdf0e10cSrcweir     CurOut() << new Xml::XmlCode("<br>&nbsp;");
124cdf0e10cSrcweir }
125cdf0e10cSrcweir 
126cdf0e10cSrcweir DYN HF_NaviSubRow &
make_Navibar(const client & i_ce) const127cdf0e10cSrcweir HF_IdlSglIfcService::make_Navibar( const client & i_ce ) const
128cdf0e10cSrcweir {
129cdf0e10cSrcweir     HF_IdlNavigationBar
130cdf0e10cSrcweir         aNaviBar(Env(), CurOut());
131cdf0e10cSrcweir     aNaviBar.Produce_CeMainRow(i_ce, true);
132cdf0e10cSrcweir 
133cdf0e10cSrcweir     DYN HF_NaviSubRow &
134cdf0e10cSrcweir         ret = aNaviBar.Add_SubRow();
135cdf0e10cSrcweir     ret.AddItem(C_sList_Constructors, C_sList_Constructors_Label, false);
136cdf0e10cSrcweir     ret.AddItem(C_sDetails_Constructors, C_sDetails_Constructors_Label, false);
137cdf0e10cSrcweir 
138cdf0e10cSrcweir     CurOut() << new Html::HorizontalLine();
139cdf0e10cSrcweir     return ret;
140cdf0e10cSrcweir }
141cdf0e10cSrcweir 
142cdf0e10cSrcweir typedef ary::idl::ifc_function::attr    funcAttr;
143cdf0e10cSrcweir 
144cdf0e10cSrcweir void
produce_MemberDetails(HF_SubTitleTable & o_table,const client & i_ce) const145cdf0e10cSrcweir HF_IdlSglIfcService::produce_MemberDetails( HF_SubTitleTable &  o_table,
146cdf0e10cSrcweir 											const client &      i_ce ) const
147cdf0e10cSrcweir {
148cdf0e10cSrcweir     HF_IdlMethod
149cdf0e10cSrcweir         aConstructor( Env(),
150cdf0e10cSrcweir 					  o_table.Add_Row()
151cdf0e10cSrcweir                             >> *new Html::TableCell
152cdf0e10cSrcweir                                 << new Html::ClassAttr(C_sCellStyle_MDetail) );
153cdf0e10cSrcweir 
154cdf0e10cSrcweir     ary::Dyn_StdConstIterator<ary::idl::Parameter>
155cdf0e10cSrcweir         pParameters;
156cdf0e10cSrcweir     funcAttr::Get_Parameters(pParameters, i_ce);
157cdf0e10cSrcweir 
158cdf0e10cSrcweir     ary::Dyn_StdConstIterator<ary::idl::Type_id>
159cdf0e10cSrcweir         pExceptions;
160cdf0e10cSrcweir     funcAttr::Get_Exceptions(pExceptions, i_ce);
161cdf0e10cSrcweir 
162cdf0e10cSrcweir     aConstructor.Produce_byData( i_ce.LocalName(),
163cdf0e10cSrcweir 								 funcAttr::ReturnType(i_ce),
164cdf0e10cSrcweir 								 *pParameters,
165cdf0e10cSrcweir 								 *pExceptions,
166cdf0e10cSrcweir 								 funcAttr::IsOneway(i_ce),
167cdf0e10cSrcweir 								 funcAttr::HasEllipse(i_ce),
168cdf0e10cSrcweir 								 i_ce );
169cdf0e10cSrcweir }
170