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_singleton.hxx"
24cdf0e10cSrcweir
25cdf0e10cSrcweir
26cdf0e10cSrcweir // NOT FULLY DEFINED SERVICES
27cdf0e10cSrcweir #include <ary/idl/i_ce.hxx>
28cdf0e10cSrcweir #include <ary/idl/ik_singleton.hxx>
29cdf0e10cSrcweir #include <ary/idl/ik_sisingleton.hxx>
30cdf0e10cSrcweir #include <toolkit/hf_docentry.hxx>
31cdf0e10cSrcweir #include <toolkit/hf_linachain.hxx>
32cdf0e10cSrcweir #include <toolkit/hf_title.hxx>
33cdf0e10cSrcweir #include "hfi_navibar.hxx"
34cdf0e10cSrcweir #include "hfi_typetext.hxx"
35cdf0e10cSrcweir #include "hi_linkhelper.hxx"
36cdf0e10cSrcweir
37cdf0e10cSrcweir
38cdf0e10cSrcweir
39cdf0e10cSrcweir extern const String
40cdf0e10cSrcweir C_sCePrefix_Singleton("singleton");
41cdf0e10cSrcweir
42cdf0e10cSrcweir const String
43cdf0e10cSrcweir C_sAssociatedService("Associated Service");
44cdf0e10cSrcweir const String
45cdf0e10cSrcweir C_sImplementedInterface("Supported Interface");
46cdf0e10cSrcweir
47cdf0e10cSrcweir
48cdf0e10cSrcweir
HF_IdlSingleton(Environment & io_rEnv,Xml::Element & o_rOut)49cdf0e10cSrcweir HF_IdlSingleton::HF_IdlSingleton( Environment & io_rEnv,
50cdf0e10cSrcweir Xml::Element & o_rOut )
51cdf0e10cSrcweir : HtmlFactory_Idl(io_rEnv, &o_rOut)
52cdf0e10cSrcweir {
53cdf0e10cSrcweir }
54cdf0e10cSrcweir
~HF_IdlSingleton()55cdf0e10cSrcweir HF_IdlSingleton::~HF_IdlSingleton()
56cdf0e10cSrcweir {
57cdf0e10cSrcweir
58cdf0e10cSrcweir }
59cdf0e10cSrcweir
60cdf0e10cSrcweir typedef ::ary::idl::ifc_singleton::attr SingletonAttr;
61cdf0e10cSrcweir typedef ::ary::idl::ifc_sglifcsingleton::attr SglIfcSingletonAttr;
62cdf0e10cSrcweir
63cdf0e10cSrcweir void
Produce_byData_ServiceBased(const client & i_ce) const64cdf0e10cSrcweir HF_IdlSingleton::Produce_byData_ServiceBased( const client & i_ce ) const
65cdf0e10cSrcweir {
66cdf0e10cSrcweir make_Navibar(i_ce);
67cdf0e10cSrcweir
68cdf0e10cSrcweir HF_TitleTable
69cdf0e10cSrcweir aTitle(CurOut());
70cdf0e10cSrcweir
71cdf0e10cSrcweir HF_LinkedNameChain
72cdf0e10cSrcweir aNameChain(aTitle.Add_Row());
73cdf0e10cSrcweir
74cdf0e10cSrcweir aNameChain.Produce_CompleteChain(Env().CurPosition(), nameChainLinker);
75cdf0e10cSrcweir produce_Title(aTitle, C_sCePrefix_Singleton, i_ce);
76cdf0e10cSrcweir
77cdf0e10cSrcweir HF_DocEntryList
78cdf0e10cSrcweir aTopList( aTitle.Add_Row() );
79cdf0e10cSrcweir aTopList.Produce_Term(C_sAssociatedService);
80cdf0e10cSrcweir
81cdf0e10cSrcweir HF_IdlTypeText
82cdf0e10cSrcweir aAssociatedService( Env(), aTopList.Produce_Definition(), true );
83cdf0e10cSrcweir aAssociatedService.Produce_byData( SingletonAttr::AssociatedService(i_ce) );
84cdf0e10cSrcweir
85cdf0e10cSrcweir CurOut() << new Html::HorizontalLine;
86cdf0e10cSrcweir
87cdf0e10cSrcweir write_Docu(aTitle.Add_Row(), i_ce);
88cdf0e10cSrcweir CurOut() << new Html::HorizontalLine();
89cdf0e10cSrcweir }
90cdf0e10cSrcweir
91cdf0e10cSrcweir void
Produce_byData_InterfaceBased(const client & i_ce) const92cdf0e10cSrcweir HF_IdlSingleton::Produce_byData_InterfaceBased( const client & i_ce ) const
93cdf0e10cSrcweir {
94cdf0e10cSrcweir make_Navibar(i_ce);
95cdf0e10cSrcweir
96cdf0e10cSrcweir HF_TitleTable
97cdf0e10cSrcweir aTitle(CurOut());
98cdf0e10cSrcweir
99cdf0e10cSrcweir HF_LinkedNameChain
100cdf0e10cSrcweir aNameChain(aTitle.Add_Row());
101cdf0e10cSrcweir
102cdf0e10cSrcweir aNameChain.Produce_CompleteChain(Env().CurPosition(), nameChainLinker);
103cdf0e10cSrcweir produce_Title(aTitle, C_sCePrefix_Singleton, i_ce);
104cdf0e10cSrcweir
105cdf0e10cSrcweir HF_DocEntryList
106cdf0e10cSrcweir aTopList( aTitle.Add_Row() );
107cdf0e10cSrcweir aTopList.Produce_Term(C_sImplementedInterface);
108cdf0e10cSrcweir
109cdf0e10cSrcweir HF_IdlTypeText
110cdf0e10cSrcweir aImplementedInterface( Env(), aTopList.Produce_Definition(), true );
111cdf0e10cSrcweir aImplementedInterface.Produce_byData( SglIfcSingletonAttr::BaseInterface(i_ce) );
112cdf0e10cSrcweir
113cdf0e10cSrcweir CurOut() << new Html::HorizontalLine;
114cdf0e10cSrcweir
115cdf0e10cSrcweir write_Docu(aTitle.Add_Row(), i_ce);
116cdf0e10cSrcweir CurOut() << new Html::HorizontalLine();
117cdf0e10cSrcweir }
118cdf0e10cSrcweir
119cdf0e10cSrcweir void
make_Navibar(const client & i_ce) const120cdf0e10cSrcweir HF_IdlSingleton::make_Navibar( const client & i_ce ) const
121cdf0e10cSrcweir {
122cdf0e10cSrcweir HF_IdlNavigationBar
123cdf0e10cSrcweir aNaviBar(Env(), CurOut());
124cdf0e10cSrcweir aNaviBar.Produce_CeMainRow(i_ce,true); // true := avoid link to Use-page.
125cdf0e10cSrcweir
126cdf0e10cSrcweir CurOut() << new Html::HorizontalLine();
127cdf0e10cSrcweir }
128