From 2aef3f79ebc34107a7dd5c9f40af4bf0f1140d73 Mon Sep 17 00:00:00 2001 From: RĂ¼diger Timm Date: Mon, 8 Dec 2008 12:49:49 +0000 Subject: CWS-TOOLING: integrate CWS betterautoifacedoc 2008-12-03 07:40:21 +0100 fs r264742 : #i86469# for interfaces, have a 'Summary' and a 'Details' section, for greatly enhanced readability 2008-12-02 13:59:13 +0100 fs r264698 : #i10000# --- autodoc/source/display/idl/hfi_doc.cxx | 149 +------------------ autodoc/source/display/idl/hfi_doc.hxx | 14 -- autodoc/source/display/idl/hfi_property.cxx | 164 +++++++++++++++++++- autodoc/source/display/idl/hfi_property.hxx | 49 +++++- autodoc/source/display/idl/hfi_service.cxx | 222 ++++++++++++++++------------ autodoc/source/display/idl/hfi_service.hxx | 25 ++-- autodoc/source/display/idl/hi_factory.cxx | 2 +- autodoc/source/display/idl/hi_factory.hxx | 7 + 8 files changed, 362 insertions(+), 270 deletions(-) (limited to 'autodoc') diff --git a/autodoc/source/display/idl/hfi_doc.cxx b/autodoc/source/display/idl/hfi_doc.cxx index e64861ce3d95..4f4d6f459fde 100644 --- a/autodoc/source/display/idl/hfi_doc.cxx +++ b/autodoc/source/display/idl/hfi_doc.cxx @@ -54,154 +54,17 @@ HF_IdlDocu::~HF_IdlDocu() { } -// KORR_FUTURE -// Should not be used any longer. -// Use Produce_byCesOwnDocu() or Produce_byDocu4Reference() -// instead. void -HF_IdlDocu::Produce_byData( const client & i_ce, - const ce_info * i_doc ) const +HF_IdlDocu::Produce_byDocu4Reference( const ce_info & i_rDocuForReference, + const client & i_rScopeGivingCe ) const { - const ce_info * i_pDocu = i_doc != 0 - ? i_doc - : Get_IdlDocu(i_ce.Docu()); - if (i_pDocu == 0) - return; - - bool bShort = NOT i_pDocu->Short().IsEmpty(); - bool bDescr = NOT i_pDocu->Description().IsEmpty(); - - - if ( i_pDocu->IsDeprecated() AND i_ce.SightLevel() != ary::idl::sl_File - OR - i_pDocu->IsOptional() ) - { - rOut.Produce_Term("Usage Restrictions"); - - if ( i_pDocu->IsDeprecated() ) - rOut.Produce_Definition() >> *new Html::Italic << "deprecated"; - if ( i_pDocu->IsOptional() ) - rOut.Produce_Definition() >> *new Html::Italic << "optional"; - } - - if ( i_pDocu->IsDeprecated() - AND - // KORR_FUTURE - // Workaround, because DocuTex2::IsEmpty() does not - // calculate whitespace tokens only as empty. - i_pDocu->DeprecatedText().Tokens().size() > 1 ) - { - rOut.Produce_Term("Deprecation Info"); - - HF_IdlDocuTextDisplay - aDescription( Env(), 0, i_ce); - aDescription.Out().Enter( rOut.Produce_Definition() ); - i_pDocu->DeprecatedText().DisplayAt( aDescription ); - aDescription.Out().Leave(); - } - - if ( bShort OR bDescr ) - { - rOut.Produce_Term("Description"); - HF_IdlDocuTextDisplay - aDescription( Env(), 0, i_ce); - if (bShort) - { - aDescription.Out().Enter( rOut.Produce_Definition() ); - i_pDocu->Short().DisplayAt( aDescription ); - aDescription.Out().Leave(); - } - if (bDescr) - { - aDescription.Out().Enter( rOut.Produce_Definition() ); - i_pDocu->Description().DisplayAt( aDescription ); - aDescription.Out().Leave(); - } - } - - std::vector< csi::dsapi::DT_SeeAlsoAtTag* > - aSeeAlsosWithoutText; - std::vector< csi::dsapi::DT_SeeAlsoAtTag* > - aSeeAlsosWithText; - - for ( std::vector< ary::inf::AtTag2* >::const_iterator - iter = i_pDocu->Tags().begin(); - iter != i_pDocu->Tags().end(); - ++iter ) - { - if ( strlen( (*iter)->Title() ) > 0 ) - { - csi::dsapi::DT_SeeAlsoAtTag* - pSeeAlso = dynamic_cast< csi::dsapi::DT_SeeAlsoAtTag * >(*iter); - if (pSeeAlso != 0 ) - { - if ( pSeeAlso->Text().IsEmpty() ) - { - aSeeAlsosWithoutText.push_back(pSeeAlso); - } - else - { - aSeeAlsosWithText.push_back(pSeeAlso); - } - continue; - } - - HF_IdlTag - aTag(Env(), i_ce); - Xml::Element & - rTerm = rOut.Produce_Term(); - aTag.Produce_byData( rTerm, - rOut.Produce_Definition(), - *(*iter) ); - } - } // end for - - if (aSeeAlsosWithoutText.size() > 0) - { - HF_IdlTag - aSeeAlsoTag(Env(), i_ce); - Xml::Element & - rTerm = rOut.Produce_Term(); - aSeeAlsoTag.Produce_byData( rTerm, - rOut.Produce_Definition(), - aSeeAlsosWithoutText ); - } - - for ( std::vector< csi::dsapi::DT_SeeAlsoAtTag* >::const_iterator - itSee2 = aSeeAlsosWithText.begin(); - itSee2 != aSeeAlsosWithText.end(); - ++itSee2 ) - { - HF_IdlTag - aTag(Env(), i_ce); - Xml::Element & - rTerm = rOut.Produce_Term(); - aTag.Produce_byData( rTerm, - rOut.Produce_Definition(), - *(*itSee2) ); - } // end for -} - -void -HF_IdlDocu::Produce_byCesOwnDocu( const client & i_ce ) const -{ - const ce_info * - i_pDocu = Get_IdlDocu(i_ce.Docu()); - if (i_pDocu != 0) - Produce_byDocuAndScope(*i_pDocu, &i_ce, i_ce); -} - -void -HF_IdlDocu::Produce_byDocu4Reference( const ce_info & i_rDocuForReference, - const client & i_rScopeGivingCe ) const -{ - Produce_byDocuAndScope(i_rDocuForReference, 0, i_rScopeGivingCe); + Produce_byDocuAndScope(i_rDocuForReference, 0, i_rScopeGivingCe ); } void -HF_IdlDocu::Produce_byDocuAndScope( const ce_info & i_rDocu, - const client * i_pClient, - const client & i_rScopeGivingCe ) const +HF_IdlDocu::Produce_byDocuAndScope( const ce_info & i_rDocu, + const client * i_pClient, + const client & i_rScopeGivingCe ) const { bool bShort = NOT i_rDocu.Short().IsEmpty(); bool bDescr = NOT i_rDocu.Description().IsEmpty(); diff --git a/autodoc/source/display/idl/hfi_doc.hxx b/autodoc/source/display/idl/hfi_doc.hxx index f7bf34e116db..b44fd4822770 100644 --- a/autodoc/source/display/idl/hfi_doc.hxx +++ b/autodoc/source/display/idl/hfi_doc.hxx @@ -52,20 +52,6 @@ class HF_IdlDocu : public HtmlFactory_Idl virtual ~HF_IdlDocu(); - /** @Deprecated - Use on of: - ->Produce_byCesOwnDocu() - ->Produce_byDocu4Reference() - */ - void Produce_byData( - const client & i_ce, - const ce_info * i_doc = 0 ) const; - - /** Produces documentation by the CodeInfo accompanying - ->i_ce. - */ - void Produce_byCesOwnDocu( - const client & i_ce ) const; /** Produces documentation by the CodeInfo accompanying a link or reference to a CodeEntity. diff --git a/autodoc/source/display/idl/hfi_property.cxx b/autodoc/source/display/idl/hfi_property.cxx index aa752356fdb8..282095578a6c 100644 --- a/autodoc/source/display/idl/hfi_property.cxx +++ b/autodoc/source/display/idl/hfi_property.cxx @@ -42,20 +42,19 @@ #include #include #include "hfi_typetext.hxx" +#include "hfi_doc.hxx" +#include "hfi_tag.hxx" +#include "hi_env.hxx" +#include "hi_ary.hxx" +#include "hi_linkhelper.hxx" void HF_IdlDataMember::Produce_byData( const client & ce ) const { - // Title: - CurOut() - >> *new Html::Label(ce.LocalName()) - << new Html::ClassAttr(C_sMemberTitle) - << ce.LocalName(); - + write_Title(ce); enter_ContentCell(); write_Declaration(ce); - CurOut() << new Html::HorizontalLine; - write_Docu(CurOut(), ce); + write_Description(ce); leave_ContentCell(); } @@ -77,6 +76,22 @@ const String sContentSpacing("0"); const String sBgWhite("#ffffff"); const String sCenter("center"); +void +HF_IdlDataMember::write_Title( const client & i_ce ) const +{ + CurOut() + >> *new Html::Label(i_ce.LocalName()) + << new Html::ClassAttr(C_sMemberTitle) + << i_ce.LocalName(); +} + +void +HF_IdlDataMember::write_Description( const client & i_ce ) const +{ + CurOut() << new Html::HorizontalLine; + write_Docu(CurOut(), i_ce); +} + void HF_IdlDataMember::enter_ContentCell() const { @@ -304,3 +319,136 @@ HF_IdlStructElement::write_Declaration( const client & i_ce ) const << ";"; } +HF_IdlCommentedRelationElement::~HF_IdlCommentedRelationElement() +{ +} + +void +HF_IdlCommentedRelationElement::produce_Summary( Environment & io_env, + Xml::Element & io_context, + const comref & i_commentedRef, + const client & i_rScopeGivingCe ) +{ + csv_assert( i_commentedRef.Info() ); + + const ary::idl::Type_id aType = i_commentedRef.Type(); + const ce_info & rDocu = *i_commentedRef.Info(); + + bool bShort = NOT rDocu.Short().IsEmpty(); + bool bDescr = NOT rDocu.Description().IsEmpty(); + + if ( bShort ) + { + HF_IdlDocuTextDisplay + aDescription(io_env, 0, i_rScopeGivingCe); + + Xml::Element& rPara = io_context >> *new Html::Paragraph; + aDescription.Out().Enter( rPara ); + rDocu.Short().DisplayAt( aDescription ); + + // if there's more than just the summary - i.e. a description, or usage restrictions, or tags -, + // then add a link to the details section + if ( bDescr OR rDocu.IsDeprecated() OR rDocu.IsOptional() OR NOT rDocu.Tags().empty() ) + { + StreamLock aLocalLink(100); + aLocalLink() << "#" << get_LocalLinkName(io_env, i_commentedRef); + + aDescription.Out().Out() << "("; + aDescription.Out().Out() + >> *new Html::Link( aLocalLink().c_str() ) + << "details"; + aDescription.Out().Out() << ")"; + } + + aDescription.Out().Leave(); + } +} + +void +HF_IdlCommentedRelationElement::produce_LinkDoc( Environment & io_env, + const client & i_ce, + Xml::Element & io_context, + const comref & i_commentedRef, + const E_DocType i_docType ) +{ + if ( i_commentedRef.Info() != 0 ) + { + if ( i_docType == doctype_complete ) + { + HF_DocEntryList aDocList(io_context); + HF_IdlDocu aDocuDisplay(io_env, aDocList); + + aDocuDisplay.Produce_byDocu4Reference(*i_commentedRef.Info(), i_ce); + } + else + { + produce_Summary(io_env, io_context, i_commentedRef, i_ce); + } + } + else + { + HF_DocEntryList aDocList(io_context); + + const client * + pCe = io_env.Linker().Search_CeFromType(i_commentedRef.Type()); + const ce_info * + pShort = pCe != 0 + ? Get_IdlDocu(pCe->Docu()) + : (const ce_info *)(0); + if ( pShort != 0 ) + { + aDocList.Produce_NormalTerm("(referenced entity's summary:)"); + Xml::Element & + rDef = aDocList.Produce_Definition(); + HF_IdlDocuTextDisplay + aShortDisplay( io_env, &rDef, *pCe); + pShort->Short().DisplayAt(aShortDisplay); + } // end if (pShort != 0) + } // endif ( (*i_commentedRef).Info() != 0 ) else +} + + +String +HF_IdlCommentedRelationElement::get_LocalLinkName( Environment & io_env, + const comref & i_commentedRef ) +{ + StringVector aModules; + String sLocalName; + ce_id nCe; + int nSequenceCount = 0; + + const ary::idl::Type & + rType = io_env.Data().Find_Type(i_commentedRef.Type()); + io_env.Data().Get_TypeText(aModules, sLocalName, nCe, nSequenceCount, rType); + + // speaking strictly, this is not correct: If we have two interfaces with the same local + // name, but in different modules, then the link name will be ambiguous. However, this should + // be too seldom a case to really make the link names that ugly by adding the module information. + return sLocalName; +} + +void +HF_IdlCommentedRelationElement::write_Title( const client & /*i_ce*/ ) const +{ + + Xml::Element & + rAnchor = CurOut() + >> *new Html::Label(get_LocalLinkName(Env(), m_relation)) + << new Html::ClassAttr(C_sMemberTitle); + + HF_IdlTypeText + aText(Env(), rAnchor, true); + aText.Produce_byData(m_relation.Type()); +} + +void +HF_IdlCommentedRelationElement::write_Declaration( const client & /*i_ce*/ ) const +{ + // nothing to do here - an entity which is a commented relation does not have a declaration +} + +void +HF_IdlCommentedRelationElement::write_Description( const client & i_ce ) const +{ + produce_LinkDoc( Env(), i_ce, CurOut(), m_relation, doctype_complete ); +} diff --git a/autodoc/source/display/idl/hfi_property.hxx b/autodoc/source/display/idl/hfi_property.hxx index 5080acf39bff..283ee554feb5 100644 --- a/autodoc/source/display/idl/hfi_property.hxx +++ b/autodoc/source/display/idl/hfi_property.hxx @@ -38,6 +38,7 @@ #include "hi_factory.hxx" // COMPONENTS // PARAMETERS +#include class HF_SubTitleTable; @@ -53,10 +54,15 @@ class HF_IdlDataMember : public HtmlFactory_Idl virtual ~HF_IdlDataMember() {} private: - /// @descr Must enclose writing a horizontal line. + virtual void write_Title( + const client & i_ce ) const; + virtual void write_Declaration( const client & i_ce ) const = 0; + virtual void write_Description( + const client & i_ce ) const; + void enter_ContentCell() const; void leave_ContentCell() const; }; @@ -134,5 +140,46 @@ class HF_IdlStructElement : public HF_IdlDataMember const client & i_ce ) const; }; +class HF_IdlCommentedRelationElement : public HF_IdlDataMember +{ + public: + HF_IdlCommentedRelationElement( + Environment & io_rEnv, + HF_SubTitleTable & o_table, + const ary::idl::CommentedRelation& i_relation ) + : HF_IdlDataMember(io_rEnv, o_table) + , m_relation( i_relation ) + { + } + virtual ~HF_IdlCommentedRelationElement(); + + typedef ::ary::idl::CommentedRelation comref; + + static void produce_LinkDoc( + Environment & io_env, + const client & i_ce, + Xml::Element & io_context, + const comref & i_commentedRef, + const E_DocType i_docType ); + + private: + virtual void write_Title( + const client & i_ce ) const; + virtual void write_Declaration( + const client & i_ce ) const; + virtual void write_Description( + const client & i_ce ) const; + private: + static void produce_Summary( Environment & io_env, + Xml::Element & io_context, + const comref & i_commentedRef, + const client & i_rScopeGivingCe ); + + static String get_LocalLinkName( Environment & io_env, + const comref & i_commentedRef ); + + private: + const ary::idl::CommentedRelation& m_relation; +}; #endif diff --git a/autodoc/source/display/idl/hfi_service.cxx b/autodoc/source/display/idl/hfi_service.cxx index 930af25f0d84..7fd3553e6c41 100644 --- a/autodoc/source/display/idl/hfi_service.cxx +++ b/autodoc/source/display/idl/hfi_service.cxx @@ -57,13 +57,29 @@ namespace { const String - C_sList_IncludedServices("Included Services"); + C_sList_IncludedServices("Services' Summary"); const String - C_sList_IncludedServices_Label("IncludedServices"); + C_sList_IncludedServices_Heading("Included Services - Summary"); const String - C_sList_ExportedInterfaces("Exported Interfaces"); + C_sList_IncludedServices_Label("ServicesSummary"); const String - C_sList_ExportedInterfaces_Label("ExportedInterfaces"); + C_sList_IncludedServicesDetails("Services' Details"); +const String + C_sList_IncludedServicesDetails_Heading("Included Services - Details"); +const String + C_sList_IncludedServicesDetails_Label("ServicesDetails"); +const String + C_sList_ExportedInterfaces("Interfaces' Summary"); +const String + C_sList_ExportedInterfaces_Heading("Exported Interfaces - Summary"); +const String + C_sList_ExportedInterfaces_Label("InterfacesSummary"); +const String + C_sList_ExportedInterfacesDetails("Interfaces' Details"); +const String + C_sList_ExportedInterfacesDetails_Heading("Exported Interfaces - Details"); +const String + C_sList_ExportedInterfacesDetails_Label("InterfacesDetails"); const String C_sList_Properties("Properties' Summary"); const String @@ -76,10 +92,12 @@ const String enum E_SubListIndices { - sli_IncludedServices = 0, - sli_ExportedInterfaces = 1, + sli_IncludedServicesSummary = 0, + sli_InterfacesSummary = 1, sli_PropertiesSummary = 2, - sli_PropertiesDetails = 3 + sli_IncludedServicesDetails = 3, + sli_InterfacesDetails = 4, + sli_PropertiesDetails = 5 }; } //anonymous namespace @@ -101,6 +119,43 @@ typedef ::ary::idl::ifc_service::attr typedef ::ary::Dyn_StdConstIterator< ::ary::idl::CommentedRelation > dyn_comref_list; +void +HF_IdlService::produce_CommentedRelations( const client & i_ce, + comref_list & it_list, + const String & i_summaryTitle, + const String & i_summaryLabel, + const String & i_detailsTitle, + const String & i_detailsLabel, + const E_DocType i_docType ) const +{ + csv_assert( it_list ); + + bool bSummaryOnly = ( i_docType == doctype_summaryOnly ); + HF_SubTitleTable aTable( + CurOut(), + bSummaryOnly ? i_summaryLabel : i_detailsLabel, + bSummaryOnly ? i_summaryTitle : i_detailsTitle, + 2 ); + + for ( ; it_list; ++it_list ) + { + Xml::Element & + rRow = aTable.Add_Row(); + + if ( bSummaryOnly ) + { + produce_Link(rRow, (*it_list).Type()); + produce_LinkSummary(i_ce, rRow, *it_list); + } + else + { + HF_IdlCommentedRelationElement + aRelation( Env(), aTable, *it_list ); + aRelation.Produce_byData( i_ce ); + } + } // end for +} + void HF_IdlService::Produce_byData( const client & i_ce ) const { @@ -118,26 +173,37 @@ HF_IdlService::Produce_byData( const client & i_ce ) const write_Docu(aTitle.Add_Row(), i_ce); CurOut() << new Html::HorizontalLine(); - dyn_comref_list - dpIncludedServices; + // produce ... + // - included services: summary + dyn_comref_list dpIncludedServices; ServiceAttr::Get_IncludedServices(dpIncludedServices, i_ce); if ( (*dpIncludedServices).operator bool() ) { - produce_IncludedServices( i_ce, *dpIncludedServices ); - pNaviSubRow->SwitchOn(sli_IncludedServices); + produce_CommentedRelations( i_ce, *dpIncludedServices, + C_sList_IncludedServices_Heading, + C_sList_IncludedServices_Label, + C_sList_IncludedServicesDetails_Heading, + C_sList_IncludedServicesDetails_Label, + doctype_summaryOnly ); + pNaviSubRow->SwitchOn(sli_IncludedServicesSummary); } - dyn_comref_list - dpExportedInterfaces; + // - exported interfaces: summary + dyn_comref_list dpExportedInterfaces; ServiceAttr::Get_ExportedInterfaces(dpExportedInterfaces, i_ce); if ( (*dpExportedInterfaces).operator bool() ) { - produce_ExportedInterfaces( i_ce, *dpExportedInterfaces ); - pNaviSubRow->SwitchOn(sli_ExportedInterfaces); + produce_CommentedRelations( i_ce, *dpExportedInterfaces, + C_sList_ExportedInterfaces_Heading, + C_sList_ExportedInterfaces_Label, + C_sList_ExportedInterfacesDetails_Heading, + C_sList_ExportedInterfacesDetails_Label, + doctype_summaryOnly ); + pNaviSubRow->SwitchOn(sli_InterfacesSummary); } - dyn_ce_list - dpProperties; + // - supported properties: summary + dyn_ce_list dpProperties; ServiceAttr::Get_Properties(dpProperties, i_ce); if ( (*dpProperties).operator bool() ) { @@ -145,8 +211,47 @@ HF_IdlService::Produce_byData( const client & i_ce ) const C_sList_Properties, C_sList_Properties_Label, C_sList_PropertiesDetails, - C_sList_PropertiesDetails_Label ); + C_sList_PropertiesDetails_Label, + viewtype_summary ); pNaviSubRow->SwitchOn(sli_PropertiesSummary); + } + + // - included services: details + ServiceAttr::Get_IncludedServices(dpIncludedServices, i_ce); + if ( (*dpIncludedServices).operator bool() ) + { + produce_CommentedRelations( i_ce, *dpIncludedServices, + C_sList_IncludedServices_Heading, + C_sList_IncludedServices_Label, + C_sList_IncludedServicesDetails_Heading, + C_sList_IncludedServicesDetails_Label, + doctype_complete ); + pNaviSubRow->SwitchOn(sli_IncludedServicesDetails); + } + + // - exported interfaces: details + ServiceAttr::Get_ExportedInterfaces(dpExportedInterfaces, i_ce); + if ( (*dpExportedInterfaces).operator bool() ) + { + produce_CommentedRelations( i_ce, *dpExportedInterfaces, + C_sList_ExportedInterfaces_Heading, + C_sList_ExportedInterfaces_Label, + C_sList_ExportedInterfacesDetails_Heading, + C_sList_ExportedInterfacesDetails_Label, + doctype_complete ); + pNaviSubRow->SwitchOn(sli_InterfacesDetails); + } + + // supported properties: details + ServiceAttr::Get_Properties(dpProperties, i_ce); + if ( (*dpProperties).operator bool() ) + { + produce_Members( *dpProperties, + C_sList_Properties, + C_sList_Properties_Label, + C_sList_PropertiesDetails, + C_sList_PropertiesDetails_Label, + viewtype_details ); pNaviSubRow->SwitchOn(sli_PropertiesDetails); } @@ -214,54 +319,14 @@ HF_IdlService::make_Navibar( const client & i_ce ) const ret.AddItem(C_sList_IncludedServices, C_sList_IncludedServices_Label, false); ret.AddItem(C_sList_ExportedInterfaces, C_sList_ExportedInterfaces_Label, false); ret.AddItem(C_sList_Properties, C_sList_Properties_Label, false); + ret.AddItem(C_sList_IncludedServicesDetails, C_sList_IncludedServicesDetails_Label, false); + ret.AddItem(C_sList_ExportedInterfacesDetails, C_sList_ExportedInterfacesDetails_Label, false); ret.AddItem(C_sList_PropertiesDetails, C_sList_PropertiesDetails_Label, false); CurOut() << new Html::HorizontalLine(); return ret; } -void -HF_IdlService::produce_IncludedServices( const client & i_ce, - comref_list & it_list ) const -{ - csv_assert( it_list ); - - HF_SubTitleTable - aTable( CurOut(), - C_sList_IncludedServices_Label, - C_sList_IncludedServices, - 2 ); - - for ( ; it_list.operator bool(); ++it_list ) - { - Xml::Element & - rRow = aTable.Add_Row(); - produce_Link(rRow, (*it_list).Type()); - produce_LinkDoc(i_ce, rRow, it_list); - } // end for -} - -void -HF_IdlService::produce_ExportedInterfaces( const client & i_ce, - comref_list & it_list ) const -{ - csv_assert( it_list ); - - HF_SubTitleTable - aTable( CurOut(), - C_sList_ExportedInterfaces_Label, - C_sList_ExportedInterfaces, - 2 ); - - for ( ; it_list; ++it_list ) - { - Xml::Element & - rRow = aTable.Add_Row(); - produce_Link(rRow, (*it_list).Type()); - produce_LinkDoc(i_ce, rRow, it_list); - } // end for -} - void HF_IdlService::produce_Link( Xml::Element & o_row, type_id i_type ) const @@ -276,47 +341,18 @@ HF_IdlService::produce_Link( Xml::Element & o_row, } void -HF_IdlService::produce_LinkDoc( const client & i_ce, - Xml::Element & o_row, - comref_list & i_commentedRef ) const +HF_IdlService::produce_LinkSummary( const client & i_ce, + Xml::Element & o_row, + const comref & i_commentedRef ) const { Xml::Element & rCell = o_row >> *new Html::TableCell << new Html::ClassAttr(C_sCellStyle_SummaryRight); - HF_DocEntryList - aDocList(rCell); - - if ( (*i_commentedRef).Info() != 0 ) - { -// aDocList.Produce_Term("Comment on Reference"); - - HF_IdlDocu - aDocuDisplay(Env(), aDocList); - aDocuDisplay.Produce_byDocu4Reference(*(*i_commentedRef).Info(), i_ce); - } - else - { - const client * - pCe = Env().Linker().Search_CeFromType((*i_commentedRef).Type()); - const ce_info * - pShort = pCe != 0 - ? Get_IdlDocu(pCe->Docu()) - : (const ce_info *)(0); - if ( pShort != 0 ) - { - aDocList.Produce_NormalTerm("(referenced entity's summary:)"); - Xml::Element & - rDef = aDocList.Produce_Definition(); - HF_IdlDocuTextDisplay - aShortDisplay( Env(), &rDef, *pCe); - pShort->Short().DisplayAt(aShortDisplay); - } // end if (pShort != 0) - } // endif ( (*i_commentedRef).Info() != 0 ) else + HF_IdlCommentedRelationElement::produce_LinkDoc( Env(), i_ce, rCell, i_commentedRef, doctype_summaryOnly ); } - void HF_IdlService::produce_MemberDetails( HF_SubTitleTable & o_table, const client & i_ce ) const diff --git a/autodoc/source/display/idl/hfi_service.hxx b/autodoc/source/display/idl/hfi_service.hxx index 4a94075d60be..54b567dcc28f 100644 --- a/autodoc/source/display/idl/hfi_service.hxx +++ b/autodoc/source/display/idl/hfi_service.hxx @@ -45,7 +45,9 @@ class HF_SubTitleTable; class HF_IdlService : public HtmlFactory_Idl { public: - typedef ::ary::StdConstIterator< ::ary::idl::CommentedRelation> comref_list; + typedef ::ary::idl::CommentedRelation comref; + typedef ::ary::StdConstIterator< comref > comref_list; + HF_IdlService( Environment & io_rEnv, Xml::Element & o_rOut ); @@ -63,24 +65,27 @@ class HF_IdlService : public HtmlFactory_Idl DYN HF_NaviSubRow & make_Navibar( const client & i_ce ) const; - void produce_IncludedServices( - const client & i_ce, - comref_list & it_list ) const; - void produce_ExportedInterfaces( - const client & i_ce, - comref_list & it_list ) const; - void produce_Link( Xml::Element & o_row, type_id i_type ) const; - void produce_LinkDoc( + void produce_LinkSummary( const client & i_ce, Xml::Element & o_row, - comref_list & i_commentedRef ) const; + const comref & i_commentedRef ) const; void produce_MemberDetails( /// of property HF_SubTitleTable & o_table, const client & i_ce ) const; + + void produce_CommentedRelations( + const client & i_ce, + comref_list & it_list, + const String & i_summaryTitle, + const String & i_summaryLabel, + const String & i_detailsTitle, + const String & i_detailsLabel, + const E_DocType i_docType ) const; + }; diff --git a/autodoc/source/display/idl/hi_factory.cxx b/autodoc/source/display/idl/hi_factory.cxx index 92b8be7d8143..04ac8e3d2c13 100644 --- a/autodoc/source/display/idl/hi_factory.cxx +++ b/autodoc/source/display/idl/hi_factory.cxx @@ -224,7 +224,7 @@ HtmlFactory_Idl::write_Docu( Xml::Element & o_screen, aDocuList( o_screen ); HF_IdlDocu aDocu( Env(), aDocuList ); - aDocu.Produce_byData(i_ce); + aDocu.Produce_byDocu4Reference(*doc, i_ce); } write_ManualLinks(o_screen, i_ce); diff --git a/autodoc/source/display/idl/hi_factory.hxx b/autodoc/source/display/idl/hi_factory.hxx index 8005279b91b4..3df0d29619dc 100644 --- a/autodoc/source/display/idl/hi_factory.hxx +++ b/autodoc/source/display/idl/hi_factory.hxx @@ -71,6 +71,13 @@ class HtmlFactory_Idl : public HtmlFactory viewtype_details, // the details of the members viewtype_complete // everything }; + + enum E_DocType + { + doctype_summaryOnly, // only the summary + doctype_complete // the complete documentation + }; + public: typedef ary::idl::CodeEntity client; typedef ary::idl::Ce_id ce_id; -- cgit