1*0841af79SAndrew Rist /**************************************************************
2cdf0e10cSrcweir *
3*0841af79SAndrew Rist * Licensed to the Apache Software Foundation (ASF) under one
4*0841af79SAndrew Rist * or more contributor license agreements. See the NOTICE file
5*0841af79SAndrew Rist * distributed with this work for additional information
6*0841af79SAndrew Rist * regarding copyright ownership. The ASF licenses this file
7*0841af79SAndrew Rist * to you under the Apache License, Version 2.0 (the
8*0841af79SAndrew Rist * "License"); you may not use this file except in compliance
9*0841af79SAndrew Rist * with the License. You may obtain a copy of the License at
10*0841af79SAndrew Rist *
11*0841af79SAndrew Rist * http://www.apache.org/licenses/LICENSE-2.0
12*0841af79SAndrew Rist *
13*0841af79SAndrew Rist * Unless required by applicable law or agreed to in writing,
14*0841af79SAndrew Rist * software distributed under the License is distributed on an
15*0841af79SAndrew Rist * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
16*0841af79SAndrew Rist * KIND, either express or implied. See the License for the
17*0841af79SAndrew Rist * specific language governing permissions and limitations
18*0841af79SAndrew Rist * under the License.
19*0841af79SAndrew Rist *
20*0841af79SAndrew Rist *************************************************************/
21cdf0e10cSrcweir
22cdf0e10cSrcweir #include <precomp.h>
23cdf0e10cSrcweir #include "hfi_constgroup.hxx"
24cdf0e10cSrcweir
25cdf0e10cSrcweir
26cdf0e10cSrcweir // NOT FULLY DEFINED SERVICES
27cdf0e10cSrcweir #include <ary/idl/i_ce.hxx>
28cdf0e10cSrcweir #include <ary/idl/ik_constgroup.hxx>
29cdf0e10cSrcweir #include <toolkit/hf_linachain.hxx>
30cdf0e10cSrcweir #include <toolkit/hf_navi_sub.hxx>
31cdf0e10cSrcweir #include <toolkit/hf_title.hxx>
32cdf0e10cSrcweir #include "hfi_navibar.hxx"
33cdf0e10cSrcweir #include "hfi_property.hxx"
34cdf0e10cSrcweir #include "hi_linkhelper.hxx"
35cdf0e10cSrcweir
36cdf0e10cSrcweir
37cdf0e10cSrcweir extern const String
38cdf0e10cSrcweir C_sCePrefix_Constants("constants group");
39cdf0e10cSrcweir
40cdf0e10cSrcweir
41cdf0e10cSrcweir namespace
42cdf0e10cSrcweir {
43cdf0e10cSrcweir
44cdf0e10cSrcweir const String
45cdf0e10cSrcweir C_sList_Constants("Constants");
46cdf0e10cSrcweir const String
47cdf0e10cSrcweir C_sList_Constants_Label("Constants");
48cdf0e10cSrcweir const String
49cdf0e10cSrcweir C_sList_ConstantDetails("Constants' Details");
50cdf0e10cSrcweir const String
51cdf0e10cSrcweir C_sList_ConstantDetails_Label("ConstantDetails");
52cdf0e10cSrcweir
53cdf0e10cSrcweir enum E_SubListIndices
54cdf0e10cSrcweir {
55cdf0e10cSrcweir sli_ConstantsSummary = 0,
56cdf0e10cSrcweir sli_ConstantDetails = 1
57cdf0e10cSrcweir };
58cdf0e10cSrcweir
59cdf0e10cSrcweir
60cdf0e10cSrcweir } // anonymous namespace
61cdf0e10cSrcweir
62cdf0e10cSrcweir
63cdf0e10cSrcweir
HF_IdlConstGroup(Environment & io_rEnv,Xml::Element & o_rOut)64cdf0e10cSrcweir HF_IdlConstGroup::HF_IdlConstGroup( Environment & io_rEnv,
65cdf0e10cSrcweir Xml::Element & o_rOut )
66cdf0e10cSrcweir : HtmlFactory_Idl(io_rEnv, &o_rOut)
67cdf0e10cSrcweir {
68cdf0e10cSrcweir }
69cdf0e10cSrcweir
~HF_IdlConstGroup()70cdf0e10cSrcweir HF_IdlConstGroup::~HF_IdlConstGroup()
71cdf0e10cSrcweir {
72cdf0e10cSrcweir }
73cdf0e10cSrcweir
74cdf0e10cSrcweir void
Produce_byData(const client & i_ce) const75cdf0e10cSrcweir HF_IdlConstGroup::Produce_byData( const client & i_ce ) const
76cdf0e10cSrcweir {
77cdf0e10cSrcweir Dyn<HF_NaviSubRow>
78cdf0e10cSrcweir pNaviSubRow( &make_Navibar(i_ce) );
79cdf0e10cSrcweir
80cdf0e10cSrcweir HF_TitleTable
81cdf0e10cSrcweir aTitle(CurOut());
82cdf0e10cSrcweir HF_LinkedNameChain
83cdf0e10cSrcweir aNameChain(aTitle.Add_Row());
84cdf0e10cSrcweir
85cdf0e10cSrcweir aNameChain.Produce_CompleteChain(Env().CurPosition(), nameChainLinker);
86cdf0e10cSrcweir produce_Title(aTitle, C_sCePrefix_Constants, i_ce);
87cdf0e10cSrcweir
88cdf0e10cSrcweir write_Docu(aTitle.Add_Row(), i_ce);
89cdf0e10cSrcweir CurOut() << new Html::HorizontalLine();
90cdf0e10cSrcweir
91cdf0e10cSrcweir dyn_ce_list
92cdf0e10cSrcweir dpConstants;
93cdf0e10cSrcweir ary::idl::ifc_constgroup::attr::Get_Constants(dpConstants, i_ce);
94cdf0e10cSrcweir
95cdf0e10cSrcweir if ( (*dpConstants).operator bool() )
96cdf0e10cSrcweir {
97cdf0e10cSrcweir produce_Members( *dpConstants,
98cdf0e10cSrcweir C_sList_Constants,
99cdf0e10cSrcweir C_sList_Constants_Label,
100cdf0e10cSrcweir C_sList_ConstantDetails,
101cdf0e10cSrcweir C_sList_ConstantDetails_Label );
102cdf0e10cSrcweir pNaviSubRow->SwitchOn(sli_ConstantsSummary);
103cdf0e10cSrcweir pNaviSubRow->SwitchOn(sli_ConstantDetails);
104cdf0e10cSrcweir }
105cdf0e10cSrcweir pNaviSubRow->Produce_Row();
106cdf0e10cSrcweir }
107cdf0e10cSrcweir
108cdf0e10cSrcweir HF_NaviSubRow &
make_Navibar(const client & i_ce) const109cdf0e10cSrcweir HF_IdlConstGroup::make_Navibar( const client & i_ce ) const
110cdf0e10cSrcweir {
111cdf0e10cSrcweir HF_IdlNavigationBar
112cdf0e10cSrcweir aNaviBar(Env(), CurOut());
113cdf0e10cSrcweir aNaviBar.Produce_CeMainRow(i_ce,true); // true := avoid link to Use-page.
114cdf0e10cSrcweir
115cdf0e10cSrcweir DYN HF_NaviSubRow &
116cdf0e10cSrcweir ret = aNaviBar.Add_SubRow();
117cdf0e10cSrcweir ret.AddItem(C_sList_Constants, C_sList_Constants_Label, false);
118cdf0e10cSrcweir ret.AddItem(C_sList_ConstantDetails, C_sList_ConstantDetails_Label, false);
119cdf0e10cSrcweir
120cdf0e10cSrcweir CurOut() << new Html::HorizontalLine();
121cdf0e10cSrcweir return ret;
122cdf0e10cSrcweir }
123cdf0e10cSrcweir
124cdf0e10cSrcweir void
produce_MemberDetails(HF_SubTitleTable & o_table,const client & i_ce) const125cdf0e10cSrcweir HF_IdlConstGroup::produce_MemberDetails( HF_SubTitleTable & o_table,
126cdf0e10cSrcweir const client & i_ce ) const
127cdf0e10cSrcweir {
128cdf0e10cSrcweir HF_IdlConstant
129cdf0e10cSrcweir aElement( Env(), o_table );
130cdf0e10cSrcweir aElement.Produce_byData(i_ce);
131cdf0e10cSrcweir }
132cdf0e10cSrcweir
133