INTEGRATION: CWS adc18 (1.9.2); FILE MERGED
2007/10/19 13:03:21 np 1.9.2.3: #i81775# 2007/10/19 11:50:49 np 1.9.2.2: #i81775# 2007/10/18 15:23:13 np 1.9.2.1: #i81775#
This commit is contained in:
@@ -4,9 +4,9 @@
|
|||||||
*
|
*
|
||||||
* $RCSfile: pm_class.cxx,v $
|
* $RCSfile: pm_class.cxx,v $
|
||||||
*
|
*
|
||||||
* $Revision: 1.9 $
|
* $Revision: 1.10 $
|
||||||
*
|
*
|
||||||
* last change: $Author: vg $ $Date: 2007-09-18 13:54:28 $
|
* last change: $Author: hr $ $Date: 2007-11-02 16:31:56 $
|
||||||
*
|
*
|
||||||
* The Contents of this file are made available subject to
|
* The Contents of this file are made available subject to
|
||||||
* the terms of GNU Lesser General Public License Version 2.1.
|
* the terms of GNU Lesser General Public License Version 2.1.
|
||||||
@@ -38,11 +38,13 @@
|
|||||||
|
|
||||||
|
|
||||||
// NOT FULLY DEFINED SERVICES
|
// NOT FULLY DEFINED SERVICES
|
||||||
#include <ary/cpp/c_disply.hxx>
|
#include <ary/cpp/c_gate.hxx>
|
||||||
#include <ary/cpp/c_class.hxx>
|
#include <ary/cpp/c_class.hxx>
|
||||||
#include <ary/cpp/c_tydef.hxx>
|
#include <ary/cpp/c_tydef.hxx>
|
||||||
#include <ary/loc/l_rogate.hxx>
|
#include <ary/cpp/cp_ce.hxx>
|
||||||
#include <ary/loc/loc_file.hxx>
|
#include <ary/loc/loc_file.hxx>
|
||||||
|
#include <ary/loc/locp_le.hxx>
|
||||||
|
#include <ary/getncast.hxx>
|
||||||
#include "hd_chlst.hxx"
|
#include "hd_chlst.hxx"
|
||||||
#include "hd_docu.hxx"
|
#include "hd_docu.hxx"
|
||||||
#include "hdimpl.hxx"
|
#include "hdimpl.hxx"
|
||||||
@@ -62,6 +64,9 @@ using csi::html::Table;
|
|||||||
using csi::html::TableRow;
|
using csi::html::TableRow;
|
||||||
using csi::html::TableCell;
|
using csi::html::TableCell;
|
||||||
|
|
||||||
|
using ary::cpp::CesConstIterator;
|
||||||
|
using ary::doc::OldCppDocu;
|
||||||
|
|
||||||
const char * const C_sTitle_InnerClasses = "Classes";
|
const char * const C_sTitle_InnerClasses = "Classes";
|
||||||
const char * const C_sTitle_InnerStructs = "Structs";
|
const char * const C_sTitle_InnerStructs = "Structs";
|
||||||
const char * const C_sTitle_InnerUnions = "Unions";
|
const char * const C_sTitle_InnerUnions = "Unions";
|
||||||
@@ -150,6 +155,16 @@ PageMaker_Class::Write_NavBar()
|
|||||||
CurOut() << new HorizontalLine;
|
CurOut() << new HorizontalLine;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
inline bool
|
||||||
|
IsInterface(const ary::doc::Documentation & i_doc)
|
||||||
|
{
|
||||||
|
const OldCppDocu *
|
||||||
|
doc = Get_CppDocu(i_doc);
|
||||||
|
return doc != 0
|
||||||
|
? doc->IsInterface()
|
||||||
|
: false;
|
||||||
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
PageMaker_Class::Write_TopArea()
|
PageMaker_Class::Write_TopArea()
|
||||||
{
|
{
|
||||||
@@ -175,7 +190,7 @@ PageMaker_Class::Write_TopArea()
|
|||||||
aFlags.SetColumn( 1, "abstract",
|
aFlags.SetColumn( 1, "abstract",
|
||||||
Me().Virtuality() == ary::cpp::VIRTUAL_abstract );
|
Me().Virtuality() == ary::cpp::VIRTUAL_abstract );
|
||||||
aFlags.SetColumn( 2, "interface",
|
aFlags.SetColumn( 2, "interface",
|
||||||
Me().Info().IsInterface()
|
IsInterface(Me().Docu())
|
||||||
OR Me().Virtuality() == ary::cpp::VIRTUAL_abstract );
|
OR Me().Virtuality() == ary::cpp::VIRTUAL_abstract );
|
||||||
aFlags.SetColumn( 3, "template",
|
aFlags.SetColumn( 3, "template",
|
||||||
Me().TemplateParameters().size() > 0 );
|
Me().TemplateParameters().size() > 0 );
|
||||||
@@ -187,19 +202,17 @@ PageMaker_Class::Write_DocuArea()
|
|||||||
Docu_Display aDocuShow( Env() );
|
Docu_Display aDocuShow( Env() );
|
||||||
|
|
||||||
aDocuShow.Assign_Out(CurOut());
|
aDocuShow.Assign_Out(CurOut());
|
||||||
Me().StoreAt( aDocuShow );
|
Me().Accept( aDocuShow );
|
||||||
aDocuShow.Unassign_Out();
|
aDocuShow.Unassign_Out();
|
||||||
|
|
||||||
ary::loc::SourceCodeFile *
|
ary::loc::File &
|
||||||
pFile = Env().Gate().RoLocations().Find_File( Me().Location() );
|
rFile = Env().Gate().Locations().Find_File( Me().Location() );
|
||||||
if (pFile != 0)
|
|
||||||
{
|
|
||||||
adcdisp::ExplanationList
|
adcdisp::ExplanationList
|
||||||
aFileText( CurOut() );
|
aFileText( CurOut() );
|
||||||
aFileText.AddEntry("File");
|
aFileText.AddEntry("File");
|
||||||
aFileText.Def()
|
aFileText.Def()
|
||||||
<< pFile->Name();
|
<< rFile.LocalName();
|
||||||
}
|
|
||||||
|
|
||||||
CurOut() << new HorizontalLine;
|
CurOut() << new HorizontalLine;
|
||||||
}
|
}
|
||||||
@@ -309,9 +322,9 @@ PageMaker_Class::Write_ChildList( ary::SlotAccessId i_nSlot,
|
|||||||
ChildList_Display::Area_Result
|
ChildList_Display::Area_Result
|
||||||
aPrivate_Result( bPrivate_ChildrenExist, o_rPrivate );
|
aPrivate_Result( bPrivate_ChildrenExist, o_rPrivate );
|
||||||
|
|
||||||
udmstri sLabelPublic = ChildListLabel(i_sLabel, mp_public);
|
String sLabelPublic = ChildListLabel(i_sLabel, mp_public);
|
||||||
udmstri sLabelProtected = ChildListLabel(i_sLabel, mp_protected);
|
String sLabelProtected = ChildListLabel(i_sLabel, mp_protected);
|
||||||
udmstri sLabelPrivate = ChildListLabel(i_sLabel, mp_private);
|
String sLabelPrivate = ChildListLabel(i_sLabel, mp_private);
|
||||||
|
|
||||||
pChildDisplay->Run_Members( aPublic_Result,
|
pChildDisplay->Run_Members( aPublic_Result,
|
||||||
aProtected_Result,
|
aProtected_Result,
|
||||||
@@ -356,9 +369,9 @@ PageMaker_Class::Write_ChildList_forClasses( csi::xml::Element & o_rPublic,
|
|||||||
ChildList_Display::Area_Result
|
ChildList_Display::Area_Result
|
||||||
aPrivate_Result( bPrivate_ChildrenExist, o_rPrivate );
|
aPrivate_Result( bPrivate_ChildrenExist, o_rPrivate );
|
||||||
|
|
||||||
udmstri sLabelPublic = ChildListLabel(i_sLabel, mp_public);
|
String sLabelPublic = ChildListLabel(i_sLabel, mp_public);
|
||||||
udmstri sLabelProtected = ChildListLabel(i_sLabel, mp_protected);
|
String sLabelProtected = ChildListLabel(i_sLabel, mp_protected);
|
||||||
udmstri sLabelPrivate = ChildListLabel(i_sLabel, mp_private);
|
String sLabelPrivate = ChildListLabel(i_sLabel, mp_private);
|
||||||
|
|
||||||
pChildDisplay->Run_MemberClasses( aPublic_Result,
|
pChildDisplay->Run_MemberClasses( aPublic_Result,
|
||||||
aProtected_Result,
|
aProtected_Result,
|
||||||
@@ -444,10 +457,11 @@ PageMaker_Class::Create_NaviSubRow( E_MemberProtection i_eMpr )
|
|||||||
void
|
void
|
||||||
PageMaker_Class::Write_DerivedList()
|
PageMaker_Class::Write_DerivedList()
|
||||||
{
|
{
|
||||||
adcdisp::ExplanationList aDeriveds( CurOut() );
|
adcdisp::ExplanationList
|
||||||
|
aDeriveds( CurOut() );
|
||||||
aDeriveds.AddEntry( "Known Derived Classes" );
|
aDeriveds.AddEntry( "Known Derived Classes" );
|
||||||
|
|
||||||
if ( Me().KnownDerivatives().size() == 0 )
|
if ( Me().KnownDerivatives().Size() == 0 )
|
||||||
{
|
{
|
||||||
aDeriveds.Def() << "None.";
|
aDeriveds.Def() << "None.";
|
||||||
return;
|
return;
|
||||||
@@ -455,12 +469,14 @@ PageMaker_Class::Write_DerivedList()
|
|||||||
|
|
||||||
typedef ary::List_Rid RidList;
|
typedef ary::List_Rid RidList;
|
||||||
|
|
||||||
for ( RidList::const_iterator it = Me().KnownDerivatives().begin();
|
CesConstIterator
|
||||||
it != Me().KnownDerivatives().end();
|
itEnd = Me().KnownDerivatives().End();
|
||||||
|
for ( CesConstIterator it = Me().KnownDerivatives().Begin();
|
||||||
|
it != itEnd;
|
||||||
++it )
|
++it )
|
||||||
{
|
{
|
||||||
const ary::CodeEntity &
|
const ary::cpp::CodeEntity &
|
||||||
rCe = Env().Gate().Ref_Ce(*it);
|
rCe = Env().Gate().Ces().Find_Ce(*it);
|
||||||
|
|
||||||
aDeriveds.Def()
|
aDeriveds.Def()
|
||||||
>> *new html::Link( Link2Ce(Env(),rCe) )
|
>> *new html::Link( Link2Ce(Env(),rCe) )
|
||||||
@@ -483,8 +499,8 @@ class Node
|
|||||||
Node(
|
Node(
|
||||||
const ary::cpp::Class &
|
const ary::cpp::Class &
|
||||||
i_rClass,
|
i_rClass,
|
||||||
ary::Tid i_nClassType,
|
ary::cpp::Type_id i_nClassType,
|
||||||
const ary::cpp::DisplayGate &
|
const ary::cpp::Gate &
|
||||||
i_rGate,
|
i_rGate,
|
||||||
intt i_nPositionOffset,
|
intt i_nPositionOffset,
|
||||||
Node * io_pDerived = 0,
|
Node * io_pDerived = 0,
|
||||||
@@ -517,10 +533,10 @@ class Node
|
|||||||
intt nCountBases;
|
intt nCountBases;
|
||||||
Node * pDerived;
|
Node * pDerived;
|
||||||
|
|
||||||
udmstri sName;
|
String sName;
|
||||||
const ary::cpp::Class *
|
const ary::cpp::Class *
|
||||||
pClass;
|
pClass;
|
||||||
ary::Tid nClassType;
|
ary::cpp::Type_id nClassType;
|
||||||
ary::cpp::E_Protection
|
ary::cpp::E_Protection
|
||||||
eProtection;
|
eProtection;
|
||||||
bool bVirtual;
|
bool bVirtual;
|
||||||
@@ -536,9 +552,9 @@ void WriteNodeHierarchy(
|
|||||||
|
|
||||||
const ary::cpp::Class *
|
const ary::cpp::Class *
|
||||||
HereFind_Class(
|
HereFind_Class(
|
||||||
const ary::cpp::DisplayGate &
|
const ary::cpp::Gate &
|
||||||
i_rGate,
|
i_rGate,
|
||||||
ary::Tid i_nReferingTypeId );
|
ary::cpp::Type_id i_nReferingTypeId );
|
||||||
|
|
||||||
} // anonymous namespace
|
} // anonymous namespace
|
||||||
|
|
||||||
@@ -555,7 +571,7 @@ PageMaker_Class::Write_BaseHierarchy()
|
|||||||
else
|
else
|
||||||
{
|
{
|
||||||
Dyn< Node >
|
Dyn< Node >
|
||||||
pBaseGraph( new Node(Me(), 0, Env().Gate(), 0) );
|
pBaseGraph( new Node(Me(), ary::cpp::Type_id(0), Env().Gate(), 0) );
|
||||||
WriteNodeHierarchy( aBases.Def(), Env(), *pBaseGraph );
|
WriteNodeHierarchy( aBases.Def(), Env(), *pBaseGraph );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -635,45 +651,46 @@ WriteNodeHierarchy( csi::xml::Element & o_rOut,
|
|||||||
}
|
}
|
||||||
|
|
||||||
const ary::cpp::Class *
|
const ary::cpp::Class *
|
||||||
HereFind_Class( const ary::cpp::DisplayGate & i_rGate,
|
HereFind_Class( const ary::cpp::Gate & i_rGate,
|
||||||
ary::Tid i_nReferingTypeId )
|
ary::cpp::Type_id i_nReferingTypeId )
|
||||||
{
|
{
|
||||||
const ary::CodeEntity * pCe = i_rGate.Search_RelatedCe( i_nReferingTypeId );
|
const ary::cpp::CodeEntity *
|
||||||
|
pCe = i_rGate.Search_RelatedCe( i_nReferingTypeId );
|
||||||
|
|
||||||
if ( pCe != 0 )
|
if ( pCe != 0 )
|
||||||
{
|
{
|
||||||
if (pCe->RC() == ary::cpp::Class::RC_())
|
if ( ary::is_type<ary::cpp::Class>(*pCe) )
|
||||||
{
|
{
|
||||||
return static_cast< const ary::cpp::Class* >(pCe);
|
return ary::ary_cast<ary::cpp::Class>(pCe);
|
||||||
}
|
}
|
||||||
else if (pCe->RC() == ary::cpp::Typedef::RC_())
|
else if ( ary::is_type<ary::cpp::Typedef>(*pCe) )
|
||||||
{
|
{
|
||||||
const ary::cpp::Typedef *
|
const ary::cpp::Typedef *
|
||||||
pTydef = static_cast< const ary::cpp::Typedef* >(pCe);
|
pTydef = ary::ary_cast<ary::cpp::Typedef>(pCe);
|
||||||
return HereFind_Class( i_rGate, pTydef->DescribingType() );
|
return HereFind_Class( i_rGate, pTydef->DescribingType() );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
static const ary::cpp::Class aClassNull_( 0,
|
static const ary::cpp::Class aClassNull_( "Base class not found",
|
||||||
"Base class not found",
|
ary::cpp::Ce_id(0),
|
||||||
0,
|
|
||||||
ary::cpp::PROTECT_global,
|
ary::cpp::PROTECT_global,
|
||||||
0,
|
ary::loc::Le_id(0),
|
||||||
ary::cpp::CK_class );
|
ary::cpp::CK_class );
|
||||||
return &aClassNull_;
|
return &aClassNull_;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
//********************* Node ***********************//
|
//********************* Node ***********************//
|
||||||
|
|
||||||
Node::Node( const ary::cpp::Class & i_rClass,
|
Node::Node( const ary::cpp::Class & i_rClass,
|
||||||
ary::Tid i_nClassType,
|
ary::cpp::Type_id i_nClassType,
|
||||||
const ary::cpp::DisplayGate & i_rGate,
|
const ary::cpp::Gate & i_rGate,
|
||||||
intt i_nPositionOffset,
|
intt i_nPositionOffset,
|
||||||
Node * io_pDerived,
|
Node * io_pDerived,
|
||||||
ary::cpp::E_Protection i_eProtection,
|
ary::cpp::E_Protection i_eProtection,
|
||||||
bool i_bVirtual )
|
bool i_bVirtual )
|
||||||
: // aBases,
|
: aBases(),
|
||||||
nCountBases(0),
|
nCountBases(0),
|
||||||
pDerived(io_pDerived),
|
pDerived(io_pDerived),
|
||||||
pClass(&i_rClass),
|
pClass(&i_rClass),
|
||||||
@@ -691,15 +708,6 @@ Node::Node( const ary::cpp::Class & i_rClass,
|
|||||||
const ary::cpp::Class *
|
const ary::cpp::Class *
|
||||||
pBaseClass = HereFind_Class( i_rGate, (*it).nId );
|
pBaseClass = HereFind_Class( i_rGate, (*it).nId );
|
||||||
|
|
||||||
#if 0 // only for debugging
|
|
||||||
if ( pBaseClass->Id() == 0 )
|
|
||||||
{
|
|
||||||
Cerr() << "\nWarning: A baseclass not found of class "
|
|
||||||
<< i_rClass.LocalName()
|
|
||||||
<< Endl();
|
|
||||||
}
|
|
||||||
#endif // 0
|
|
||||||
|
|
||||||
Dyn<Node>
|
Dyn<Node>
|
||||||
pBase( new Node(*pBaseClass,
|
pBase( new Node(*pBaseClass,
|
||||||
(*it).nId,
|
(*it).nId,
|
||||||
|
Reference in New Issue
Block a user