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