1*cdf0e10cSrcweir /************************************************************************* 2*cdf0e10cSrcweir * 3*cdf0e10cSrcweir * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 4*cdf0e10cSrcweir * 5*cdf0e10cSrcweir * Copyright 2000, 2010 Oracle and/or its affiliates. 6*cdf0e10cSrcweir * 7*cdf0e10cSrcweir * OpenOffice.org - a multi-platform office productivity suite 8*cdf0e10cSrcweir * 9*cdf0e10cSrcweir * This file is part of OpenOffice.org. 10*cdf0e10cSrcweir * 11*cdf0e10cSrcweir * OpenOffice.org is free software: you can redistribute it and/or modify 12*cdf0e10cSrcweir * it under the terms of the GNU Lesser General Public License version 3 13*cdf0e10cSrcweir * only, as published by the Free Software Foundation. 14*cdf0e10cSrcweir * 15*cdf0e10cSrcweir * OpenOffice.org is distributed in the hope that it will be useful, 16*cdf0e10cSrcweir * but WITHOUT ANY WARRANTY; without even the implied warranty of 17*cdf0e10cSrcweir * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 18*cdf0e10cSrcweir * GNU Lesser General Public License version 3 for more details 19*cdf0e10cSrcweir * (a copy is included in the LICENSE file that accompanied this code). 20*cdf0e10cSrcweir * 21*cdf0e10cSrcweir * You should have received a copy of the GNU Lesser General Public License 22*cdf0e10cSrcweir * version 3 along with OpenOffice.org. If not, see 23*cdf0e10cSrcweir * <http://www.openoffice.org/license.html> 24*cdf0e10cSrcweir * for a copy of the LGPLv3 License. 25*cdf0e10cSrcweir * 26*cdf0e10cSrcweir ************************************************************************/ 27*cdf0e10cSrcweir 28*cdf0e10cSrcweir #include <precomp.h> 29*cdf0e10cSrcweir #include "hfi_property.hxx" 30*cdf0e10cSrcweir 31*cdf0e10cSrcweir 32*cdf0e10cSrcweir // NOT FULLY DEFINED SERVICES 33*cdf0e10cSrcweir #include <ary/idl/i_ce.hxx> 34*cdf0e10cSrcweir #include <ary/idl/ik_attribute.hxx> 35*cdf0e10cSrcweir #include <ary/idl/ik_constant.hxx> 36*cdf0e10cSrcweir #include <ary/idl/ik_enumvalue.hxx> 37*cdf0e10cSrcweir #include <ary/idl/ik_property.hxx> 38*cdf0e10cSrcweir #include <ary/idl/ik_structelem.hxx> 39*cdf0e10cSrcweir #include <toolkit/hf_docentry.hxx> 40*cdf0e10cSrcweir #include <toolkit/hf_title.hxx> 41*cdf0e10cSrcweir #include "hfi_typetext.hxx" 42*cdf0e10cSrcweir #include "hfi_doc.hxx" 43*cdf0e10cSrcweir #include "hfi_tag.hxx" 44*cdf0e10cSrcweir #include "hi_env.hxx" 45*cdf0e10cSrcweir #include "hi_ary.hxx" 46*cdf0e10cSrcweir #include "hi_linkhelper.hxx" 47*cdf0e10cSrcweir 48*cdf0e10cSrcweir void 49*cdf0e10cSrcweir HF_IdlDataMember::Produce_byData( const client & ce ) const 50*cdf0e10cSrcweir { 51*cdf0e10cSrcweir write_Title(ce); 52*cdf0e10cSrcweir enter_ContentCell(); 53*cdf0e10cSrcweir write_Declaration(ce); 54*cdf0e10cSrcweir write_Description(ce); 55*cdf0e10cSrcweir leave_ContentCell(); 56*cdf0e10cSrcweir } 57*cdf0e10cSrcweir 58*cdf0e10cSrcweir HF_IdlDataMember::HF_IdlDataMember( Environment & io_rEnv, 59*cdf0e10cSrcweir HF_SubTitleTable & o_table ) 60*cdf0e10cSrcweir : HtmlFactory_Idl( io_rEnv, 61*cdf0e10cSrcweir &(o_table.Add_Row() 62*cdf0e10cSrcweir >> *new Html::TableCell 63*cdf0e10cSrcweir << new Html::ClassAttr(C_sCellStyle_MDetail)) 64*cdf0e10cSrcweir ) 65*cdf0e10cSrcweir { 66*cdf0e10cSrcweir } 67*cdf0e10cSrcweir 68*cdf0e10cSrcweir const String sContentBorder("0"); 69*cdf0e10cSrcweir const String sContentWidth("96%"); 70*cdf0e10cSrcweir const String sContentPadding("5"); 71*cdf0e10cSrcweir const String sContentSpacing("0"); 72*cdf0e10cSrcweir 73*cdf0e10cSrcweir const String sBgWhite("#ffffff"); 74*cdf0e10cSrcweir const String sCenter("center"); 75*cdf0e10cSrcweir 76*cdf0e10cSrcweir void 77*cdf0e10cSrcweir HF_IdlDataMember::write_Title( const client & i_ce ) const 78*cdf0e10cSrcweir { 79*cdf0e10cSrcweir CurOut() 80*cdf0e10cSrcweir >> *new Html::Label(i_ce.LocalName()) 81*cdf0e10cSrcweir << new Html::ClassAttr(C_sMemberTitle) 82*cdf0e10cSrcweir << i_ce.LocalName(); 83*cdf0e10cSrcweir } 84*cdf0e10cSrcweir 85*cdf0e10cSrcweir void 86*cdf0e10cSrcweir HF_IdlDataMember::write_Description( const client & i_ce ) const 87*cdf0e10cSrcweir { 88*cdf0e10cSrcweir CurOut() << new Html::HorizontalLine; 89*cdf0e10cSrcweir write_Docu(CurOut(), i_ce); 90*cdf0e10cSrcweir } 91*cdf0e10cSrcweir 92*cdf0e10cSrcweir void 93*cdf0e10cSrcweir HF_IdlDataMember::enter_ContentCell() const 94*cdf0e10cSrcweir { 95*cdf0e10cSrcweir 96*cdf0e10cSrcweir Xml::Element & 97*cdf0e10cSrcweir rContentCell = CurOut() 98*cdf0e10cSrcweir >> *new Html::Table( sContentBorder, 99*cdf0e10cSrcweir sContentWidth, 100*cdf0e10cSrcweir sContentPadding, 101*cdf0e10cSrcweir sContentSpacing ) 102*cdf0e10cSrcweir << new Html::ClassAttr("table-in-data") 103*cdf0e10cSrcweir << new Html::BgColorAttr(sBgWhite) 104*cdf0e10cSrcweir << new Html::AlignAttr(sCenter) 105*cdf0e10cSrcweir >> *new Html::TableRow 106*cdf0e10cSrcweir >> *new Html::TableCell; 107*cdf0e10cSrcweir Out().Enter(rContentCell); 108*cdf0e10cSrcweir } 109*cdf0e10cSrcweir 110*cdf0e10cSrcweir 111*cdf0e10cSrcweir void 112*cdf0e10cSrcweir HF_IdlDataMember::leave_ContentCell() const 113*cdf0e10cSrcweir { 114*cdf0e10cSrcweir Out().Leave(); 115*cdf0e10cSrcweir } 116*cdf0e10cSrcweir 117*cdf0e10cSrcweir 118*cdf0e10cSrcweir HF_IdlProperty::~HF_IdlProperty() 119*cdf0e10cSrcweir { 120*cdf0e10cSrcweir } 121*cdf0e10cSrcweir 122*cdf0e10cSrcweir typedef ary::idl::ifc_property::attr PropertyAttr; 123*cdf0e10cSrcweir 124*cdf0e10cSrcweir void 125*cdf0e10cSrcweir HF_IdlProperty::write_Declaration( const client & i_ce ) const 126*cdf0e10cSrcweir { 127*cdf0e10cSrcweir if (PropertyAttr::HasAnyStereotype(i_ce)) 128*cdf0e10cSrcweir { 129*cdf0e10cSrcweir CurOut() << "[ "; 130*cdf0e10cSrcweir if (PropertyAttr::IsReadOnly(i_ce)) 131*cdf0e10cSrcweir CurOut() << "readonly "; 132*cdf0e10cSrcweir if (PropertyAttr::IsBound(i_ce)) 133*cdf0e10cSrcweir CurOut() << "bound "; 134*cdf0e10cSrcweir if (PropertyAttr::IsConstrained(i_ce)) 135*cdf0e10cSrcweir CurOut() << "constrained "; 136*cdf0e10cSrcweir if (PropertyAttr::IsMayBeAmbiguous(i_ce)) 137*cdf0e10cSrcweir CurOut() << "maybeambiguous "; 138*cdf0e10cSrcweir if (PropertyAttr::IsMayBeDefault(i_ce)) 139*cdf0e10cSrcweir CurOut() << "maybedefault "; 140*cdf0e10cSrcweir if (PropertyAttr::IsMayBeVoid(i_ce)) 141*cdf0e10cSrcweir CurOut() << "maybevoid "; 142*cdf0e10cSrcweir if (PropertyAttr::IsRemovable(i_ce)) 143*cdf0e10cSrcweir CurOut() << "removable "; 144*cdf0e10cSrcweir if (PropertyAttr::IsTransient(i_ce)) 145*cdf0e10cSrcweir CurOut() << "transient "; 146*cdf0e10cSrcweir CurOut() << "] "; 147*cdf0e10cSrcweir } // end if 148*cdf0e10cSrcweir 149*cdf0e10cSrcweir HF_IdlTypeText 150*cdf0e10cSrcweir aType( Env(), CurOut(), true ); 151*cdf0e10cSrcweir aType.Produce_byData( PropertyAttr::Type(i_ce) ); 152*cdf0e10cSrcweir 153*cdf0e10cSrcweir CurOut() << " " >> *new Html::Bold << i_ce.LocalName(); 154*cdf0e10cSrcweir CurOut() << ";"; 155*cdf0e10cSrcweir } 156*cdf0e10cSrcweir 157*cdf0e10cSrcweir 158*cdf0e10cSrcweir 159*cdf0e10cSrcweir 160*cdf0e10cSrcweir HF_IdlAttribute::~HF_IdlAttribute() 161*cdf0e10cSrcweir { 162*cdf0e10cSrcweir } 163*cdf0e10cSrcweir 164*cdf0e10cSrcweir typedef ary::idl::ifc_attribute::attr AttributeAttr; 165*cdf0e10cSrcweir 166*cdf0e10cSrcweir void 167*cdf0e10cSrcweir HF_IdlAttribute::write_Declaration( const client & i_ce ) const 168*cdf0e10cSrcweir { 169*cdf0e10cSrcweir if (AttributeAttr::HasAnyStereotype(i_ce)) 170*cdf0e10cSrcweir { 171*cdf0e10cSrcweir CurOut() << "[ "; 172*cdf0e10cSrcweir if (AttributeAttr::IsReadOnly(i_ce)) 173*cdf0e10cSrcweir CurOut() << "readonly "; 174*cdf0e10cSrcweir if (AttributeAttr::IsBound(i_ce)) 175*cdf0e10cSrcweir CurOut() << "bound "; 176*cdf0e10cSrcweir CurOut() << "] "; 177*cdf0e10cSrcweir } 178*cdf0e10cSrcweir 179*cdf0e10cSrcweir HF_IdlTypeText 180*cdf0e10cSrcweir aType( Env(), CurOut(), true ); 181*cdf0e10cSrcweir aType.Produce_byData( AttributeAttr::Type(i_ce) ); 182*cdf0e10cSrcweir 183*cdf0e10cSrcweir CurOut() 184*cdf0e10cSrcweir << " " 185*cdf0e10cSrcweir >> *new Html::Bold 186*cdf0e10cSrcweir << i_ce.LocalName(); 187*cdf0e10cSrcweir 188*cdf0e10cSrcweir dyn_type_list pGetExceptions; 189*cdf0e10cSrcweir dyn_type_list pSetExceptions; 190*cdf0e10cSrcweir AttributeAttr::Get_GetExceptions(pGetExceptions, i_ce); 191*cdf0e10cSrcweir AttributeAttr::Get_SetExceptions(pSetExceptions, i_ce); 192*cdf0e10cSrcweir 193*cdf0e10cSrcweir bool bGetRaises = (*pGetExceptions).IsValid(); 194*cdf0e10cSrcweir bool bSetRaises = (*pSetExceptions).IsValid(); 195*cdf0e10cSrcweir bool bRaises = bGetRaises OR bSetRaises; 196*cdf0e10cSrcweir if (bRaises) 197*cdf0e10cSrcweir { 198*cdf0e10cSrcweir HF_DocEntryList aSub(CurOut()); 199*cdf0e10cSrcweir 200*cdf0e10cSrcweir if (bGetRaises) 201*cdf0e10cSrcweir { 202*cdf0e10cSrcweir Xml::Element & 203*cdf0e10cSrcweir rGet = aSub.Produce_Definition(); 204*cdf0e10cSrcweir HF_IdlTypeText 205*cdf0e10cSrcweir aExc(Env(), rGet, true); 206*cdf0e10cSrcweir type_list & itExc = *pGetExceptions; 207*cdf0e10cSrcweir 208*cdf0e10cSrcweir rGet << "get raises ("; 209*cdf0e10cSrcweir aExc.Produce_byData(*itExc); 210*cdf0e10cSrcweir for (++itExc; itExc.operator bool(); ++itExc) 211*cdf0e10cSrcweir { 212*cdf0e10cSrcweir rGet 213*cdf0e10cSrcweir << ","; 214*cdf0e10cSrcweir aExc.Produce_byData(*itExc); 215*cdf0e10cSrcweir } // end for 216*cdf0e10cSrcweir rGet << ")"; 217*cdf0e10cSrcweir if (NOT bSetRaises) 218*cdf0e10cSrcweir rGet << ";"; 219*cdf0e10cSrcweir } // end if (bGetRaises) 220*cdf0e10cSrcweir 221*cdf0e10cSrcweir if (bSetRaises) 222*cdf0e10cSrcweir { 223*cdf0e10cSrcweir Xml::Element & 224*cdf0e10cSrcweir rSet = aSub.Produce_Definition(); 225*cdf0e10cSrcweir HF_IdlTypeText 226*cdf0e10cSrcweir aExc(Env(), rSet, true); 227*cdf0e10cSrcweir type_list & itExc = *pSetExceptions; 228*cdf0e10cSrcweir 229*cdf0e10cSrcweir rSet << "set raises ("; 230*cdf0e10cSrcweir aExc.Produce_byData(*itExc); 231*cdf0e10cSrcweir for (++itExc; itExc.operator bool(); ++itExc) 232*cdf0e10cSrcweir { 233*cdf0e10cSrcweir rSet 234*cdf0e10cSrcweir << ","; 235*cdf0e10cSrcweir aExc.Produce_byData(*itExc); 236*cdf0e10cSrcweir } // end for 237*cdf0e10cSrcweir rSet << ");"; 238*cdf0e10cSrcweir } // end if (bSetRaises) 239*cdf0e10cSrcweir } 240*cdf0e10cSrcweir else 241*cdf0e10cSrcweir { 242*cdf0e10cSrcweir CurOut() << ";"; 243*cdf0e10cSrcweir } 244*cdf0e10cSrcweir } 245*cdf0e10cSrcweir 246*cdf0e10cSrcweir 247*cdf0e10cSrcweir 248*cdf0e10cSrcweir 249*cdf0e10cSrcweir HF_IdlEnumValue::~HF_IdlEnumValue() 250*cdf0e10cSrcweir { 251*cdf0e10cSrcweir } 252*cdf0e10cSrcweir 253*cdf0e10cSrcweir typedef ary::idl::ifc_enumvalue::attr EnumValueAttr; 254*cdf0e10cSrcweir 255*cdf0e10cSrcweir void 256*cdf0e10cSrcweir HF_IdlEnumValue::write_Declaration( const client & i_ce ) const 257*cdf0e10cSrcweir { 258*cdf0e10cSrcweir CurOut() 259*cdf0e10cSrcweir >> *new Html::Bold 260*cdf0e10cSrcweir << i_ce.LocalName(); 261*cdf0e10cSrcweir 262*cdf0e10cSrcweir const String & 263*cdf0e10cSrcweir rValue = EnumValueAttr::Value(i_ce); 264*cdf0e10cSrcweir if ( NOT rValue.empty() ) 265*cdf0e10cSrcweir { CurOut() << " " // << " = " // In the moment this is somehow in the value 266*cdf0e10cSrcweir << rValue; 267*cdf0e10cSrcweir // CurOut() << ","; // In the moment this is somehow in the value 268*cdf0e10cSrcweir } 269*cdf0e10cSrcweir else 270*cdf0e10cSrcweir CurOut() << ","; 271*cdf0e10cSrcweir } 272*cdf0e10cSrcweir 273*cdf0e10cSrcweir 274*cdf0e10cSrcweir HF_IdlConstant::~HF_IdlConstant() 275*cdf0e10cSrcweir { 276*cdf0e10cSrcweir } 277*cdf0e10cSrcweir 278*cdf0e10cSrcweir typedef ary::idl::ifc_constant::attr ConstantAttr; 279*cdf0e10cSrcweir 280*cdf0e10cSrcweir void 281*cdf0e10cSrcweir HF_IdlConstant::write_Declaration( const client & i_ce ) const 282*cdf0e10cSrcweir { 283*cdf0e10cSrcweir CurOut() << "const "; 284*cdf0e10cSrcweir HF_IdlTypeText 285*cdf0e10cSrcweir aType( Env(), CurOut(), true ); 286*cdf0e10cSrcweir aType.Produce_byData(ConstantAttr::Type(i_ce)); 287*cdf0e10cSrcweir CurOut() 288*cdf0e10cSrcweir << " " 289*cdf0e10cSrcweir >> *new Html::Bold 290*cdf0e10cSrcweir << i_ce.LocalName(); 291*cdf0e10cSrcweir const String & 292*cdf0e10cSrcweir rValue = ConstantAttr::Value(i_ce); 293*cdf0e10cSrcweir CurOut() << " " // << " = " // In the moment this is somehow in the value 294*cdf0e10cSrcweir << rValue; 295*cdf0e10cSrcweir // << ";"; // In the moment this is somehow in the value 296*cdf0e10cSrcweir } 297*cdf0e10cSrcweir 298*cdf0e10cSrcweir 299*cdf0e10cSrcweir HF_IdlStructElement::~HF_IdlStructElement() 300*cdf0e10cSrcweir { 301*cdf0e10cSrcweir } 302*cdf0e10cSrcweir 303*cdf0e10cSrcweir typedef ary::idl::ifc_structelement::attr StructElementAttr; 304*cdf0e10cSrcweir 305*cdf0e10cSrcweir void 306*cdf0e10cSrcweir HF_IdlStructElement::write_Declaration( const client & i_ce ) const 307*cdf0e10cSrcweir { 308*cdf0e10cSrcweir HF_IdlTypeText 309*cdf0e10cSrcweir aType( Env(), CurOut(), true ); 310*cdf0e10cSrcweir aType.Produce_byData(StructElementAttr::Type(i_ce)); 311*cdf0e10cSrcweir CurOut() 312*cdf0e10cSrcweir << " " 313*cdf0e10cSrcweir >> *new Html::Bold 314*cdf0e10cSrcweir << i_ce.LocalName(); 315*cdf0e10cSrcweir CurOut() 316*cdf0e10cSrcweir << ";"; 317*cdf0e10cSrcweir } 318*cdf0e10cSrcweir 319*cdf0e10cSrcweir HF_IdlCommentedRelationElement::~HF_IdlCommentedRelationElement() 320*cdf0e10cSrcweir { 321*cdf0e10cSrcweir } 322*cdf0e10cSrcweir 323*cdf0e10cSrcweir void 324*cdf0e10cSrcweir HF_IdlCommentedRelationElement::produce_Summary( Environment & io_env, 325*cdf0e10cSrcweir Xml::Element & io_context, 326*cdf0e10cSrcweir const comref & i_commentedRef, 327*cdf0e10cSrcweir const client & i_rScopeGivingCe ) 328*cdf0e10cSrcweir { 329*cdf0e10cSrcweir csv_assert( i_commentedRef.Info() ); 330*cdf0e10cSrcweir 331*cdf0e10cSrcweir const ary::idl::Type_id aType = i_commentedRef.Type(); 332*cdf0e10cSrcweir const ce_info & rDocu = *i_commentedRef.Info(); 333*cdf0e10cSrcweir 334*cdf0e10cSrcweir bool bShort = NOT rDocu.Short().IsEmpty(); 335*cdf0e10cSrcweir bool bDescr = NOT rDocu.Description().IsEmpty(); 336*cdf0e10cSrcweir 337*cdf0e10cSrcweir if ( bShort ) 338*cdf0e10cSrcweir { 339*cdf0e10cSrcweir HF_IdlDocuTextDisplay 340*cdf0e10cSrcweir aDescription(io_env, 0, i_rScopeGivingCe); 341*cdf0e10cSrcweir 342*cdf0e10cSrcweir Xml::Element& rPara = io_context >> *new Html::Paragraph; 343*cdf0e10cSrcweir aDescription.Out().Enter( rPara ); 344*cdf0e10cSrcweir rDocu.Short().DisplayAt( aDescription ); 345*cdf0e10cSrcweir 346*cdf0e10cSrcweir // if there's more than just the summary - i.e. a description, or usage restrictions, or tags -, 347*cdf0e10cSrcweir // then add a link to the details section 348*cdf0e10cSrcweir if ( bDescr OR rDocu.IsDeprecated() OR rDocu.IsOptional() OR NOT rDocu.Tags().empty() ) 349*cdf0e10cSrcweir { 350*cdf0e10cSrcweir StreamLock aLocalLink(100); 351*cdf0e10cSrcweir aLocalLink() << "#" << get_LocalLinkName(io_env, i_commentedRef); 352*cdf0e10cSrcweir 353*cdf0e10cSrcweir aDescription.Out().Out() << "("; 354*cdf0e10cSrcweir aDescription.Out().Out() 355*cdf0e10cSrcweir >> *new Html::Link( aLocalLink().c_str() ) 356*cdf0e10cSrcweir << "details"; 357*cdf0e10cSrcweir aDescription.Out().Out() << ")"; 358*cdf0e10cSrcweir } 359*cdf0e10cSrcweir 360*cdf0e10cSrcweir aDescription.Out().Leave(); 361*cdf0e10cSrcweir } 362*cdf0e10cSrcweir } 363*cdf0e10cSrcweir 364*cdf0e10cSrcweir void 365*cdf0e10cSrcweir HF_IdlCommentedRelationElement::produce_LinkDoc( Environment & io_env, 366*cdf0e10cSrcweir const client & i_ce, 367*cdf0e10cSrcweir Xml::Element & io_context, 368*cdf0e10cSrcweir const comref & i_commentedRef, 369*cdf0e10cSrcweir const E_DocType i_docType ) 370*cdf0e10cSrcweir { 371*cdf0e10cSrcweir if ( i_commentedRef.Info() != 0 ) 372*cdf0e10cSrcweir { 373*cdf0e10cSrcweir if ( i_docType == doctype_complete ) 374*cdf0e10cSrcweir { 375*cdf0e10cSrcweir HF_DocEntryList aDocList(io_context); 376*cdf0e10cSrcweir HF_IdlDocu aDocuDisplay(io_env, aDocList); 377*cdf0e10cSrcweir 378*cdf0e10cSrcweir aDocuDisplay.Produce_fromReference(*i_commentedRef.Info(), i_ce); 379*cdf0e10cSrcweir } 380*cdf0e10cSrcweir else 381*cdf0e10cSrcweir { 382*cdf0e10cSrcweir produce_Summary(io_env, io_context, i_commentedRef, i_ce); 383*cdf0e10cSrcweir } 384*cdf0e10cSrcweir } 385*cdf0e10cSrcweir else 386*cdf0e10cSrcweir { 387*cdf0e10cSrcweir HF_DocEntryList aDocList(io_context); 388*cdf0e10cSrcweir 389*cdf0e10cSrcweir const client * 390*cdf0e10cSrcweir pCe = io_env.Linker().Search_CeFromType(i_commentedRef.Type()); 391*cdf0e10cSrcweir const ce_info * 392*cdf0e10cSrcweir pShort = pCe != 0 393*cdf0e10cSrcweir ? Get_IdlDocu(pCe->Docu()) 394*cdf0e10cSrcweir : (const ce_info *)(0); 395*cdf0e10cSrcweir if ( pShort != 0 ) 396*cdf0e10cSrcweir { 397*cdf0e10cSrcweir aDocList.Produce_NormalTerm("(referenced entity's summary:)"); 398*cdf0e10cSrcweir Xml::Element & 399*cdf0e10cSrcweir rDef = aDocList.Produce_Definition(); 400*cdf0e10cSrcweir HF_IdlDocuTextDisplay 401*cdf0e10cSrcweir aShortDisplay( io_env, &rDef, *pCe); 402*cdf0e10cSrcweir pShort->Short().DisplayAt(aShortDisplay); 403*cdf0e10cSrcweir } // end if (pShort != 0) 404*cdf0e10cSrcweir } // endif ( (*i_commentedRef).Info() != 0 ) else 405*cdf0e10cSrcweir } 406*cdf0e10cSrcweir 407*cdf0e10cSrcweir 408*cdf0e10cSrcweir String 409*cdf0e10cSrcweir HF_IdlCommentedRelationElement::get_LocalLinkName( Environment & io_env, 410*cdf0e10cSrcweir const comref & i_commentedRef ) 411*cdf0e10cSrcweir { 412*cdf0e10cSrcweir StringVector aModules; 413*cdf0e10cSrcweir String sLocalName; 414*cdf0e10cSrcweir ce_id nCe; 415*cdf0e10cSrcweir int nSequenceCount = 0; 416*cdf0e10cSrcweir 417*cdf0e10cSrcweir const ary::idl::Type & 418*cdf0e10cSrcweir rType = io_env.Data().Find_Type(i_commentedRef.Type()); 419*cdf0e10cSrcweir io_env.Data().Get_TypeText(aModules, sLocalName, nCe, nSequenceCount, rType); 420*cdf0e10cSrcweir 421*cdf0e10cSrcweir // speaking strictly, this is not correct: If we have two interfaces with the same local 422*cdf0e10cSrcweir // name, but in different modules, then the link name will be ambiguous. However, this should 423*cdf0e10cSrcweir // be too seldom a case to really make the link names that ugly by adding the module information. 424*cdf0e10cSrcweir return sLocalName; 425*cdf0e10cSrcweir } 426*cdf0e10cSrcweir 427*cdf0e10cSrcweir void 428*cdf0e10cSrcweir HF_IdlCommentedRelationElement::write_Title( const client & /*i_ce*/ ) const 429*cdf0e10cSrcweir { 430*cdf0e10cSrcweir 431*cdf0e10cSrcweir Xml::Element & 432*cdf0e10cSrcweir rAnchor = CurOut() 433*cdf0e10cSrcweir >> *new Html::Label(get_LocalLinkName(Env(), m_relation)) 434*cdf0e10cSrcweir << new Html::ClassAttr(C_sMemberTitle); 435*cdf0e10cSrcweir 436*cdf0e10cSrcweir HF_IdlTypeText 437*cdf0e10cSrcweir aText(Env(), rAnchor, true); 438*cdf0e10cSrcweir aText.Produce_byData(m_relation.Type()); 439*cdf0e10cSrcweir } 440*cdf0e10cSrcweir 441*cdf0e10cSrcweir void 442*cdf0e10cSrcweir HF_IdlCommentedRelationElement::write_Declaration( const client & /*i_ce*/ ) const 443*cdf0e10cSrcweir { 444*cdf0e10cSrcweir // nothing to do here - an entity which is a commented relation does not have a declaration 445*cdf0e10cSrcweir } 446*cdf0e10cSrcweir 447*cdf0e10cSrcweir void 448*cdf0e10cSrcweir HF_IdlCommentedRelationElement::write_Description( const client & i_ce ) const 449*cdf0e10cSrcweir { 450*cdf0e10cSrcweir produce_LinkDoc( Env(), i_ce, CurOut(), m_relation, doctype_complete ); 451*cdf0e10cSrcweir } 452