1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
3 * This file is part of the LibreOffice project.
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/.
9 * This file incorporates work covered by the following license notice:
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 .
21 #include "hfi_struct.hxx"
24 // NOT FULLY DEFINED SERVICES
25 #include <ary/idl/i_ce.hxx>
26 #include <ary/idl/i_struct.hxx>
27 #include <ary/idl/ik_exception.hxx>
28 #include <ary/idl/ik_struct.hxx>
29 #include <toolkit/hf_docentry.hxx>
30 #include <toolkit/hf_linachain.hxx>
31 #include <toolkit/hf_navi_sub.hxx>
32 #include <toolkit/hf_title.hxx>
33 #include "hfi_navibar.hxx"
34 #include "hfi_property.hxx"
35 #include "hfi_typetext.hxx"
36 #include "hi_linkhelper.hxx"
40 C_sCePrefix_Struct("struct");
42 C_sCePrefix_Exception("exception");
49 C_sBaseStruct("Base Hierarchy");
51 C_sBaseException("Base Hierarchy");
54 C_sList_Elements("Elements' Summary");
56 C_sList_Elements_Label("Elements");
59 C_sList_ElementDetails("Elements' Details");
61 C_sList_ElementDetails_Label("ElementDetails");
65 sli_ElementsSummary
= 0,
66 sli_ElementsDetails
= 1
69 } // anonymous namespace
73 HF_IdlStruct::HF_IdlStruct( Environment
& io_rEnv
,
74 Xml::Element
& o_rOut
,
76 : HtmlFactory_Idl(io_rEnv
, &o_rOut
),
77 bIsException(i_bIsException
)
81 HF_IdlStruct::~HF_IdlStruct()
86 HF_IdlStruct::Produce_byData( const client
& i_ce
) const
88 const ary::idl::Struct
*
92 : static_cast< const ary::idl::Struct
* >(&i_ce
);
95 ? pStruct
->TemplateParameterType().IsValid()
99 pNaviSubRow( &make_Navibar(i_ce
) );
104 aNameChain(aTitle
.Add_Row());
106 aNameChain
.Produce_CompleteChain(Env().CurPosition(), nameChainLinker
);
111 get_Annotations(slAnnotations(), i_ce
);
113 StreamLock
rTitle(200);
115 rTitle() << "template ";
118 ? C_sCePrefix_Exception
119 : C_sCePrefix_Struct
)
124 csv_assert(pStruct
!= 0);
127 << pStruct
->TemplateParameter()
130 aTitle
.Produce_Title(slAnnotations().c_str(), rTitle().c_str());
133 produce_Bases( aTitle
.Add_Row(),
140 write_Docu(aTitle
.Add_Row(), i_ce
);
141 CurOut() << new Html::HorizontalLine();
147 ary::idl::ifc_exception::attr::Get_Elements(dpElements
, i_ce
);
149 ary::idl::ifc_struct::attr::Get_Elements(dpElements
, i_ce
);
151 if ( (*dpElements
).operator bool() )
153 produce_Members( *dpElements
,
155 C_sList_Elements_Label
,
156 C_sList_ElementDetails
,
157 C_sList_ElementDetails_Label
);
158 pNaviSubRow
->SwitchOn(sli_ElementsSummary
);
159 pNaviSubRow
->SwitchOn(sli_ElementsDetails
);
161 pNaviSubRow
->Produce_Row();
164 HtmlFactory_Idl::type_id
165 HF_IdlStruct::inq_BaseOf( const client
& i_ce
) const
168 ? ary::idl::ifc_exception::attr::Base(i_ce
)
169 : ary::idl::ifc_struct::attr::Base(i_ce
);
173 HF_IdlStruct::make_Navibar( const client
& i_ce
) const
176 aNaviBar(Env(), CurOut());
177 aNaviBar
.Produce_CeMainRow(i_ce
);
180 ret
= aNaviBar
.Add_SubRow();
181 ret
.AddItem(C_sList_Elements
, C_sList_Elements_Label
, false);
182 ret
.AddItem(C_sList_ElementDetails
, C_sList_ElementDetails_Label
, false);
184 CurOut() << new Html::HorizontalLine();
189 HF_IdlStruct::produce_MemberDetails( HF_SubTitleTable
& o_table
,
190 const client
& i_ce
) const
193 aElement( Env(), o_table
);
194 aElement
.Produce_byData(i_ce
);
197 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */