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 "pm_class.hxx" 30*cdf0e10cSrcweir 31*cdf0e10cSrcweir 32*cdf0e10cSrcweir // NOT FULLY DEFINED SERVICES 33*cdf0e10cSrcweir #include <ary/cpp/c_gate.hxx> 34*cdf0e10cSrcweir #include <ary/cpp/c_class.hxx> 35*cdf0e10cSrcweir #include <ary/cpp/c_tydef.hxx> 36*cdf0e10cSrcweir #include <ary/cpp/cp_ce.hxx> 37*cdf0e10cSrcweir #include <ary/loc/loc_file.hxx> 38*cdf0e10cSrcweir #include <ary/loc/locp_le.hxx> 39*cdf0e10cSrcweir #include <ary/getncast.hxx> 40*cdf0e10cSrcweir #include "hd_chlst.hxx" 41*cdf0e10cSrcweir #include "hd_docu.hxx" 42*cdf0e10cSrcweir #include "hdimpl.hxx" 43*cdf0e10cSrcweir #include "html_kit.hxx" 44*cdf0e10cSrcweir #include "navibar.hxx" 45*cdf0e10cSrcweir #include "opageenv.hxx" 46*cdf0e10cSrcweir #include "pagemake.hxx" 47*cdf0e10cSrcweir #include "strconst.hxx" 48*cdf0e10cSrcweir 49*cdf0e10cSrcweir using namespace adcdisp; 50*cdf0e10cSrcweir 51*cdf0e10cSrcweir using namespace csi; 52*cdf0e10cSrcweir using csi::html::HorizontalLine; 53*cdf0e10cSrcweir using csi::html::LineBreak; 54*cdf0e10cSrcweir using csi::html::Link; 55*cdf0e10cSrcweir using csi::html::Table; 56*cdf0e10cSrcweir using csi::html::TableRow; 57*cdf0e10cSrcweir using csi::html::TableCell; 58*cdf0e10cSrcweir 59*cdf0e10cSrcweir using ary::cpp::CesConstIterator; 60*cdf0e10cSrcweir using ary::doc::OldCppDocu; 61*cdf0e10cSrcweir 62*cdf0e10cSrcweir const char * const C_sTitle_InnerClasses = "Classes"; 63*cdf0e10cSrcweir const char * const C_sTitle_InnerStructs = "Structs"; 64*cdf0e10cSrcweir const char * const C_sTitle_InnerUnions = "Unions"; 65*cdf0e10cSrcweir const char * const C_sTitle_Methods = "Methods"; 66*cdf0e10cSrcweir const char * const C_sTitle_StaticMethods = "Static Methods"; 67*cdf0e10cSrcweir const char * const C_sTitle_Data = "Data"; 68*cdf0e10cSrcweir const char * const C_sTitle_StaticData = "Static Data"; 69*cdf0e10cSrcweir 70*cdf0e10cSrcweir const char * const C_sLabel_StaticOperations = "static_ops"; 71*cdf0e10cSrcweir const char * const C_sLabel_StaticVariables = "static_vars"; 72*cdf0e10cSrcweir 73*cdf0e10cSrcweir const char * const C_sTitlePublic = "Public Members"; 74*cdf0e10cSrcweir const char * const C_sTitleProtected = "Protected Members"; 75*cdf0e10cSrcweir const char * const C_sTitlePrivate = "Private Members"; 76*cdf0e10cSrcweir const char * const C_sMprTitles[3] = { C_sTitlePublic, 77*cdf0e10cSrcweir C_sTitleProtected, 78*cdf0e10cSrcweir C_sTitlePrivate 79*cdf0e10cSrcweir }; 80*cdf0e10cSrcweir const char * const C_sSummaryTitlePublic = "Public Members"; 81*cdf0e10cSrcweir const char * const C_sSummaryTitleProtected = "Protected Members"; 82*cdf0e10cSrcweir const char * const C_sSummaryTitlePrivate = "Private Members"; 83*cdf0e10cSrcweir const char * 84*cdf0e10cSrcweir C_sMprSummaryTitles[3] = 85*cdf0e10cSrcweir { C_sSummaryTitlePublic, C_sSummaryTitleProtected, C_sSummaryTitlePrivate }; 86*cdf0e10cSrcweir const char * 87*cdf0e10cSrcweir C_sMprPrefixes[3] = 88*cdf0e10cSrcweir { "publ_", "prot_", "priv_" }; 89*cdf0e10cSrcweir const char * 90*cdf0e10cSrcweir C_sSummaryItems_Titles[PageMaker_Class::cl_MAX] = 91*cdf0e10cSrcweir { C_sTitle_InnerClasses, C_sTitle_InnerStructs, C_sTitle_InnerUnions, 92*cdf0e10cSrcweir C_sTitle_Enums, C_sTitle_Typedefs, 93*cdf0e10cSrcweir C_sTitle_Methods, C_sTitle_StaticMethods, C_sTitle_Data, C_sTitle_StaticData }; 94*cdf0e10cSrcweir const char * 95*cdf0e10cSrcweir C_sSummaryItems_Labels[PageMaker_Class::cl_MAX] = 96*cdf0e10cSrcweir { C_sLabel_Classes, C_sLabel_Structs, C_sLabel_Unions, 97*cdf0e10cSrcweir C_sLabel_Enums, C_sLabel_Typedefs, 98*cdf0e10cSrcweir C_sLabel_Operations, C_sLabel_StaticOperations, 99*cdf0e10cSrcweir C_sLabel_Variables, C_sLabel_StaticVariables }; 100*cdf0e10cSrcweir 101*cdf0e10cSrcweir 102*cdf0e10cSrcweir const ary::cpp::E_Protection 103*cdf0e10cSrcweir aProt[3] = { ary::cpp::PROTECT_public, 104*cdf0e10cSrcweir ary::cpp::PROTECT_protected, 105*cdf0e10cSrcweir ary::cpp::PROTECT_private }; 106*cdf0e10cSrcweir 107*cdf0e10cSrcweir 108*cdf0e10cSrcweir PageMaker_Class::PageMaker_Class( PageDisplay & io_rPage, 109*cdf0e10cSrcweir const ary::cpp::Class & i_rClass ) 110*cdf0e10cSrcweir : SpecializedPageMaker(io_rPage), 111*cdf0e10cSrcweir pMe( &i_rClass ), 112*cdf0e10cSrcweir pChildDisplay( new ChildList_Display(io_rPage.Env(), i_rClass) ), 113*cdf0e10cSrcweir pNavi(0) 114*cdf0e10cSrcweir // pProtectionArea, 115*cdf0e10cSrcweir // bChildLists_Exist 116*cdf0e10cSrcweir { 117*cdf0e10cSrcweir int i_max = 3 * cl_MAX; 118*cdf0e10cSrcweir for (int i = 0; i < i_max; i++) 119*cdf0e10cSrcweir { 120*cdf0e10cSrcweir bChildLists_Exist[i] = false; 121*cdf0e10cSrcweir } // end for 122*cdf0e10cSrcweir } 123*cdf0e10cSrcweir 124*cdf0e10cSrcweir PageMaker_Class::~PageMaker_Class() 125*cdf0e10cSrcweir { 126*cdf0e10cSrcweir } 127*cdf0e10cSrcweir 128*cdf0e10cSrcweir void 129*cdf0e10cSrcweir PageMaker_Class::MakePage() 130*cdf0e10cSrcweir { 131*cdf0e10cSrcweir pNavi = new NavigationBar( Env(), Me() ); 132*cdf0e10cSrcweir 133*cdf0e10cSrcweir Write_NavBar(); 134*cdf0e10cSrcweir Write_TopArea(); 135*cdf0e10cSrcweir Write_DocuArea(); 136*cdf0e10cSrcweir Write_ChildLists(); 137*cdf0e10cSrcweir 138*cdf0e10cSrcweir pNavi->Write_SubRows(); 139*cdf0e10cSrcweir pNavi = 0; 140*cdf0e10cSrcweir } 141*cdf0e10cSrcweir 142*cdf0e10cSrcweir void 143*cdf0e10cSrcweir PageMaker_Class::Write_NavBar() 144*cdf0e10cSrcweir { 145*cdf0e10cSrcweir NavigationBar aNavi( Env(), Me() ); 146*cdf0e10cSrcweir pNavi->Write( CurOut() ); 147*cdf0e10cSrcweir CurOut() << new HorizontalLine; 148*cdf0e10cSrcweir } 149*cdf0e10cSrcweir 150*cdf0e10cSrcweir inline bool 151*cdf0e10cSrcweir IsInterface(const ary::doc::Documentation & i_doc) 152*cdf0e10cSrcweir { 153*cdf0e10cSrcweir const OldCppDocu * 154*cdf0e10cSrcweir doc = Get_CppDocu(i_doc); 155*cdf0e10cSrcweir return doc != 0 156*cdf0e10cSrcweir ? doc->IsInterface() 157*cdf0e10cSrcweir : false; 158*cdf0e10cSrcweir } 159*cdf0e10cSrcweir 160*cdf0e10cSrcweir void 161*cdf0e10cSrcweir PageMaker_Class::Write_TopArea() 162*cdf0e10cSrcweir { 163*cdf0e10cSrcweir TemplateClause fTemplateClause; 164*cdf0e10cSrcweir PageTitle_Std fTitle; 165*cdf0e10cSrcweir 166*cdf0e10cSrcweir Page().Write_NameChainWithLinks( Me() ); 167*cdf0e10cSrcweir 168*cdf0e10cSrcweir fTemplateClause( CurOut(), Me().TemplateParameters() ); 169*cdf0e10cSrcweir fTitle( CurOut(), Get_ClassTypeKey(Me()), Me().LocalName() ); 170*cdf0e10cSrcweir 171*cdf0e10cSrcweir CurOut() << new HorizontalLine; 172*cdf0e10cSrcweir 173*cdf0e10cSrcweir Write_BaseHierarchy(); 174*cdf0e10cSrcweir Write_DerivedList(); 175*cdf0e10cSrcweir 176*cdf0e10cSrcweir CurOut() << new LineBreak; 177*cdf0e10cSrcweir 178*cdf0e10cSrcweir adcdisp::FlagTable 179*cdf0e10cSrcweir aFlags( CurOut(), 4 ); 180*cdf0e10cSrcweir aFlags.SetColumn( 0, "virtual", 181*cdf0e10cSrcweir Me().Virtuality() != ary::cpp::VIRTUAL_none ); 182*cdf0e10cSrcweir aFlags.SetColumn( 1, "abstract", 183*cdf0e10cSrcweir Me().Virtuality() == ary::cpp::VIRTUAL_abstract ); 184*cdf0e10cSrcweir aFlags.SetColumn( 2, "interface", 185*cdf0e10cSrcweir IsInterface(Me().Docu()) 186*cdf0e10cSrcweir OR Me().Virtuality() == ary::cpp::VIRTUAL_abstract ); 187*cdf0e10cSrcweir aFlags.SetColumn( 3, "template", 188*cdf0e10cSrcweir Me().TemplateParameters().size() > 0 ); 189*cdf0e10cSrcweir } 190*cdf0e10cSrcweir 191*cdf0e10cSrcweir void 192*cdf0e10cSrcweir PageMaker_Class::Write_DocuArea() 193*cdf0e10cSrcweir { 194*cdf0e10cSrcweir Docu_Display aDocuShow( Env() ); 195*cdf0e10cSrcweir 196*cdf0e10cSrcweir aDocuShow.Assign_Out(CurOut()); 197*cdf0e10cSrcweir Me().Accept( aDocuShow ); 198*cdf0e10cSrcweir aDocuShow.Unassign_Out(); 199*cdf0e10cSrcweir 200*cdf0e10cSrcweir ary::loc::File & 201*cdf0e10cSrcweir rFile = Env().Gate().Locations().Find_File( Me().Location() ); 202*cdf0e10cSrcweir 203*cdf0e10cSrcweir adcdisp::ExplanationList 204*cdf0e10cSrcweir aFileText( CurOut() ); 205*cdf0e10cSrcweir aFileText.AddEntry("File"); 206*cdf0e10cSrcweir aFileText.Def() 207*cdf0e10cSrcweir << rFile.LocalName(); 208*cdf0e10cSrcweir 209*cdf0e10cSrcweir CurOut() << new HorizontalLine; 210*cdf0e10cSrcweir } 211*cdf0e10cSrcweir 212*cdf0e10cSrcweir void 213*cdf0e10cSrcweir PageMaker_Class::Write_ChildLists() 214*cdf0e10cSrcweir { 215*cdf0e10cSrcweir int i_max = 3 * cl_MAX; 216*cdf0e10cSrcweir for (int i = 0; i < i_max; i++) 217*cdf0e10cSrcweir { 218*cdf0e10cSrcweir bChildLists_Exist[i] = false; 219*cdf0e10cSrcweir } // end for 220*cdf0e10cSrcweir 221*cdf0e10cSrcweir csi::html::DefListDefinition & 222*cdf0e10cSrcweir rPublic = Setup_MemberSegment_Out( mp_public ); 223*cdf0e10cSrcweir csi::html::DefListDefinition & 224*cdf0e10cSrcweir rProtected = Setup_MemberSegment_Out( mp_protected ); 225*cdf0e10cSrcweir csi::html::DefListDefinition & 226*cdf0e10cSrcweir rPrivate = Setup_MemberSegment_Out( mp_private ); 227*cdf0e10cSrcweir 228*cdf0e10cSrcweir Write_ChildList_forClasses( rPublic, 229*cdf0e10cSrcweir rProtected, 230*cdf0e10cSrcweir rPrivate, 231*cdf0e10cSrcweir C_sLabel_Classes, 232*cdf0e10cSrcweir C_sTitle_InnerClasses, 233*cdf0e10cSrcweir ary::cpp::CK_class ); 234*cdf0e10cSrcweir Write_ChildList_forClasses( rPublic, 235*cdf0e10cSrcweir rProtected, 236*cdf0e10cSrcweir rPrivate, 237*cdf0e10cSrcweir C_sLabel_Structs, 238*cdf0e10cSrcweir C_sTitle_InnerStructs, 239*cdf0e10cSrcweir ary::cpp::CK_struct ); 240*cdf0e10cSrcweir Write_ChildList_forClasses( rPublic, 241*cdf0e10cSrcweir rProtected, 242*cdf0e10cSrcweir rPrivate, 243*cdf0e10cSrcweir C_sLabel_Unions, 244*cdf0e10cSrcweir C_sTitle_InnerUnions, 245*cdf0e10cSrcweir ary::cpp::CK_union ); 246*cdf0e10cSrcweir 247*cdf0e10cSrcweir Write_ChildList( ary::cpp::Class::SLOT_Enums, 248*cdf0e10cSrcweir cl_Enums, 249*cdf0e10cSrcweir C_sLabel_Enums, 250*cdf0e10cSrcweir C_sTitle_Enums, 251*cdf0e10cSrcweir rPublic, 252*cdf0e10cSrcweir rProtected, 253*cdf0e10cSrcweir rPrivate ); 254*cdf0e10cSrcweir Write_ChildList( ary::cpp::Class::SLOT_Typedefs, 255*cdf0e10cSrcweir cl_Typedefs, 256*cdf0e10cSrcweir C_sLabel_Typedefs, 257*cdf0e10cSrcweir C_sTitle_Typedefs, 258*cdf0e10cSrcweir rPublic, 259*cdf0e10cSrcweir rProtected, 260*cdf0e10cSrcweir rPrivate ); 261*cdf0e10cSrcweir 262*cdf0e10cSrcweir Write_ChildList( ary::cpp::Class::SLOT_Operations, 263*cdf0e10cSrcweir cl_Operations, 264*cdf0e10cSrcweir C_sLabel_Operations, 265*cdf0e10cSrcweir C_sTitle_Methods, 266*cdf0e10cSrcweir rPublic, 267*cdf0e10cSrcweir rProtected, 268*cdf0e10cSrcweir rPrivate ); 269*cdf0e10cSrcweir Write_ChildList( ary::cpp::Class::SLOT_StaticOperations, 270*cdf0e10cSrcweir cl_StaticOperations, 271*cdf0e10cSrcweir C_sLabel_StaticOperations, 272*cdf0e10cSrcweir C_sTitle_StaticMethods, 273*cdf0e10cSrcweir rPublic, 274*cdf0e10cSrcweir rProtected, 275*cdf0e10cSrcweir rPrivate ); 276*cdf0e10cSrcweir Write_ChildList( ary::cpp::Class::SLOT_Data, 277*cdf0e10cSrcweir cl_Data, 278*cdf0e10cSrcweir C_sLabel_Variables, 279*cdf0e10cSrcweir C_sTitle_Data, 280*cdf0e10cSrcweir rPublic, 281*cdf0e10cSrcweir rProtected, 282*cdf0e10cSrcweir rPrivate ); 283*cdf0e10cSrcweir Write_ChildList( ary::cpp::Class::SLOT_StaticData, 284*cdf0e10cSrcweir cl_StaticData, 285*cdf0e10cSrcweir C_sLabel_StaticVariables, 286*cdf0e10cSrcweir C_sTitle_StaticData, 287*cdf0e10cSrcweir rPublic, 288*cdf0e10cSrcweir rProtected, 289*cdf0e10cSrcweir rPrivate ); 290*cdf0e10cSrcweir 291*cdf0e10cSrcweir Create_NaviSubRow(mp_public); // Also puts out or deletes pPublic. 292*cdf0e10cSrcweir Create_NaviSubRow(mp_protected); // Also puts out or deletes pProtected. 293*cdf0e10cSrcweir Create_NaviSubRow(mp_private); // Also puts out or deletes pPrivate. 294*cdf0e10cSrcweir } 295*cdf0e10cSrcweir 296*cdf0e10cSrcweir void 297*cdf0e10cSrcweir PageMaker_Class::Write_ChildList( ary::SlotAccessId i_nSlot, 298*cdf0e10cSrcweir E_ChidList i_eChildListIndex, 299*cdf0e10cSrcweir const char * i_sLabel, 300*cdf0e10cSrcweir const char * i_sListTitle, 301*cdf0e10cSrcweir csi::xml::Element & o_rPublic, 302*cdf0e10cSrcweir csi::xml::Element & o_rProtected, 303*cdf0e10cSrcweir csi::xml::Element & o_rPrivate ) 304*cdf0e10cSrcweir 305*cdf0e10cSrcweir { 306*cdf0e10cSrcweir bool bPublic_ChildrenExist = false; 307*cdf0e10cSrcweir bool bProtected_ChildrenExist = false; 308*cdf0e10cSrcweir bool bPrivate_ChildrenExist = false; 309*cdf0e10cSrcweir 310*cdf0e10cSrcweir ChildList_Display::Area_Result 311*cdf0e10cSrcweir aPublic_Result( bPublic_ChildrenExist, o_rPublic ); 312*cdf0e10cSrcweir ChildList_Display::Area_Result 313*cdf0e10cSrcweir aProtected_Result( bProtected_ChildrenExist, o_rProtected ); 314*cdf0e10cSrcweir ChildList_Display::Area_Result 315*cdf0e10cSrcweir aPrivate_Result( bPrivate_ChildrenExist, o_rPrivate ); 316*cdf0e10cSrcweir 317*cdf0e10cSrcweir String sLabelPublic = ChildListLabel(i_sLabel, mp_public); 318*cdf0e10cSrcweir String sLabelProtected = ChildListLabel(i_sLabel, mp_protected); 319*cdf0e10cSrcweir String sLabelPrivate = ChildListLabel(i_sLabel, mp_private); 320*cdf0e10cSrcweir 321*cdf0e10cSrcweir pChildDisplay->Run_Members( aPublic_Result, 322*cdf0e10cSrcweir aProtected_Result, 323*cdf0e10cSrcweir aPrivate_Result, 324*cdf0e10cSrcweir i_nSlot, 325*cdf0e10cSrcweir sLabelPublic, 326*cdf0e10cSrcweir sLabelProtected, 327*cdf0e10cSrcweir sLabelPrivate, 328*cdf0e10cSrcweir i_sListTitle ); 329*cdf0e10cSrcweir 330*cdf0e10cSrcweir bChildLists_Exist[i_eChildListIndex] 331*cdf0e10cSrcweir = bPublic_ChildrenExist; 332*cdf0e10cSrcweir bChildLists_Exist[i_eChildListIndex + cl_MAX] 333*cdf0e10cSrcweir = bProtected_ChildrenExist; 334*cdf0e10cSrcweir bChildLists_Exist[i_eChildListIndex + 2*cl_MAX] 335*cdf0e10cSrcweir = bPrivate_ChildrenExist; 336*cdf0e10cSrcweir 337*cdf0e10cSrcweir if (bPublic_ChildrenExist) 338*cdf0e10cSrcweir o_rPublic << new HorizontalLine; 339*cdf0e10cSrcweir if (bProtected_ChildrenExist) 340*cdf0e10cSrcweir o_rProtected << new HorizontalLine; 341*cdf0e10cSrcweir if (bPrivate_ChildrenExist) 342*cdf0e10cSrcweir o_rPrivate << new HorizontalLine; 343*cdf0e10cSrcweir } 344*cdf0e10cSrcweir 345*cdf0e10cSrcweir void 346*cdf0e10cSrcweir PageMaker_Class::Write_ChildList_forClasses( csi::xml::Element & o_rPublic, 347*cdf0e10cSrcweir csi::xml::Element & o_rProtected, 348*cdf0e10cSrcweir csi::xml::Element & o_rPrivate, 349*cdf0e10cSrcweir const char * i_sLabel, 350*cdf0e10cSrcweir const char * i_sListTitle, 351*cdf0e10cSrcweir ary::cpp::E_ClassKey i_eFilter ) 352*cdf0e10cSrcweir { 353*cdf0e10cSrcweir bool bPublic_ChildrenExist = false; 354*cdf0e10cSrcweir bool bProtected_ChildrenExist = false; 355*cdf0e10cSrcweir bool bPrivate_ChildrenExist = false; 356*cdf0e10cSrcweir 357*cdf0e10cSrcweir ChildList_Display::Area_Result 358*cdf0e10cSrcweir aPublic_Result( bPublic_ChildrenExist, o_rPublic ); 359*cdf0e10cSrcweir ChildList_Display::Area_Result 360*cdf0e10cSrcweir aProtected_Result( bProtected_ChildrenExist, o_rProtected ); 361*cdf0e10cSrcweir ChildList_Display::Area_Result 362*cdf0e10cSrcweir aPrivate_Result( bPrivate_ChildrenExist, o_rPrivate ); 363*cdf0e10cSrcweir 364*cdf0e10cSrcweir String sLabelPublic = ChildListLabel(i_sLabel, mp_public); 365*cdf0e10cSrcweir String sLabelProtected = ChildListLabel(i_sLabel, mp_protected); 366*cdf0e10cSrcweir String sLabelPrivate = ChildListLabel(i_sLabel, mp_private); 367*cdf0e10cSrcweir 368*cdf0e10cSrcweir pChildDisplay->Run_MemberClasses( aPublic_Result, 369*cdf0e10cSrcweir aProtected_Result, 370*cdf0e10cSrcweir aPrivate_Result, 371*cdf0e10cSrcweir ary::cpp::Class::SLOT_NestedClasses, 372*cdf0e10cSrcweir sLabelPublic, 373*cdf0e10cSrcweir sLabelProtected, 374*cdf0e10cSrcweir sLabelPrivate, 375*cdf0e10cSrcweir i_sListTitle, 376*cdf0e10cSrcweir i_eFilter ); 377*cdf0e10cSrcweir 378*cdf0e10cSrcweir bChildLists_Exist[int(cl_NestedClasses)+int(i_eFilter)] 379*cdf0e10cSrcweir = bPublic_ChildrenExist; 380*cdf0e10cSrcweir bChildLists_Exist[int(cl_NestedClasses)+int(i_eFilter) + cl_MAX] 381*cdf0e10cSrcweir = bProtected_ChildrenExist; 382*cdf0e10cSrcweir bChildLists_Exist[int(cl_NestedClasses)+int(i_eFilter) + 2*cl_MAX] 383*cdf0e10cSrcweir = bPrivate_ChildrenExist; 384*cdf0e10cSrcweir 385*cdf0e10cSrcweir if (bPublic_ChildrenExist) 386*cdf0e10cSrcweir o_rPublic << new HorizontalLine; 387*cdf0e10cSrcweir if (bProtected_ChildrenExist) 388*cdf0e10cSrcweir o_rProtected << new HorizontalLine; 389*cdf0e10cSrcweir if (bPrivate_ChildrenExist) 390*cdf0e10cSrcweir o_rPrivate << new HorizontalLine; 391*cdf0e10cSrcweir } 392*cdf0e10cSrcweir 393*cdf0e10cSrcweir const char * 394*cdf0e10cSrcweir PageMaker_Class::ChildListLabel( const char * i_sLabel, E_MemberProtection i_eMpr ) 395*cdf0e10cSrcweir { 396*cdf0e10cSrcweir static char sResult[100]; 397*cdf0e10cSrcweir strcpy( sResult, C_sMprPrefixes[i_eMpr] ); // SAFE STRCPY (#100211# - checked) 398*cdf0e10cSrcweir strcat( sResult, i_sLabel ); // SAFE STRCAT (#100211# - checked) 399*cdf0e10cSrcweir return sResult; 400*cdf0e10cSrcweir } 401*cdf0e10cSrcweir 402*cdf0e10cSrcweir csi::html::DefListDefinition & 403*cdf0e10cSrcweir PageMaker_Class::Setup_MemberSegment_Out( E_MemberProtection i_eMpr ) 404*cdf0e10cSrcweir { 405*cdf0e10cSrcweir html::DefList * pDefList = new html::DefList; 406*cdf0e10cSrcweir pProtectionArea[i_eMpr] = pDefList; 407*cdf0e10cSrcweir 408*cdf0e10cSrcweir pDefList->AddTerm() 409*cdf0e10cSrcweir << new html::ClassAttr("subtitle") 410*cdf0e10cSrcweir >> *new html::Label( C_sMprPrefixes[i_eMpr] ) 411*cdf0e10cSrcweir >> *new html::Headline(3) 412*cdf0e10cSrcweir << C_sMprTitles[i_eMpr]; 413*cdf0e10cSrcweir return pDefList->AddDefinition(); 414*cdf0e10cSrcweir } 415*cdf0e10cSrcweir 416*cdf0e10cSrcweir void 417*cdf0e10cSrcweir PageMaker_Class::Create_NaviSubRow( E_MemberProtection i_eMpr ) 418*cdf0e10cSrcweir { 419*cdf0e10cSrcweir int nIndexAdd = int(cl_MAX) * int(i_eMpr); 420*cdf0e10cSrcweir 421*cdf0e10cSrcweir bool bEmpty = true; 422*cdf0e10cSrcweir for (int e = 0; e < cl_MAX; e++) 423*cdf0e10cSrcweir { 424*cdf0e10cSrcweir if ( bChildLists_Exist[e + nIndexAdd] ) 425*cdf0e10cSrcweir { 426*cdf0e10cSrcweir bEmpty = false; 427*cdf0e10cSrcweir break; 428*cdf0e10cSrcweir } 429*cdf0e10cSrcweir } // end for 430*cdf0e10cSrcweir if (bEmpty) 431*cdf0e10cSrcweir { 432*cdf0e10cSrcweir pProtectionArea[i_eMpr] = 0; 433*cdf0e10cSrcweir return; 434*cdf0e10cSrcweir } 435*cdf0e10cSrcweir else // 436*cdf0e10cSrcweir { 437*cdf0e10cSrcweir CurOut() << pProtectionArea[i_eMpr].Release(); 438*cdf0e10cSrcweir } // endif 439*cdf0e10cSrcweir 440*cdf0e10cSrcweir pNavi->MakeSubRow( C_sMprSummaryTitles[i_eMpr] ); 441*cdf0e10cSrcweir for (int i = 0; i < cl_MAX; i++) 442*cdf0e10cSrcweir { 443*cdf0e10cSrcweir pNavi->AddItem( C_sSummaryItems_Titles[i], 444*cdf0e10cSrcweir ChildListLabel( C_sSummaryItems_Labels[i], i_eMpr ), 445*cdf0e10cSrcweir bChildLists_Exist[i+nIndexAdd] ); 446*cdf0e10cSrcweir } // end for 447*cdf0e10cSrcweir } 448*cdf0e10cSrcweir 449*cdf0e10cSrcweir void 450*cdf0e10cSrcweir PageMaker_Class::Write_DerivedList() 451*cdf0e10cSrcweir { 452*cdf0e10cSrcweir adcdisp::ExplanationList 453*cdf0e10cSrcweir aDeriveds( CurOut() ); 454*cdf0e10cSrcweir aDeriveds.AddEntry( "Known Derived Classes" ); 455*cdf0e10cSrcweir 456*cdf0e10cSrcweir if ( Me().KnownDerivatives().Size() == 0 ) 457*cdf0e10cSrcweir { 458*cdf0e10cSrcweir aDeriveds.Def() << "None."; 459*cdf0e10cSrcweir return; 460*cdf0e10cSrcweir } 461*cdf0e10cSrcweir 462*cdf0e10cSrcweir typedef ary::List_Rid RidList; 463*cdf0e10cSrcweir 464*cdf0e10cSrcweir CesConstIterator 465*cdf0e10cSrcweir itEnd = Me().KnownDerivatives().End(); 466*cdf0e10cSrcweir for ( CesConstIterator it = Me().KnownDerivatives().Begin(); 467*cdf0e10cSrcweir it != itEnd; 468*cdf0e10cSrcweir ++it ) 469*cdf0e10cSrcweir { 470*cdf0e10cSrcweir const ary::cpp::CodeEntity & 471*cdf0e10cSrcweir rCe = Env().Gate().Ces().Find_Ce(*it); 472*cdf0e10cSrcweir 473*cdf0e10cSrcweir aDeriveds.Def() 474*cdf0e10cSrcweir >> *new html::Link( Link2Ce(Env(),rCe) ) 475*cdf0e10cSrcweir << rCe.LocalName(); 476*cdf0e10cSrcweir aDeriveds.Def() 477*cdf0e10cSrcweir << new html::LineBreak; 478*cdf0e10cSrcweir } // end for 479*cdf0e10cSrcweir } 480*cdf0e10cSrcweir 481*cdf0e10cSrcweir 482*cdf0e10cSrcweir // ============== Creating a classes base hierarchy ====================== // 483*cdf0e10cSrcweir 484*cdf0e10cSrcweir 485*cdf0e10cSrcweir namespace 486*cdf0e10cSrcweir { 487*cdf0e10cSrcweir 488*cdf0e10cSrcweir class Node 489*cdf0e10cSrcweir { 490*cdf0e10cSrcweir public: 491*cdf0e10cSrcweir Node( 492*cdf0e10cSrcweir const ary::cpp::Class & 493*cdf0e10cSrcweir i_rClass, 494*cdf0e10cSrcweir ary::cpp::Type_id i_nClassType, 495*cdf0e10cSrcweir const ary::cpp::Gate & 496*cdf0e10cSrcweir i_rGate, 497*cdf0e10cSrcweir intt i_nPositionOffset, 498*cdf0e10cSrcweir Node * io_pDerived = 0, 499*cdf0e10cSrcweir ary::cpp::E_Protection 500*cdf0e10cSrcweir i_eProtection = ary::cpp::PROTECT_global, 501*cdf0e10cSrcweir bool i_bVirtual = false ); 502*cdf0e10cSrcweir ~Node(); 503*cdf0e10cSrcweir 504*cdf0e10cSrcweir void FillPositionList( 505*cdf0e10cSrcweir std::vector< const Node* > & 506*cdf0e10cSrcweir o_rPositionList ) const; 507*cdf0e10cSrcweir void Write2( 508*cdf0e10cSrcweir csi::xml::Element & o_rOut, 509*cdf0e10cSrcweir const OuputPage_Environment & 510*cdf0e10cSrcweir i_rEnv ) const; 511*cdf0e10cSrcweir 512*cdf0e10cSrcweir intt BaseCount() const { return nCountBases; } 513*cdf0e10cSrcweir intt Position() const { return nPosition; } 514*cdf0e10cSrcweir int Xpos() const { return 3*Position(); } 515*cdf0e10cSrcweir int Ypos() const { return 2*Position(); } 516*cdf0e10cSrcweir const Node * Derived() const { return pDerived; } 517*cdf0e10cSrcweir 518*cdf0e10cSrcweir private: 519*cdf0e10cSrcweir typedef std::vector< DYN Node* > BaseList; 520*cdf0e10cSrcweir 521*cdf0e10cSrcweir void IncrBaseCount(); 522*cdf0e10cSrcweir 523*cdf0e10cSrcweir // DATA 524*cdf0e10cSrcweir BaseList aBases; 525*cdf0e10cSrcweir intt nCountBases; 526*cdf0e10cSrcweir Node * pDerived; 527*cdf0e10cSrcweir 528*cdf0e10cSrcweir String sName; 529*cdf0e10cSrcweir const ary::cpp::Class * 530*cdf0e10cSrcweir pClass; 531*cdf0e10cSrcweir ary::cpp::Type_id nClassType; 532*cdf0e10cSrcweir ary::cpp::E_Protection 533*cdf0e10cSrcweir eProtection; 534*cdf0e10cSrcweir bool bVirtual; 535*cdf0e10cSrcweir 536*cdf0e10cSrcweir intt nPosition; 537*cdf0e10cSrcweir }; 538*cdf0e10cSrcweir 539*cdf0e10cSrcweir void WriteNodeHierarchy( 540*cdf0e10cSrcweir csi::xml::Element & o_rOut, 541*cdf0e10cSrcweir const OuputPage_Environment & 542*cdf0e10cSrcweir i_rEnv, 543*cdf0e10cSrcweir const Node & i_rClass ); 544*cdf0e10cSrcweir 545*cdf0e10cSrcweir const ary::cpp::Class * 546*cdf0e10cSrcweir HereFind_Class( 547*cdf0e10cSrcweir const ary::cpp::Gate & 548*cdf0e10cSrcweir i_rGate, 549*cdf0e10cSrcweir ary::cpp::Type_id i_nReferingTypeId ); 550*cdf0e10cSrcweir 551*cdf0e10cSrcweir } // anonymous namespace 552*cdf0e10cSrcweir 553*cdf0e10cSrcweir void 554*cdf0e10cSrcweir PageMaker_Class::Write_BaseHierarchy() 555*cdf0e10cSrcweir { 556*cdf0e10cSrcweir adcdisp::ExplanationList aBases( CurOut() ); 557*cdf0e10cSrcweir aBases.AddEntry( "Base Classes" ); 558*cdf0e10cSrcweir 559*cdf0e10cSrcweir if ( Me().BaseClasses().size() == 0 ) 560*cdf0e10cSrcweir { 561*cdf0e10cSrcweir aBases.Def() << "None."; 562*cdf0e10cSrcweir } 563*cdf0e10cSrcweir else 564*cdf0e10cSrcweir { 565*cdf0e10cSrcweir Dyn< Node > 566*cdf0e10cSrcweir pBaseGraph( new Node(Me(), ary::cpp::Type_id(0), Env().Gate(), 0) ); 567*cdf0e10cSrcweir WriteNodeHierarchy( aBases.Def(), Env(), *pBaseGraph ); 568*cdf0e10cSrcweir } 569*cdf0e10cSrcweir } 570*cdf0e10cSrcweir 571*cdf0e10cSrcweir 572*cdf0e10cSrcweir 573*cdf0e10cSrcweir namespace 574*cdf0e10cSrcweir { 575*cdf0e10cSrcweir 576*cdf0e10cSrcweir void 577*cdf0e10cSrcweir WriteNodeHierarchy( csi::xml::Element & o_rOut, 578*cdf0e10cSrcweir const OuputPage_Environment & i_rEnv, 579*cdf0e10cSrcweir const Node & i_rClass ) 580*cdf0e10cSrcweir { 581*cdf0e10cSrcweir typedef const Node * NodePtr; 582*cdf0e10cSrcweir typedef std::vector<NodePtr> NodeList; 583*cdf0e10cSrcweir 584*cdf0e10cSrcweir NodeList aPositionList; 585*cdf0e10cSrcweir intt nSize = i_rClass.Position()+1; 586*cdf0e10cSrcweir aPositionList.reserve(nSize); 587*cdf0e10cSrcweir i_rClass.FillPositionList( aPositionList ); 588*cdf0e10cSrcweir 589*cdf0e10cSrcweir xml::Element & 590*cdf0e10cSrcweir rPre = o_rOut 591*cdf0e10cSrcweir >> *new xml::AnElement("pre") 592*cdf0e10cSrcweir << new html::StyleAttr("font-family:monospace;"); 593*cdf0e10cSrcweir 594*cdf0e10cSrcweir for ( int line = 0; line < nSize; ++line ) 595*cdf0e10cSrcweir { 596*cdf0e10cSrcweir char * sLine1 = new char[2 + line*5]; 597*cdf0e10cSrcweir char * sLine2 = new char[1 + line*5]; 598*cdf0e10cSrcweir *sLine1 = '\0'; 599*cdf0e10cSrcweir *sLine2 = '\0'; 600*cdf0e10cSrcweir 601*cdf0e10cSrcweir bool bBaseForThisLineReached = false; 602*cdf0e10cSrcweir for ( int col = 0; col < line; ++col ) 603*cdf0e10cSrcweir { 604*cdf0e10cSrcweir intt nDerivPos = aPositionList[col]->Derived()->Position(); 605*cdf0e10cSrcweir 606*cdf0e10cSrcweir if ( nDerivPos >= line ) 607*cdf0e10cSrcweir strcat(sLine1, " | "); 608*cdf0e10cSrcweir else 609*cdf0e10cSrcweir strcat(sLine1, " "); 610*cdf0e10cSrcweir 611*cdf0e10cSrcweir if ( nDerivPos > line ) 612*cdf0e10cSrcweir { 613*cdf0e10cSrcweir strcat(sLine2, " | "); 614*cdf0e10cSrcweir } 615*cdf0e10cSrcweir else if ( nDerivPos == line ) 616*cdf0e10cSrcweir { 617*cdf0e10cSrcweir if (bBaseForThisLineReached) 618*cdf0e10cSrcweir strcat(sLine2, "--+--"); 619*cdf0e10cSrcweir else 620*cdf0e10cSrcweir { 621*cdf0e10cSrcweir bBaseForThisLineReached = true; 622*cdf0e10cSrcweir strcat(sLine2, " +--"); 623*cdf0e10cSrcweir } 624*cdf0e10cSrcweir } 625*cdf0e10cSrcweir else // nDerivPos < line 626*cdf0e10cSrcweir { 627*cdf0e10cSrcweir if (bBaseForThisLineReached) 628*cdf0e10cSrcweir strcat(sLine2, "-----"); 629*cdf0e10cSrcweir else 630*cdf0e10cSrcweir strcat(sLine2, " "); 631*cdf0e10cSrcweir } 632*cdf0e10cSrcweir } // end for (col) 633*cdf0e10cSrcweir strcat(sLine1,"\n"); 634*cdf0e10cSrcweir rPre 635*cdf0e10cSrcweir << sLine1 636*cdf0e10cSrcweir << sLine2; 637*cdf0e10cSrcweir delete [] sLine1; 638*cdf0e10cSrcweir delete [] sLine2; 639*cdf0e10cSrcweir 640*cdf0e10cSrcweir aPositionList[line]->Write2( rPre, i_rEnv ); 641*cdf0e10cSrcweir rPre << "\n"; 642*cdf0e10cSrcweir } // end for (line) 643*cdf0e10cSrcweir } 644*cdf0e10cSrcweir 645*cdf0e10cSrcweir const ary::cpp::Class * 646*cdf0e10cSrcweir HereFind_Class( const ary::cpp::Gate & i_rGate, 647*cdf0e10cSrcweir ary::cpp::Type_id i_nReferingTypeId ) 648*cdf0e10cSrcweir { 649*cdf0e10cSrcweir const ary::cpp::CodeEntity * 650*cdf0e10cSrcweir pCe = i_rGate.Search_RelatedCe( i_nReferingTypeId ); 651*cdf0e10cSrcweir 652*cdf0e10cSrcweir if ( pCe != 0 ) 653*cdf0e10cSrcweir { 654*cdf0e10cSrcweir if ( ary::is_type<ary::cpp::Class>(*pCe) ) 655*cdf0e10cSrcweir { 656*cdf0e10cSrcweir return ary::ary_cast<ary::cpp::Class>(pCe); 657*cdf0e10cSrcweir } 658*cdf0e10cSrcweir else if ( ary::is_type<ary::cpp::Typedef>(*pCe) ) 659*cdf0e10cSrcweir { 660*cdf0e10cSrcweir const ary::cpp::Typedef * 661*cdf0e10cSrcweir pTydef = ary::ary_cast<ary::cpp::Typedef>(pCe); 662*cdf0e10cSrcweir return HereFind_Class( i_rGate, pTydef->DescribingType() ); 663*cdf0e10cSrcweir } 664*cdf0e10cSrcweir } 665*cdf0e10cSrcweir 666*cdf0e10cSrcweir static const ary::cpp::Class aClassNull_( "Base class not found", 667*cdf0e10cSrcweir ary::cpp::Ce_id(0), 668*cdf0e10cSrcweir ary::cpp::PROTECT_global, 669*cdf0e10cSrcweir ary::loc::Le_id(0), 670*cdf0e10cSrcweir ary::cpp::CK_class ); 671*cdf0e10cSrcweir return &aClassNull_; 672*cdf0e10cSrcweir } 673*cdf0e10cSrcweir 674*cdf0e10cSrcweir 675*cdf0e10cSrcweir 676*cdf0e10cSrcweir //********************* Node ***********************// 677*cdf0e10cSrcweir 678*cdf0e10cSrcweir Node::Node( const ary::cpp::Class & i_rClass, 679*cdf0e10cSrcweir ary::cpp::Type_id i_nClassType, 680*cdf0e10cSrcweir const ary::cpp::Gate & i_rGate, 681*cdf0e10cSrcweir intt i_nPositionOffset, 682*cdf0e10cSrcweir Node * io_pDerived, 683*cdf0e10cSrcweir ary::cpp::E_Protection i_eProtection, 684*cdf0e10cSrcweir bool i_bVirtual ) 685*cdf0e10cSrcweir : aBases(), 686*cdf0e10cSrcweir nCountBases(0), 687*cdf0e10cSrcweir pDerived(io_pDerived), 688*cdf0e10cSrcweir pClass(&i_rClass), 689*cdf0e10cSrcweir nClassType(i_nClassType), 690*cdf0e10cSrcweir eProtection(i_eProtection), 691*cdf0e10cSrcweir bVirtual(i_bVirtual), 692*cdf0e10cSrcweir nPosition(i_nPositionOffset) 693*cdf0e10cSrcweir { 694*cdf0e10cSrcweir typedef ary::cpp::List_Bases BList; 695*cdf0e10cSrcweir 696*cdf0e10cSrcweir for ( BList::const_iterator it = i_rClass.BaseClasses().begin(); 697*cdf0e10cSrcweir it != i_rClass.BaseClasses().end(); 698*cdf0e10cSrcweir ++it ) 699*cdf0e10cSrcweir { 700*cdf0e10cSrcweir const ary::cpp::Class * 701*cdf0e10cSrcweir pBaseClass = HereFind_Class( i_rGate, (*it).nId ); 702*cdf0e10cSrcweir 703*cdf0e10cSrcweir Dyn<Node> 704*cdf0e10cSrcweir pBase( new Node(*pBaseClass, 705*cdf0e10cSrcweir (*it).nId, 706*cdf0e10cSrcweir i_rGate, 707*cdf0e10cSrcweir nPosition, 708*cdf0e10cSrcweir this, 709*cdf0e10cSrcweir (*it).eProtection, 710*cdf0e10cSrcweir (*it).eVirtuality == ary::cpp::VIRTUAL_virtual) 711*cdf0e10cSrcweir ); 712*cdf0e10cSrcweir IncrBaseCount(); 713*cdf0e10cSrcweir nPosition += pBase->BaseCount() + 1; 714*cdf0e10cSrcweir aBases.push_back( pBase.Release() ); 715*cdf0e10cSrcweir } // end for 716*cdf0e10cSrcweir } 717*cdf0e10cSrcweir 718*cdf0e10cSrcweir Node::~Node() 719*cdf0e10cSrcweir { 720*cdf0e10cSrcweir } 721*cdf0e10cSrcweir 722*cdf0e10cSrcweir void 723*cdf0e10cSrcweir Node::FillPositionList( std::vector< const Node* > & o_rPositionList ) const 724*cdf0e10cSrcweir { 725*cdf0e10cSrcweir for ( BaseList::const_iterator it = aBases.begin(); 726*cdf0e10cSrcweir it != aBases.end(); 727*cdf0e10cSrcweir ++it ) 728*cdf0e10cSrcweir { 729*cdf0e10cSrcweir (*it)->FillPositionList(o_rPositionList); 730*cdf0e10cSrcweir } // end for 731*cdf0e10cSrcweir 732*cdf0e10cSrcweir if( o_rPositionList.size() != uintt(Position()) ) 733*cdf0e10cSrcweir { 734*cdf0e10cSrcweir csv_assert(false); 735*cdf0e10cSrcweir } 736*cdf0e10cSrcweir o_rPositionList.push_back(this); 737*cdf0e10cSrcweir } 738*cdf0e10cSrcweir 739*cdf0e10cSrcweir void 740*cdf0e10cSrcweir Node::Write2( csi::xml::Element & o_rOut, 741*cdf0e10cSrcweir const OuputPage_Environment & i_rEnv ) const 742*cdf0e10cSrcweir { 743*cdf0e10cSrcweir if ( Derived() == 0 ) 744*cdf0e10cSrcweir { 745*cdf0e10cSrcweir o_rOut 746*cdf0e10cSrcweir >> *new xml::AnElement("span") 747*cdf0e10cSrcweir << new html::ClassAttr("btself") 748*cdf0e10cSrcweir << pClass->LocalName(); 749*cdf0e10cSrcweir return; 750*cdf0e10cSrcweir } 751*cdf0e10cSrcweir 752*cdf0e10cSrcweir csi::xml::Element * 753*cdf0e10cSrcweir pOut = & ( o_rOut >> *new xml::AnElement("span") ); 754*cdf0e10cSrcweir switch ( eProtection ) 755*cdf0e10cSrcweir { 756*cdf0e10cSrcweir case ary::cpp::PROTECT_public: 757*cdf0e10cSrcweir if (bVirtual) 758*cdf0e10cSrcweir *pOut << new html::ClassAttr("btvpubl"); 759*cdf0e10cSrcweir else 760*cdf0e10cSrcweir *pOut << new html::ClassAttr("btpubl"); 761*cdf0e10cSrcweir break; 762*cdf0e10cSrcweir case ary::cpp::PROTECT_protected: 763*cdf0e10cSrcweir if (bVirtual) 764*cdf0e10cSrcweir *pOut << new html::ClassAttr("btvprot"); 765*cdf0e10cSrcweir else 766*cdf0e10cSrcweir *pOut << new html::ClassAttr("btprot"); 767*cdf0e10cSrcweir break; 768*cdf0e10cSrcweir case ary::cpp::PROTECT_private: 769*cdf0e10cSrcweir if (bVirtual) 770*cdf0e10cSrcweir *pOut << new html::ClassAttr("btvpriv"); 771*cdf0e10cSrcweir else 772*cdf0e10cSrcweir *pOut << new html::ClassAttr("btpriv"); 773*cdf0e10cSrcweir break; 774*cdf0e10cSrcweir default: // do nothing. 775*cdf0e10cSrcweir ; 776*cdf0e10cSrcweir } // end switch 777*cdf0e10cSrcweir 778*cdf0e10cSrcweir csi::xml::Element & rOut = *pOut; 779*cdf0e10cSrcweir 780*cdf0e10cSrcweir Get_LinkedTypeText( rOut, i_rEnv, nClassType, false ); 781*cdf0e10cSrcweir rOut << " ("; 782*cdf0e10cSrcweir if ( bVirtual ) 783*cdf0e10cSrcweir rOut << "virtual "; 784*cdf0e10cSrcweir switch ( eProtection ) 785*cdf0e10cSrcweir { 786*cdf0e10cSrcweir case ary::cpp::PROTECT_public: 787*cdf0e10cSrcweir rOut << "public)"; 788*cdf0e10cSrcweir break; 789*cdf0e10cSrcweir case ary::cpp::PROTECT_protected: 790*cdf0e10cSrcweir rOut << "protected)"; 791*cdf0e10cSrcweir break; 792*cdf0e10cSrcweir case ary::cpp::PROTECT_private: 793*cdf0e10cSrcweir rOut << "private)"; 794*cdf0e10cSrcweir break; 795*cdf0e10cSrcweir default: // do nothing. 796*cdf0e10cSrcweir ; 797*cdf0e10cSrcweir } // end switch 798*cdf0e10cSrcweir } 799*cdf0e10cSrcweir 800*cdf0e10cSrcweir void 801*cdf0e10cSrcweir Node::IncrBaseCount() 802*cdf0e10cSrcweir { 803*cdf0e10cSrcweir ++nCountBases; 804*cdf0e10cSrcweir if (pDerived != 0) 805*cdf0e10cSrcweir pDerived->IncrBaseCount(); 806*cdf0e10cSrcweir } 807*cdf0e10cSrcweir 808*cdf0e10cSrcweir 809*cdf0e10cSrcweir } // anonymous namespace 810*cdf0e10cSrcweir 811*cdf0e10cSrcweir 812