1*0841af79SAndrew Rist /************************************************************** 2cdf0e10cSrcweir * 3*0841af79SAndrew Rist * Licensed to the Apache Software Foundation (ASF) under one 4*0841af79SAndrew Rist * or more contributor license agreements. See the NOTICE file 5*0841af79SAndrew Rist * distributed with this work for additional information 6*0841af79SAndrew Rist * regarding copyright ownership. The ASF licenses this file 7*0841af79SAndrew Rist * to you under the Apache License, Version 2.0 (the 8*0841af79SAndrew Rist * "License"); you may not use this file except in compliance 9*0841af79SAndrew Rist * with the License. You may obtain a copy of the License at 10cdf0e10cSrcweir * 11*0841af79SAndrew Rist * http://www.apache.org/licenses/LICENSE-2.0 12cdf0e10cSrcweir * 13*0841af79SAndrew Rist * Unless required by applicable law or agreed to in writing, 14*0841af79SAndrew Rist * software distributed under the License is distributed on an 15*0841af79SAndrew Rist * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 16*0841af79SAndrew Rist * KIND, either express or implied. See the License for the 17*0841af79SAndrew Rist * specific language governing permissions and limitations 18*0841af79SAndrew Rist * under the License. 19cdf0e10cSrcweir * 20*0841af79SAndrew Rist *************************************************************/ 21cdf0e10cSrcweir 22cdf0e10cSrcweir #include <precomp.h> 23cdf0e10cSrcweir #include "hd_chlst.hxx" 24cdf0e10cSrcweir 25cdf0e10cSrcweir 26cdf0e10cSrcweir // NOT FULLY DEFINED SERVICES 27cdf0e10cSrcweir #include <ary/ceslot.hxx> 28cdf0e10cSrcweir #include <ary/cpp/c_gate.hxx> 29cdf0e10cSrcweir #include <ary/cpp/c_namesp.hxx> 30cdf0e10cSrcweir #include <ary/cpp/c_class.hxx> 31cdf0e10cSrcweir #include <ary/cpp/c_enum.hxx> 32cdf0e10cSrcweir #include <ary/cpp/c_tydef.hxx> 33cdf0e10cSrcweir #include <ary/cpp/c_funct.hxx> 34cdf0e10cSrcweir #include <ary/cpp/c_vari.hxx> 35cdf0e10cSrcweir #include <ary/cpp/c_enuval.hxx> 36cdf0e10cSrcweir #include <ary/loc/loc_file.hxx> 37cdf0e10cSrcweir #include <ary/loc/locp_le.hxx> 38cdf0e10cSrcweir #include <ary/doc/d_oldcppdocu.hxx> 39cdf0e10cSrcweir #include <ary/info/ci_attag.hxx> 40cdf0e10cSrcweir #include <ary/info/ci_text.hxx> 41cdf0e10cSrcweir #include <ary/info/all_dts.hxx> 42cdf0e10cSrcweir #include "hd_docu.hxx" 43cdf0e10cSrcweir #include "opageenv.hxx" 44cdf0e10cSrcweir #include "protarea.hxx" 45cdf0e10cSrcweir #include "strconst.hxx" 46cdf0e10cSrcweir 47cdf0e10cSrcweir 48cdf0e10cSrcweir using namespace csi; 49cdf0e10cSrcweir using html::Table; 50cdf0e10cSrcweir using html::TableRow; 51cdf0e10cSrcweir using html::TableCell; 52cdf0e10cSrcweir using html::Font; 53cdf0e10cSrcweir using html::SizeAttr; 54cdf0e10cSrcweir using html::BgColorAttr; 55cdf0e10cSrcweir using html::WidthAttr; 56cdf0e10cSrcweir 57cdf0e10cSrcweir 58cdf0e10cSrcweir const int ixPublic = 0; 59cdf0e10cSrcweir const int ixProtected = 1; 60cdf0e10cSrcweir const int ixPrivate = 2; 61cdf0e10cSrcweir 62cdf0e10cSrcweir struct ChildList_Display::S_AreaCo 63cdf0e10cSrcweir { 64cdf0e10cSrcweir public: 65cdf0e10cSrcweir ProtectionArea aArea; 66cdf0e10cSrcweir Area_Result * pResult; 67cdf0e10cSrcweir 68cdf0e10cSrcweir S_AreaCo( 69cdf0e10cSrcweir Area_Result & o_rResult, 70cdf0e10cSrcweir const char * i_sLabel, 71cdf0e10cSrcweir const char * i_sTitle ); 72cdf0e10cSrcweir ~S_AreaCo(); 73cdf0e10cSrcweir 74cdf0e10cSrcweir void PerformResult(); 75cdf0e10cSrcweir 76cdf0e10cSrcweir private: 77cdf0e10cSrcweir csi::xml::Element & Out() { return pResult->rOut; } 78cdf0e10cSrcweir }; 79cdf0e10cSrcweir 80cdf0e10cSrcweir 81cdf0e10cSrcweir const ary::info::DocuText & 82cdf0e10cSrcweir ShortDocu( const ary::cpp::CodeEntity & i_rCe ) 83cdf0e10cSrcweir { 84cdf0e10cSrcweir static const ary::info::DocuText 85cdf0e10cSrcweir aNull_; 86cdf0e10cSrcweir 87cdf0e10cSrcweir const ary::doc::OldCppDocu * 88cdf0e10cSrcweir pInfo = dynamic_cast< const ary::doc::OldCppDocu* >( i_rCe.Docu().Data() ); 89cdf0e10cSrcweir if (pInfo == 0) 90cdf0e10cSrcweir return aNull_; 91cdf0e10cSrcweir 92cdf0e10cSrcweir return pInfo->Short().CText(); 93cdf0e10cSrcweir } 94cdf0e10cSrcweir 95cdf0e10cSrcweir 96cdf0e10cSrcweir ChildList_Display::ChildList_Display( OuputPage_Environment & io_rEnv ) 97cdf0e10cSrcweir : HtmlDisplay_Impl( io_rEnv ), 98cdf0e10cSrcweir pShortDocu_Display( new Docu_Display(io_rEnv) ), 99cdf0e10cSrcweir pActiveParentClass(0), 100cdf0e10cSrcweir pActiveParentEnum(0), 101cdf0e10cSrcweir // pSglArea, 102cdf0e10cSrcweir // aMemberAreas, 103cdf0e10cSrcweir peClassesFilter(0) 104cdf0e10cSrcweir { 105cdf0e10cSrcweir } 106cdf0e10cSrcweir 107cdf0e10cSrcweir ChildList_Display::ChildList_Display( OuputPage_Environment & io_rEnv, 108cdf0e10cSrcweir const ary::cpp::Class & i_rClass ) 109cdf0e10cSrcweir : HtmlDisplay_Impl( io_rEnv ), 110cdf0e10cSrcweir pShortDocu_Display( new Docu_Display(io_rEnv) ), 111cdf0e10cSrcweir pActiveParentClass(&i_rClass), 112cdf0e10cSrcweir pActiveParentEnum(0), 113cdf0e10cSrcweir // pSglArea, 114cdf0e10cSrcweir // aMemberAreas, 115cdf0e10cSrcweir peClassesFilter(0) 116cdf0e10cSrcweir { 117cdf0e10cSrcweir } 118cdf0e10cSrcweir 119cdf0e10cSrcweir ChildList_Display::ChildList_Display( OuputPage_Environment & io_rEnv, 120cdf0e10cSrcweir const ary::cpp::Enum & i_rEnum ) 121cdf0e10cSrcweir : HtmlDisplay_Impl( io_rEnv ), 122cdf0e10cSrcweir pShortDocu_Display( new Docu_Display(io_rEnv) ), 123cdf0e10cSrcweir pActiveParentClass(0), 124cdf0e10cSrcweir pActiveParentEnum(&i_rEnum), 125cdf0e10cSrcweir // pSglArea, 126cdf0e10cSrcweir // aMemberAreas, 127cdf0e10cSrcweir peClassesFilter(0) 128cdf0e10cSrcweir { 129cdf0e10cSrcweir } 130cdf0e10cSrcweir 131cdf0e10cSrcweir ChildList_Display::~ChildList_Display() 132cdf0e10cSrcweir { 133cdf0e10cSrcweir } 134cdf0e10cSrcweir 135cdf0e10cSrcweir void 136cdf0e10cSrcweir ChildList_Display::Run_Simple( Area_Result & o_rResult, 137cdf0e10cSrcweir ary::SlotAccessId i_nSlot, 138cdf0e10cSrcweir const char * i_sListLabel, 139cdf0e10cSrcweir const char * i_sListTitle ) 140cdf0e10cSrcweir { 141cdf0e10cSrcweir ary::Slot_AutoPtr 142cdf0e10cSrcweir pSlot( ActiveParent().Create_Slot( i_nSlot ) ); 143cdf0e10cSrcweir if ( pSlot->Size() == 0 ) 144cdf0e10cSrcweir return; 145cdf0e10cSrcweir 146cdf0e10cSrcweir pSglArea = new S_AreaCo( o_rResult, 147cdf0e10cSrcweir i_sListLabel, 148cdf0e10cSrcweir i_sListTitle ); 149cdf0e10cSrcweir 150cdf0e10cSrcweir pSlot->StoreAt(*this); 151cdf0e10cSrcweir 152cdf0e10cSrcweir pSglArea->PerformResult(); 153cdf0e10cSrcweir pSglArea = 0; 154cdf0e10cSrcweir } 155cdf0e10cSrcweir 156cdf0e10cSrcweir void 157cdf0e10cSrcweir ChildList_Display::Run_GlobalClasses( Area_Result & o_rResult, 158cdf0e10cSrcweir ary::SlotAccessId i_nSlot, 159cdf0e10cSrcweir const char * i_sListLabel, 160cdf0e10cSrcweir const char * i_sListTitle, 161cdf0e10cSrcweir ary::cpp::E_ClassKey i_eFilter ) 162cdf0e10cSrcweir { 163cdf0e10cSrcweir ary::Slot_AutoPtr 164cdf0e10cSrcweir pSlot( ActiveParent().Create_Slot( i_nSlot ) ); 165cdf0e10cSrcweir if ( pSlot->Size() == 0 ) 166cdf0e10cSrcweir return; 167cdf0e10cSrcweir 168cdf0e10cSrcweir pSglArea = new S_AreaCo( o_rResult, 169cdf0e10cSrcweir i_sListLabel, 170cdf0e10cSrcweir i_sListTitle ); 171cdf0e10cSrcweir 172cdf0e10cSrcweir SetClassesFilter(i_eFilter); 173cdf0e10cSrcweir pSlot->StoreAt(*this); 174cdf0e10cSrcweir UnsetClassesFilter(); 175cdf0e10cSrcweir 176cdf0e10cSrcweir pSglArea->PerformResult(); 177cdf0e10cSrcweir pSglArea = 0; 178cdf0e10cSrcweir } 179cdf0e10cSrcweir 180cdf0e10cSrcweir void 181cdf0e10cSrcweir ChildList_Display::Run_Members( Area_Result & o_rResult_public, 182cdf0e10cSrcweir Area_Result & o_rResult_protected, 183cdf0e10cSrcweir Area_Result & o_rResult_private, 184cdf0e10cSrcweir ary::SlotAccessId i_nSlot, 185cdf0e10cSrcweir const char * i_sListLabel_public, 186cdf0e10cSrcweir const char * i_sListLabel_protected, 187cdf0e10cSrcweir const char * i_sListLabel_private, 188cdf0e10cSrcweir const char * i_sListTitle ) 189cdf0e10cSrcweir { 190cdf0e10cSrcweir ary::Slot_AutoPtr 191cdf0e10cSrcweir pSlot( ActiveParent().Create_Slot(i_nSlot) ); 192cdf0e10cSrcweir if ( pSlot->Size() == 0 ) 193cdf0e10cSrcweir return; 194cdf0e10cSrcweir 195cdf0e10cSrcweir aMemberAreas[ixPublic] = new S_AreaCo( o_rResult_public, 196cdf0e10cSrcweir i_sListLabel_public, 197cdf0e10cSrcweir i_sListTitle ); 198cdf0e10cSrcweir aMemberAreas[ixProtected] = new S_AreaCo( o_rResult_protected, 199cdf0e10cSrcweir i_sListLabel_protected, 200cdf0e10cSrcweir i_sListTitle ); 201cdf0e10cSrcweir aMemberAreas[ixPrivate] = new S_AreaCo( o_rResult_private, 202cdf0e10cSrcweir i_sListLabel_private, 203cdf0e10cSrcweir i_sListTitle ); 204cdf0e10cSrcweir 205cdf0e10cSrcweir pSlot->StoreAt(*this); 206cdf0e10cSrcweir 207cdf0e10cSrcweir aMemberAreas[ixPublic]->PerformResult(); 208cdf0e10cSrcweir aMemberAreas[ixProtected]->PerformResult(); 209cdf0e10cSrcweir aMemberAreas[ixPrivate]->PerformResult(); 210cdf0e10cSrcweir 211cdf0e10cSrcweir aMemberAreas[ixPublic] = 0; 212cdf0e10cSrcweir aMemberAreas[ixProtected] = 0; 213cdf0e10cSrcweir aMemberAreas[ixPrivate] = 0; 214cdf0e10cSrcweir } 215cdf0e10cSrcweir 216cdf0e10cSrcweir void 217cdf0e10cSrcweir ChildList_Display::Run_MemberClasses( Area_Result & o_rResult_public, 218cdf0e10cSrcweir Area_Result & o_rResult_protected, 219cdf0e10cSrcweir Area_Result & o_rResult_private, 220cdf0e10cSrcweir ary::SlotAccessId i_nSlot, 221cdf0e10cSrcweir const char * i_sListLabel_public, 222cdf0e10cSrcweir const char * i_sListLabel_protected, 223cdf0e10cSrcweir const char * i_sListLabel_private, 224cdf0e10cSrcweir const char * i_sListTitle, 225cdf0e10cSrcweir ary::cpp::E_ClassKey i_eFilter ) 226cdf0e10cSrcweir { 227cdf0e10cSrcweir ary::Slot_AutoPtr 228cdf0e10cSrcweir pSlot( ActiveParent().Create_Slot(i_nSlot) ); 229cdf0e10cSrcweir if ( pSlot->Size() == 0 ) 230cdf0e10cSrcweir return; 231cdf0e10cSrcweir 232cdf0e10cSrcweir aMemberAreas[ixPublic] = new S_AreaCo( o_rResult_public, 233cdf0e10cSrcweir i_sListLabel_public, 234cdf0e10cSrcweir i_sListTitle ); 235cdf0e10cSrcweir aMemberAreas[ixProtected] = new S_AreaCo( o_rResult_protected, 236cdf0e10cSrcweir i_sListLabel_protected, 237cdf0e10cSrcweir i_sListTitle ); 238cdf0e10cSrcweir aMemberAreas[ixPrivate] = new S_AreaCo( o_rResult_private, 239cdf0e10cSrcweir i_sListLabel_private, 240cdf0e10cSrcweir i_sListTitle ); 241cdf0e10cSrcweir 242cdf0e10cSrcweir SetClassesFilter(i_eFilter); 243cdf0e10cSrcweir pSlot->StoreAt(*this); 244cdf0e10cSrcweir UnsetClassesFilter(); 245cdf0e10cSrcweir 246cdf0e10cSrcweir aMemberAreas[ixPublic]->PerformResult(); 247cdf0e10cSrcweir aMemberAreas[ixProtected]->PerformResult(); 248cdf0e10cSrcweir aMemberAreas[ixPrivate]->PerformResult(); 249cdf0e10cSrcweir 250cdf0e10cSrcweir aMemberAreas[ixPublic] = 0; 251cdf0e10cSrcweir aMemberAreas[ixProtected] = 0; 252cdf0e10cSrcweir aMemberAreas[ixPrivate] = 0; 253cdf0e10cSrcweir } 254cdf0e10cSrcweir 255cdf0e10cSrcweir void 256cdf0e10cSrcweir ChildList_Display::do_Process( const ary::cpp::Namespace & i_rData ) 257cdf0e10cSrcweir { 258cdf0e10cSrcweir Write_ListItem( i_rData.LocalName(), 259cdf0e10cSrcweir Path2ChildNamespace(i_rData.LocalName()), 260cdf0e10cSrcweir ShortDocu( i_rData ), 261cdf0e10cSrcweir GetArea().GetTable() ); 262cdf0e10cSrcweir } 263cdf0e10cSrcweir 264cdf0e10cSrcweir void 265cdf0e10cSrcweir ChildList_Display::do_Process( const ary::cpp::Class & i_rData ) 266cdf0e10cSrcweir { 267cdf0e10cSrcweir if ( Ce_IsInternal(i_rData) ) 268cdf0e10cSrcweir return; 269cdf0e10cSrcweir 270cdf0e10cSrcweir if (peClassesFilter) 271cdf0e10cSrcweir { 272cdf0e10cSrcweir if (*peClassesFilter != i_rData.ClassKey() ) 273cdf0e10cSrcweir return; 274cdf0e10cSrcweir } 275cdf0e10cSrcweir 276cdf0e10cSrcweir String sLink; 277cdf0e10cSrcweir if ( i_rData.Protection() == ary::cpp::PROTECT_global ) 278cdf0e10cSrcweir { 279cdf0e10cSrcweir sLink = ClassFileName(i_rData.LocalName()); 280cdf0e10cSrcweir 281cdf0e10cSrcweir } 282cdf0e10cSrcweir else 283cdf0e10cSrcweir { 284cdf0e10cSrcweir csv_assert( pActiveParentClass != 0 ); 285cdf0e10cSrcweir sLink = Path2Child( ClassFileName(i_rData.LocalName()), pActiveParentClass->LocalName() ); 286cdf0e10cSrcweir } 287cdf0e10cSrcweir 288cdf0e10cSrcweir if (peClassesFilter) 289cdf0e10cSrcweir { 290cdf0e10cSrcweir Write_ListItem( i_rData.LocalName(), 291cdf0e10cSrcweir sLink, 292cdf0e10cSrcweir ShortDocu( i_rData ), 293cdf0e10cSrcweir GetArea(i_rData.Protection()) 294cdf0e10cSrcweir .GetTable() ); 295cdf0e10cSrcweir } 296cdf0e10cSrcweir else 297cdf0e10cSrcweir { 298cdf0e10cSrcweir Write_ListItem( i_rData.LocalName(), 299cdf0e10cSrcweir sLink, 300cdf0e10cSrcweir ShortDocu( i_rData ), 301cdf0e10cSrcweir GetArea(i_rData.Protection()) 302cdf0e10cSrcweir .GetTable(i_rData.ClassKey()) ); 303cdf0e10cSrcweir } 304cdf0e10cSrcweir } 305cdf0e10cSrcweir 306cdf0e10cSrcweir void 307cdf0e10cSrcweir ChildList_Display::do_Process( const ary::cpp::Enum & i_rData ) 308cdf0e10cSrcweir { 309cdf0e10cSrcweir if ( Ce_IsInternal(i_rData) ) 310cdf0e10cSrcweir return; 311cdf0e10cSrcweir 312cdf0e10cSrcweir String sLink; 313cdf0e10cSrcweir if ( i_rData.Protection() == ary::cpp::PROTECT_global ) 314cdf0e10cSrcweir { 315cdf0e10cSrcweir sLink = EnumFileName(i_rData.LocalName()); 316cdf0e10cSrcweir } 317cdf0e10cSrcweir else 318cdf0e10cSrcweir { 319cdf0e10cSrcweir csv_assert( pActiveParentClass != 0 ); 320cdf0e10cSrcweir sLink = Path2Child( EnumFileName(i_rData.LocalName()), 321cdf0e10cSrcweir pActiveParentClass->LocalName() ); 322cdf0e10cSrcweir } 323cdf0e10cSrcweir 324cdf0e10cSrcweir Write_ListItem( i_rData.LocalName(), 325cdf0e10cSrcweir sLink, 326cdf0e10cSrcweir ShortDocu( i_rData ), 327cdf0e10cSrcweir GetArea(i_rData.Protection()).GetTable() ); 328cdf0e10cSrcweir } 329cdf0e10cSrcweir 330cdf0e10cSrcweir void 331cdf0e10cSrcweir ChildList_Display::do_Process( const ary::cpp::Typedef & i_rData ) 332cdf0e10cSrcweir { 333cdf0e10cSrcweir if ( Ce_IsInternal(i_rData) ) 334cdf0e10cSrcweir return; 335cdf0e10cSrcweir 336cdf0e10cSrcweir String sLink; 337cdf0e10cSrcweir if ( i_rData.Protection() == ary::cpp::PROTECT_global ) 338cdf0e10cSrcweir { 339cdf0e10cSrcweir sLink = TypedefFileName(i_rData.LocalName()); 340cdf0e10cSrcweir } 341cdf0e10cSrcweir else 342cdf0e10cSrcweir { 343cdf0e10cSrcweir csv_assert( pActiveParentClass != 0 ); 344cdf0e10cSrcweir sLink = Path2Child( TypedefFileName(i_rData.LocalName()), 345cdf0e10cSrcweir pActiveParentClass->LocalName() ); 346cdf0e10cSrcweir } 347cdf0e10cSrcweir 348cdf0e10cSrcweir Write_ListItem( i_rData.LocalName(), 349cdf0e10cSrcweir sLink, 350cdf0e10cSrcweir ShortDocu( i_rData ), 351cdf0e10cSrcweir GetArea(i_rData.Protection()).GetTable() ); 352cdf0e10cSrcweir } 353cdf0e10cSrcweir 354cdf0e10cSrcweir void 355cdf0e10cSrcweir ChildList_Display::do_Process( const ary::cpp::Function & i_rData ) 356cdf0e10cSrcweir { 357cdf0e10cSrcweir if ( Ce_IsInternal(i_rData) ) 358cdf0e10cSrcweir return; 359cdf0e10cSrcweir 360cdf0e10cSrcweir String sLinkPrePath; 361cdf0e10cSrcweir if ( i_rData.Protection() == ary::cpp::PROTECT_global ) 362cdf0e10cSrcweir { 363cdf0e10cSrcweir const ary::loc::File & 364cdf0e10cSrcweir rFile = Env().Gate().Locations().Find_File( i_rData.Location() ); 365cdf0e10cSrcweir sLinkPrePath = HtmlFileName( "o-", rFile.LocalName() ); 366cdf0e10cSrcweir } 367cdf0e10cSrcweir else 368cdf0e10cSrcweir { 369cdf0e10cSrcweir csv_assert( pActiveParentClass != 0 ); 370cdf0e10cSrcweir sLinkPrePath = Path2Child( HtmlFileName( "o", "" ), 371cdf0e10cSrcweir pActiveParentClass->LocalName() ); 372cdf0e10cSrcweir } 373cdf0e10cSrcweir 374cdf0e10cSrcweir // Out 375cdf0e10cSrcweir Table & rOut = GetArea(i_rData.Protection()).GetTable(); 376cdf0e10cSrcweir TableRow * dpRow = new TableRow; 377cdf0e10cSrcweir rOut << dpRow; 378cdf0e10cSrcweir TableCell & rCell1 = dpRow->AddCell(); 379cdf0e10cSrcweir 380cdf0e10cSrcweir rCell1 381cdf0e10cSrcweir << SyntaxText_PreName( i_rData, Env().Gate() ) 382cdf0e10cSrcweir << new html::LineBreak; 383cdf0e10cSrcweir rCell1 384cdf0e10cSrcweir >> *new html::Link( OperationLink( 385cdf0e10cSrcweir Env().Gate(), 386cdf0e10cSrcweir i_rData.LocalName(), 387cdf0e10cSrcweir i_rData.CeId(), 388cdf0e10cSrcweir sLinkPrePath) ) 389cdf0e10cSrcweir << i_rData.LocalName(); 390cdf0e10cSrcweir rCell1 391cdf0e10cSrcweir << SyntaxText_PostName( i_rData, Env().Gate() ); 392cdf0e10cSrcweir TableCell & 393cdf0e10cSrcweir rCell2 = dpRow->AddCell(); 394cdf0e10cSrcweir rCell2 395cdf0e10cSrcweir << new WidthAttr("50%") 396cdf0e10cSrcweir << " "; 397cdf0e10cSrcweir 398cdf0e10cSrcweir pShortDocu_Display->Assign_Out( rCell2 ); 399cdf0e10cSrcweir ShortDocu( i_rData ).StoreAt( *pShortDocu_Display ); 400cdf0e10cSrcweir pShortDocu_Display->Unassign_Out(); 401cdf0e10cSrcweir } 402cdf0e10cSrcweir 403cdf0e10cSrcweir void 404cdf0e10cSrcweir ChildList_Display::do_Process( const ary::cpp::Variable & i_rData ) 405cdf0e10cSrcweir { 406cdf0e10cSrcweir if ( Ce_IsInternal(i_rData) ) 407cdf0e10cSrcweir return; 408cdf0e10cSrcweir 409cdf0e10cSrcweir String sLinkPrePath; 410cdf0e10cSrcweir if ( i_rData.Protection() == ary::cpp::PROTECT_global ) 411cdf0e10cSrcweir { 412cdf0e10cSrcweir const ary::loc::File & 413cdf0e10cSrcweir rFile = Env().Gate().Locations().Find_File( i_rData.Location() ); 414cdf0e10cSrcweir sLinkPrePath = HtmlFileName( "d-", rFile.LocalName() ); 415cdf0e10cSrcweir } 416cdf0e10cSrcweir else 417cdf0e10cSrcweir { 418cdf0e10cSrcweir csv_assert( pActiveParentClass != 0 ); 419cdf0e10cSrcweir sLinkPrePath = Path2Child( HtmlFileName( "d", "" ), 420cdf0e10cSrcweir pActiveParentClass->LocalName() ); 421cdf0e10cSrcweir } 422cdf0e10cSrcweir 423cdf0e10cSrcweir TableRow * dpRow = new TableRow; 424cdf0e10cSrcweir GetArea(i_rData.Protection()).GetTable() << dpRow; 425cdf0e10cSrcweir 426cdf0e10cSrcweir *dpRow << new html::BgColorAttr("white"); 427cdf0e10cSrcweir csi::xml::Element & 428cdf0e10cSrcweir rCell1 = dpRow->AddCell(); 429cdf0e10cSrcweir 430cdf0e10cSrcweir dshelp::Get_LinkedTypeText( rCell1, Env(), i_rData.Type() ); 431cdf0e10cSrcweir rCell1 432cdf0e10cSrcweir << " " 433cdf0e10cSrcweir >> *new html::Link( DataLink(i_rData.LocalName(), sLinkPrePath.c_str()) ) 434cdf0e10cSrcweir >> *new html::Strong 435cdf0e10cSrcweir << i_rData.LocalName() 436cdf0e10cSrcweir << ";"; 437cdf0e10cSrcweir 438cdf0e10cSrcweir TableCell & rShortDocu = dpRow->AddCell(); 439cdf0e10cSrcweir pShortDocu_Display->Assign_Out( rShortDocu ); 440cdf0e10cSrcweir ShortDocu( i_rData ).StoreAt( *pShortDocu_Display ); 441cdf0e10cSrcweir pShortDocu_Display->Unassign_Out(); 442cdf0e10cSrcweir } 443cdf0e10cSrcweir 444cdf0e10cSrcweir void 445cdf0e10cSrcweir ChildList_Display::do_Process( const ary::cpp::EnumValue & i_rData ) 446cdf0e10cSrcweir { 447cdf0e10cSrcweir if ( Ce_IsInternal(i_rData) ) 448cdf0e10cSrcweir return; 449cdf0e10cSrcweir 450cdf0e10cSrcweir Table & rOut = GetArea().GetTable(); 451cdf0e10cSrcweir 452cdf0e10cSrcweir TableRow * dpRow = new TableRow; 453cdf0e10cSrcweir rOut << dpRow; 454cdf0e10cSrcweir 455cdf0e10cSrcweir *dpRow << new html::BgColorAttr("white"); 456cdf0e10cSrcweir dpRow->AddCell() 457cdf0e10cSrcweir << new WidthAttr("20%") 458cdf0e10cSrcweir << new xml::AnAttribute("valign", "top") 459cdf0e10cSrcweir >> *new html::Label(i_rData.LocalName()) 460cdf0e10cSrcweir >> *new html::Bold 461cdf0e10cSrcweir << i_rData.LocalName(); 462cdf0e10cSrcweir 463cdf0e10cSrcweir TableCell & rValueDocu = dpRow->AddCell(); 464cdf0e10cSrcweir pShortDocu_Display->Assign_Out( rValueDocu ); 465cdf0e10cSrcweir i_rData.Docu().Accept( *pShortDocu_Display ); 466cdf0e10cSrcweir pShortDocu_Display->Unassign_Out(); 467cdf0e10cSrcweir } 468cdf0e10cSrcweir 469cdf0e10cSrcweir void 470cdf0e10cSrcweir ChildList_Display::do_StartSlot() 471cdf0e10cSrcweir { 472cdf0e10cSrcweir } 473cdf0e10cSrcweir 474cdf0e10cSrcweir void 475cdf0e10cSrcweir ChildList_Display::do_FinishSlot() 476cdf0e10cSrcweir { 477cdf0e10cSrcweir } 478cdf0e10cSrcweir 479cdf0e10cSrcweir const ary::cpp::Gate * 480cdf0e10cSrcweir ChildList_Display::inq_Get_ReFinder() const 481cdf0e10cSrcweir { 482cdf0e10cSrcweir return & Env().Gate(); 483cdf0e10cSrcweir } 484cdf0e10cSrcweir 485cdf0e10cSrcweir void 486cdf0e10cSrcweir ChildList_Display::Write_ListItem( const String & i_sLeftText, 487cdf0e10cSrcweir const char * i_sLink, 488cdf0e10cSrcweir const ary::info::DocuText & i_rRightText, 489cdf0e10cSrcweir csi::xml::Element & o_rOut ) 490cdf0e10cSrcweir { 491cdf0e10cSrcweir TableRow * dpRow = new TableRow; 492cdf0e10cSrcweir o_rOut << dpRow; 493cdf0e10cSrcweir 494cdf0e10cSrcweir *dpRow << new html::BgColorAttr("white"); 495cdf0e10cSrcweir dpRow->AddCell() 496cdf0e10cSrcweir << new WidthAttr("20%") 497cdf0e10cSrcweir >> *new html::Link( i_sLink ) 498cdf0e10cSrcweir >> *new html::Bold 499cdf0e10cSrcweir << i_sLeftText; 500cdf0e10cSrcweir 501cdf0e10cSrcweir TableCell & rShortDocu = dpRow->AddCell(); 502cdf0e10cSrcweir pShortDocu_Display->Assign_Out( rShortDocu ); 503cdf0e10cSrcweir i_rRightText.StoreAt( *pShortDocu_Display ); 504cdf0e10cSrcweir pShortDocu_Display->Unassign_Out(); 505cdf0e10cSrcweir } 506cdf0e10cSrcweir 507cdf0e10cSrcweir const ary::AryGroup & 508cdf0e10cSrcweir ChildList_Display::ActiveParent() 509cdf0e10cSrcweir { 510cdf0e10cSrcweir return pActiveParentClass != 0 511cdf0e10cSrcweir ? static_cast< const ary::AryGroup& >(*pActiveParentClass) 512cdf0e10cSrcweir : pActiveParentEnum != 0 513cdf0e10cSrcweir ? static_cast< const ary::AryGroup& >(*pActiveParentEnum) 514cdf0e10cSrcweir : static_cast< const ary::AryGroup& >(*Env().CurNamespace()); 515cdf0e10cSrcweir } 516cdf0e10cSrcweir 517cdf0e10cSrcweir ProtectionArea & 518cdf0e10cSrcweir ChildList_Display::GetArea() 519cdf0e10cSrcweir { 520cdf0e10cSrcweir return pSglArea->aArea; 521cdf0e10cSrcweir } 522cdf0e10cSrcweir 523cdf0e10cSrcweir ProtectionArea & 524cdf0e10cSrcweir ChildList_Display::GetArea( ary::cpp::E_Protection i_eProtection ) 525cdf0e10cSrcweir { 526cdf0e10cSrcweir switch ( i_eProtection ) 527cdf0e10cSrcweir { 528cdf0e10cSrcweir case ary::cpp::PROTECT_public: 529cdf0e10cSrcweir return aMemberAreas[ixPublic]->aArea; 530cdf0e10cSrcweir case ary::cpp::PROTECT_protected: 531cdf0e10cSrcweir return aMemberAreas[ixProtected]->aArea; 532cdf0e10cSrcweir case ary::cpp::PROTECT_private: 533cdf0e10cSrcweir return aMemberAreas[ixPrivate]->aArea; 534cdf0e10cSrcweir default: 535cdf0e10cSrcweir return pSglArea->aArea; 536cdf0e10cSrcweir } 537cdf0e10cSrcweir } 538cdf0e10cSrcweir 539cdf0e10cSrcweir 540cdf0e10cSrcweir //******************* ********************// 541cdf0e10cSrcweir 542cdf0e10cSrcweir ChildList_Display:: 543cdf0e10cSrcweir S_AreaCo::S_AreaCo( Area_Result & o_rResult, 544cdf0e10cSrcweir const char * i_sLabel, 545cdf0e10cSrcweir const char * i_sTitle ) 546cdf0e10cSrcweir : aArea(i_sLabel, i_sTitle), 547cdf0e10cSrcweir pResult(&o_rResult) 548cdf0e10cSrcweir { 549cdf0e10cSrcweir } 550cdf0e10cSrcweir 551cdf0e10cSrcweir ChildList_Display:: 552cdf0e10cSrcweir S_AreaCo::~S_AreaCo() 553cdf0e10cSrcweir { 554cdf0e10cSrcweir } 555cdf0e10cSrcweir 556cdf0e10cSrcweir void 557cdf0e10cSrcweir ChildList_Display:: 558cdf0e10cSrcweir S_AreaCo::PerformResult() 559cdf0e10cSrcweir { 560cdf0e10cSrcweir bool bUsed = aArea.WasUsed_Area(); 561cdf0e10cSrcweir pResult->rChildrenExist = bUsed; 562cdf0e10cSrcweir if ( bUsed ) 563cdf0e10cSrcweir { 564cdf0e10cSrcweir Create_ChildListLabel( Out(), aArea.Label() ); 565cdf0e10cSrcweir 566cdf0e10cSrcweir if ( aArea.Size() == 1 ) 567cdf0e10cSrcweir { 568cdf0e10cSrcweir Out() << aArea.ReleaseTable(); 569cdf0e10cSrcweir } 570cdf0e10cSrcweir else 571cdf0e10cSrcweir { 572cdf0e10cSrcweir Table * pTable = aArea.ReleaseTable( ary::cpp::CK_class ); 573cdf0e10cSrcweir if (pTable != 0) 574cdf0e10cSrcweir Out() << pTable; 575cdf0e10cSrcweir pTable = aArea.ReleaseTable( ary::cpp::CK_struct ); 576cdf0e10cSrcweir if (pTable != 0) 577cdf0e10cSrcweir Out() << pTable; 578cdf0e10cSrcweir pTable = aArea.ReleaseTable( ary::cpp::CK_union ); 579cdf0e10cSrcweir if (pTable != 0) 580cdf0e10cSrcweir Out() << pTable; 581cdf0e10cSrcweir } 582cdf0e10cSrcweir } 583cdf0e10cSrcweir } 584