Update ooo320-m1
[ooovba.git] / autodoc / source / display / html / pm_class.cxx
blob5e1c2db9572492085bbff40edcbca975ac14c14f
1 /*************************************************************************
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4 *
5 * Copyright 2008 by Sun Microsystems, Inc.
7 * OpenOffice.org - a multi-platform office productivity suite
9 * $RCSfile: pm_class.cxx,v $
10 * $Revision: 1.11 $
12 * This file is part of OpenOffice.org.
14 * OpenOffice.org is free software: you can redistribute it and/or modify
15 * it under the terms of the GNU Lesser General Public License version 3
16 * only, as published by the Free Software Foundation.
18 * OpenOffice.org is distributed in the hope that it will be useful,
19 * but WITHOUT ANY WARRANTY; without even the implied warranty of
20 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
21 * GNU Lesser General Public License version 3 for more details
22 * (a copy is included in the LICENSE file that accompanied this code).
24 * You should have received a copy of the GNU Lesser General Public License
25 * version 3 along with OpenOffice.org. If not, see
26 * <http://www.openoffice.org/license.html>
27 * for a copy of the LGPLv3 License.
29 ************************************************************************/
31 #include <precomp.h>
32 #include "pm_class.hxx"
35 // NOT FULLY DEFINED SERVICES
36 #include <ary/cpp/c_gate.hxx>
37 #include <ary/cpp/c_class.hxx>
38 #include <ary/cpp/c_tydef.hxx>
39 #include <ary/cpp/cp_ce.hxx>
40 #include <ary/loc/loc_file.hxx>
41 #include <ary/loc/locp_le.hxx>
42 #include <ary/getncast.hxx>
43 #include "hd_chlst.hxx"
44 #include "hd_docu.hxx"
45 #include "hdimpl.hxx"
46 #include "html_kit.hxx"
47 #include "navibar.hxx"
48 #include "opageenv.hxx"
49 #include "pagemake.hxx"
50 #include "strconst.hxx"
52 using namespace adcdisp;
54 using namespace csi;
55 using csi::html::HorizontalLine;
56 using csi::html::LineBreak;
57 using csi::html::Link;
58 using csi::html::Table;
59 using csi::html::TableRow;
60 using csi::html::TableCell;
62 using ary::cpp::CesConstIterator;
63 using ary::doc::OldCppDocu;
65 const char * const C_sTitle_InnerClasses = "Classes";
66 const char * const C_sTitle_InnerStructs = "Structs";
67 const char * const C_sTitle_InnerUnions = "Unions";
68 const char * const C_sTitle_Methods = "Methods";
69 const char * const C_sTitle_StaticMethods = "Static Methods";
70 const char * const C_sTitle_Data = "Data";
71 const char * const C_sTitle_StaticData = "Static Data";
73 const char * const C_sLabel_StaticOperations = "static_ops";
74 const char * const C_sLabel_StaticVariables = "static_vars";
76 const char * const C_sTitlePublic = "Public Members";
77 const char * const C_sTitleProtected = "Protected Members";
78 const char * const C_sTitlePrivate = "Private Members";
79 const char * const C_sMprTitles[3] = { C_sTitlePublic,
80 C_sTitleProtected,
81 C_sTitlePrivate
83 const char * const C_sSummaryTitlePublic = "Public Members";
84 const char * const C_sSummaryTitleProtected = "Protected Members";
85 const char * const C_sSummaryTitlePrivate = "Private Members";
86 const char *
87 C_sMprSummaryTitles[3] =
88 { C_sSummaryTitlePublic, C_sSummaryTitleProtected, C_sSummaryTitlePrivate };
89 const char *
90 C_sMprPrefixes[3] =
91 { "publ_", "prot_", "priv_" };
92 const char *
93 C_sSummaryItems_Titles[PageMaker_Class::cl_MAX] =
94 { C_sTitle_InnerClasses, C_sTitle_InnerStructs, C_sTitle_InnerUnions,
95 C_sTitle_Enums, C_sTitle_Typedefs,
96 C_sTitle_Methods, C_sTitle_StaticMethods, C_sTitle_Data, C_sTitle_StaticData };
97 const char *
98 C_sSummaryItems_Labels[PageMaker_Class::cl_MAX] =
99 { C_sLabel_Classes, C_sLabel_Structs, C_sLabel_Unions,
100 C_sLabel_Enums, C_sLabel_Typedefs,
101 C_sLabel_Operations, C_sLabel_StaticOperations,
102 C_sLabel_Variables, C_sLabel_StaticVariables };
105 const ary::cpp::E_Protection
106 aProt[3] = { ary::cpp::PROTECT_public,
107 ary::cpp::PROTECT_protected,
108 ary::cpp::PROTECT_private };
111 PageMaker_Class::PageMaker_Class( PageDisplay & io_rPage,
112 const ary::cpp::Class & i_rClass )
113 : SpecializedPageMaker(io_rPage),
114 pMe( &i_rClass ),
115 pChildDisplay( new ChildList_Display(io_rPage.Env(), i_rClass) ),
116 pNavi(0)
117 // pProtectionArea,
118 // bChildLists_Exist
120 int i_max = 3 * cl_MAX;
121 for (int i = 0; i < i_max; i++)
123 bChildLists_Exist[i] = false;
124 } // end for
127 PageMaker_Class::~PageMaker_Class()
131 void
132 PageMaker_Class::MakePage()
134 pNavi = new NavigationBar( Env(), Me() );
136 Write_NavBar();
137 Write_TopArea();
138 Write_DocuArea();
139 Write_ChildLists();
141 pNavi->Write_SubRows();
142 pNavi = 0;
145 void
146 PageMaker_Class::Write_NavBar()
148 NavigationBar aNavi( Env(), Me() );
149 pNavi->Write( CurOut() );
150 CurOut() << new HorizontalLine;
153 inline bool
154 IsInterface(const ary::doc::Documentation & i_doc)
156 const OldCppDocu *
157 doc = Get_CppDocu(i_doc);
158 return doc != 0
159 ? doc->IsInterface()
160 : false;
163 void
164 PageMaker_Class::Write_TopArea()
166 TemplateClause fTemplateClause;
167 PageTitle_Std fTitle;
169 Page().Write_NameChainWithLinks( Me() );
171 fTemplateClause( CurOut(), Me().TemplateParameters() );
172 fTitle( CurOut(), Get_ClassTypeKey(Me()), Me().LocalName() );
174 CurOut() << new HorizontalLine;
176 Write_BaseHierarchy();
177 Write_DerivedList();
179 CurOut() << new LineBreak;
181 adcdisp::FlagTable
182 aFlags( CurOut(), 4 );
183 aFlags.SetColumn( 0, "virtual",
184 Me().Virtuality() != ary::cpp::VIRTUAL_none );
185 aFlags.SetColumn( 1, "abstract",
186 Me().Virtuality() == ary::cpp::VIRTUAL_abstract );
187 aFlags.SetColumn( 2, "interface",
188 IsInterface(Me().Docu())
189 OR Me().Virtuality() == ary::cpp::VIRTUAL_abstract );
190 aFlags.SetColumn( 3, "template",
191 Me().TemplateParameters().size() > 0 );
194 void
195 PageMaker_Class::Write_DocuArea()
197 Docu_Display aDocuShow( Env() );
199 aDocuShow.Assign_Out(CurOut());
200 Me().Accept( aDocuShow );
201 aDocuShow.Unassign_Out();
203 ary::loc::File &
204 rFile = Env().Gate().Locations().Find_File( Me().Location() );
206 adcdisp::ExplanationList
207 aFileText( CurOut() );
208 aFileText.AddEntry("File");
209 aFileText.Def()
210 << rFile.LocalName();
212 CurOut() << new HorizontalLine;
215 void
216 PageMaker_Class::Write_ChildLists()
218 int i_max = 3 * cl_MAX;
219 for (int i = 0; i < i_max; i++)
221 bChildLists_Exist[i] = false;
222 } // end for
224 csi::html::DefListDefinition &
225 rPublic = Setup_MemberSegment_Out( mp_public );
226 csi::html::DefListDefinition &
227 rProtected = Setup_MemberSegment_Out( mp_protected );
228 csi::html::DefListDefinition &
229 rPrivate = Setup_MemberSegment_Out( mp_private );
231 Write_ChildList_forClasses( rPublic,
232 rProtected,
233 rPrivate,
234 C_sLabel_Classes,
235 C_sTitle_InnerClasses,
236 ary::cpp::CK_class );
237 Write_ChildList_forClasses( rPublic,
238 rProtected,
239 rPrivate,
240 C_sLabel_Structs,
241 C_sTitle_InnerStructs,
242 ary::cpp::CK_struct );
243 Write_ChildList_forClasses( rPublic,
244 rProtected,
245 rPrivate,
246 C_sLabel_Unions,
247 C_sTitle_InnerUnions,
248 ary::cpp::CK_union );
250 Write_ChildList( ary::cpp::Class::SLOT_Enums,
251 cl_Enums,
252 C_sLabel_Enums,
253 C_sTitle_Enums,
254 rPublic,
255 rProtected,
256 rPrivate );
257 Write_ChildList( ary::cpp::Class::SLOT_Typedefs,
258 cl_Typedefs,
259 C_sLabel_Typedefs,
260 C_sTitle_Typedefs,
261 rPublic,
262 rProtected,
263 rPrivate );
265 Write_ChildList( ary::cpp::Class::SLOT_Operations,
266 cl_Operations,
267 C_sLabel_Operations,
268 C_sTitle_Methods,
269 rPublic,
270 rProtected,
271 rPrivate );
272 Write_ChildList( ary::cpp::Class::SLOT_StaticOperations,
273 cl_StaticOperations,
274 C_sLabel_StaticOperations,
275 C_sTitle_StaticMethods,
276 rPublic,
277 rProtected,
278 rPrivate );
279 Write_ChildList( ary::cpp::Class::SLOT_Data,
280 cl_Data,
281 C_sLabel_Variables,
282 C_sTitle_Data,
283 rPublic,
284 rProtected,
285 rPrivate );
286 Write_ChildList( ary::cpp::Class::SLOT_StaticData,
287 cl_StaticData,
288 C_sLabel_StaticVariables,
289 C_sTitle_StaticData,
290 rPublic,
291 rProtected,
292 rPrivate );
294 Create_NaviSubRow(mp_public); // Also puts out or deletes pPublic.
295 Create_NaviSubRow(mp_protected); // Also puts out or deletes pProtected.
296 Create_NaviSubRow(mp_private); // Also puts out or deletes pPrivate.
299 void
300 PageMaker_Class::Write_ChildList( ary::SlotAccessId i_nSlot,
301 E_ChidList i_eChildListIndex,
302 const char * i_sLabel,
303 const char * i_sListTitle,
304 csi::xml::Element & o_rPublic,
305 csi::xml::Element & o_rProtected,
306 csi::xml::Element & o_rPrivate )
309 bool bPublic_ChildrenExist = false;
310 bool bProtected_ChildrenExist = false;
311 bool bPrivate_ChildrenExist = false;
313 ChildList_Display::Area_Result
314 aPublic_Result( bPublic_ChildrenExist, o_rPublic );
315 ChildList_Display::Area_Result
316 aProtected_Result( bProtected_ChildrenExist, o_rProtected );
317 ChildList_Display::Area_Result
318 aPrivate_Result( bPrivate_ChildrenExist, o_rPrivate );
320 String sLabelPublic = ChildListLabel(i_sLabel, mp_public);
321 String sLabelProtected = ChildListLabel(i_sLabel, mp_protected);
322 String sLabelPrivate = ChildListLabel(i_sLabel, mp_private);
324 pChildDisplay->Run_Members( aPublic_Result,
325 aProtected_Result,
326 aPrivate_Result,
327 i_nSlot,
328 sLabelPublic,
329 sLabelProtected,
330 sLabelPrivate,
331 i_sListTitle );
333 bChildLists_Exist[i_eChildListIndex]
334 = bPublic_ChildrenExist;
335 bChildLists_Exist[i_eChildListIndex + cl_MAX]
336 = bProtected_ChildrenExist;
337 bChildLists_Exist[i_eChildListIndex + 2*cl_MAX]
338 = bPrivate_ChildrenExist;
340 if (bPublic_ChildrenExist)
341 o_rPublic << new HorizontalLine;
342 if (bProtected_ChildrenExist)
343 o_rProtected << new HorizontalLine;
344 if (bPrivate_ChildrenExist)
345 o_rPrivate << new HorizontalLine;
348 void
349 PageMaker_Class::Write_ChildList_forClasses( csi::xml::Element & o_rPublic,
350 csi::xml::Element & o_rProtected,
351 csi::xml::Element & o_rPrivate,
352 const char * i_sLabel,
353 const char * i_sListTitle,
354 ary::cpp::E_ClassKey i_eFilter )
356 bool bPublic_ChildrenExist = false;
357 bool bProtected_ChildrenExist = false;
358 bool bPrivate_ChildrenExist = false;
360 ChildList_Display::Area_Result
361 aPublic_Result( bPublic_ChildrenExist, o_rPublic );
362 ChildList_Display::Area_Result
363 aProtected_Result( bProtected_ChildrenExist, o_rProtected );
364 ChildList_Display::Area_Result
365 aPrivate_Result( bPrivate_ChildrenExist, o_rPrivate );
367 String sLabelPublic = ChildListLabel(i_sLabel, mp_public);
368 String sLabelProtected = ChildListLabel(i_sLabel, mp_protected);
369 String sLabelPrivate = ChildListLabel(i_sLabel, mp_private);
371 pChildDisplay->Run_MemberClasses( aPublic_Result,
372 aProtected_Result,
373 aPrivate_Result,
374 ary::cpp::Class::SLOT_NestedClasses,
375 sLabelPublic,
376 sLabelProtected,
377 sLabelPrivate,
378 i_sListTitle,
379 i_eFilter );
381 bChildLists_Exist[int(cl_NestedClasses)+int(i_eFilter)]
382 = bPublic_ChildrenExist;
383 bChildLists_Exist[int(cl_NestedClasses)+int(i_eFilter) + cl_MAX]
384 = bProtected_ChildrenExist;
385 bChildLists_Exist[int(cl_NestedClasses)+int(i_eFilter) + 2*cl_MAX]
386 = bPrivate_ChildrenExist;
388 if (bPublic_ChildrenExist)
389 o_rPublic << new HorizontalLine;
390 if (bProtected_ChildrenExist)
391 o_rProtected << new HorizontalLine;
392 if (bPrivate_ChildrenExist)
393 o_rPrivate << new HorizontalLine;
396 const char *
397 PageMaker_Class::ChildListLabel( const char * i_sLabel, E_MemberProtection i_eMpr )
399 static char sResult[100];
400 strcpy( sResult, C_sMprPrefixes[i_eMpr] ); // SAFE STRCPY (#100211# - checked)
401 strcat( sResult, i_sLabel ); // SAFE STRCAT (#100211# - checked)
402 return sResult;
405 csi::html::DefListDefinition &
406 PageMaker_Class::Setup_MemberSegment_Out( E_MemberProtection i_eMpr )
408 html::DefList * pDefList = new html::DefList;
409 pProtectionArea[i_eMpr] = pDefList;
411 pDefList->AddTerm()
412 << new html::ClassAttr("subtitle")
413 >> *new html::Label( C_sMprPrefixes[i_eMpr] )
414 >> *new html::Headline(3)
415 << C_sMprTitles[i_eMpr];
416 return pDefList->AddDefinition();
419 void
420 PageMaker_Class::Create_NaviSubRow( E_MemberProtection i_eMpr )
422 int nIndexAdd = int(cl_MAX) * int(i_eMpr);
424 bool bEmpty = true;
425 for (int e = 0; e < cl_MAX; e++)
427 if ( bChildLists_Exist[e + nIndexAdd] )
429 bEmpty = false;
430 break;
432 } // end for
433 if (bEmpty)
435 pProtectionArea[i_eMpr] = 0;
436 return;
438 else //
440 CurOut() << pProtectionArea[i_eMpr].Release();
441 } // endif
443 pNavi->MakeSubRow( C_sMprSummaryTitles[i_eMpr] );
444 for (int i = 0; i < cl_MAX; i++)
446 pNavi->AddItem( C_sSummaryItems_Titles[i],
447 ChildListLabel( C_sSummaryItems_Labels[i], i_eMpr ),
448 bChildLists_Exist[i+nIndexAdd] );
449 } // end for
452 void
453 PageMaker_Class::Write_DerivedList()
455 adcdisp::ExplanationList
456 aDeriveds( CurOut() );
457 aDeriveds.AddEntry( "Known Derived Classes" );
459 if ( Me().KnownDerivatives().Size() == 0 )
461 aDeriveds.Def() << "None.";
462 return;
465 typedef ary::List_Rid RidList;
467 CesConstIterator
468 itEnd = Me().KnownDerivatives().End();
469 for ( CesConstIterator it = Me().KnownDerivatives().Begin();
470 it != itEnd;
471 ++it )
473 const ary::cpp::CodeEntity &
474 rCe = Env().Gate().Ces().Find_Ce(*it);
476 aDeriveds.Def()
477 >> *new html::Link( Link2Ce(Env(),rCe) )
478 << rCe.LocalName();
479 aDeriveds.Def()
480 << new html::LineBreak;
481 } // end for
485 // ============== Creating a classes base hierarchy ====================== //
488 namespace
491 class Node
493 public:
494 Node(
495 const ary::cpp::Class &
496 i_rClass,
497 ary::cpp::Type_id i_nClassType,
498 const ary::cpp::Gate &
499 i_rGate,
500 intt i_nPositionOffset,
501 Node * io_pDerived = 0,
502 ary::cpp::E_Protection
503 i_eProtection = ary::cpp::PROTECT_global,
504 bool i_bVirtual = false );
505 ~Node();
507 void FillPositionList(
508 std::vector< const Node* > &
509 o_rPositionList ) const;
510 void Write2(
511 csi::xml::Element & o_rOut,
512 const OuputPage_Environment &
513 i_rEnv ) const;
515 intt BaseCount() const { return nCountBases; }
516 intt Position() const { return nPosition; }
517 int Xpos() const { return 3*Position(); }
518 int Ypos() const { return 2*Position(); }
519 const Node * Derived() const { return pDerived; }
521 private:
522 typedef std::vector< DYN Node* > BaseList;
524 void IncrBaseCount();
526 // DATA
527 BaseList aBases;
528 intt nCountBases;
529 Node * pDerived;
531 String sName;
532 const ary::cpp::Class *
533 pClass;
534 ary::cpp::Type_id nClassType;
535 ary::cpp::E_Protection
536 eProtection;
537 bool bVirtual;
539 intt nPosition;
542 void WriteNodeHierarchy(
543 csi::xml::Element & o_rOut,
544 const OuputPage_Environment &
545 i_rEnv,
546 const Node & i_rClass );
548 const ary::cpp::Class *
549 HereFind_Class(
550 const ary::cpp::Gate &
551 i_rGate,
552 ary::cpp::Type_id i_nReferingTypeId );
554 } // anonymous namespace
556 void
557 PageMaker_Class::Write_BaseHierarchy()
559 adcdisp::ExplanationList aBases( CurOut() );
560 aBases.AddEntry( "Base Classes" );
562 if ( Me().BaseClasses().size() == 0 )
564 aBases.Def() << "None.";
566 else
568 Dyn< Node >
569 pBaseGraph( new Node(Me(), ary::cpp::Type_id(0), Env().Gate(), 0) );
570 WriteNodeHierarchy( aBases.Def(), Env(), *pBaseGraph );
576 namespace
579 void
580 WriteNodeHierarchy( csi::xml::Element & o_rOut,
581 const OuputPage_Environment & i_rEnv,
582 const Node & i_rClass )
584 typedef const Node * NodePtr;
585 typedef std::vector<NodePtr> NodeList;
587 NodeList aPositionList;
588 intt nSize = i_rClass.Position()+1;
589 aPositionList.reserve(nSize);
590 i_rClass.FillPositionList( aPositionList );
592 xml::Element &
593 rPre = o_rOut
594 >> *new xml::AnElement("pre")
595 << new html::StyleAttr("font-family:monospace;");
597 for ( int line = 0; line < nSize; ++line )
599 char * sLine1 = new char[2 + line*5];
600 char * sLine2 = new char[1 + line*5];
601 *sLine1 = '\0';
602 *sLine2 = '\0';
604 bool bBaseForThisLineReached = false;
605 for ( int col = 0; col < line; ++col )
607 intt nDerivPos = aPositionList[col]->Derived()->Position();
609 if ( nDerivPos >= line )
610 strcat(sLine1, " | ");
611 else
612 strcat(sLine1, " ");
614 if ( nDerivPos > line )
616 strcat(sLine2, " | ");
618 else if ( nDerivPos == line )
620 if (bBaseForThisLineReached)
621 strcat(sLine2, "--+--");
622 else
624 bBaseForThisLineReached = true;
625 strcat(sLine2, " +--");
628 else // nDerivPos < line
630 if (bBaseForThisLineReached)
631 strcat(sLine2, "-----");
632 else
633 strcat(sLine2, " ");
635 } // end for (col)
636 strcat(sLine1,"\n");
637 rPre
638 << sLine1
639 << sLine2;
640 delete [] sLine1;
641 delete [] sLine2;
643 aPositionList[line]->Write2( rPre, i_rEnv );
644 rPre << "\n";
645 } // end for (line)
648 const ary::cpp::Class *
649 HereFind_Class( const ary::cpp::Gate & i_rGate,
650 ary::cpp::Type_id i_nReferingTypeId )
652 const ary::cpp::CodeEntity *
653 pCe = i_rGate.Search_RelatedCe( i_nReferingTypeId );
655 if ( pCe != 0 )
657 if ( ary::is_type<ary::cpp::Class>(*pCe) )
659 return ary::ary_cast<ary::cpp::Class>(pCe);
661 else if ( ary::is_type<ary::cpp::Typedef>(*pCe) )
663 const ary::cpp::Typedef *
664 pTydef = ary::ary_cast<ary::cpp::Typedef>(pCe);
665 return HereFind_Class( i_rGate, pTydef->DescribingType() );
669 static const ary::cpp::Class aClassNull_( "Base class not found",
670 ary::cpp::Ce_id(0),
671 ary::cpp::PROTECT_global,
672 ary::loc::Le_id(0),
673 ary::cpp::CK_class );
674 return &aClassNull_;
679 //********************* Node ***********************//
681 Node::Node( const ary::cpp::Class & i_rClass,
682 ary::cpp::Type_id i_nClassType,
683 const ary::cpp::Gate & i_rGate,
684 intt i_nPositionOffset,
685 Node * io_pDerived,
686 ary::cpp::E_Protection i_eProtection,
687 bool i_bVirtual )
688 : aBases(),
689 nCountBases(0),
690 pDerived(io_pDerived),
691 pClass(&i_rClass),
692 nClassType(i_nClassType),
693 eProtection(i_eProtection),
694 bVirtual(i_bVirtual),
695 nPosition(i_nPositionOffset)
697 typedef ary::cpp::List_Bases BList;
699 for ( BList::const_iterator it = i_rClass.BaseClasses().begin();
700 it != i_rClass.BaseClasses().end();
701 ++it )
703 const ary::cpp::Class *
704 pBaseClass = HereFind_Class( i_rGate, (*it).nId );
706 Dyn<Node>
707 pBase( new Node(*pBaseClass,
708 (*it).nId,
709 i_rGate,
710 nPosition,
711 this,
712 (*it).eProtection,
713 (*it).eVirtuality == ary::cpp::VIRTUAL_virtual)
715 IncrBaseCount();
716 nPosition += pBase->BaseCount() + 1;
717 aBases.push_back( pBase.Release() );
718 } // end for
721 Node::~Node()
725 void
726 Node::FillPositionList( std::vector< const Node* > & o_rPositionList ) const
728 for ( BaseList::const_iterator it = aBases.begin();
729 it != aBases.end();
730 ++it )
732 (*it)->FillPositionList(o_rPositionList);
733 } // end for
735 if( o_rPositionList.size() != uintt(Position()) )
737 csv_assert(false);
739 o_rPositionList.push_back(this);
742 void
743 Node::Write2( csi::xml::Element & o_rOut,
744 const OuputPage_Environment & i_rEnv ) const
746 if ( Derived() == 0 )
748 o_rOut
749 >> *new xml::AnElement("span")
750 << new html::ClassAttr("btself")
751 << pClass->LocalName();
752 return;
755 csi::xml::Element *
756 pOut = & ( o_rOut >> *new xml::AnElement("span") );
757 switch ( eProtection )
759 case ary::cpp::PROTECT_public:
760 if (bVirtual)
761 *pOut << new html::ClassAttr("btvpubl");
762 else
763 *pOut << new html::ClassAttr("btpubl");
764 break;
765 case ary::cpp::PROTECT_protected:
766 if (bVirtual)
767 *pOut << new html::ClassAttr("btvprot");
768 else
769 *pOut << new html::ClassAttr("btprot");
770 break;
771 case ary::cpp::PROTECT_private:
772 if (bVirtual)
773 *pOut << new html::ClassAttr("btvpriv");
774 else
775 *pOut << new html::ClassAttr("btpriv");
776 break;
777 default: // do nothing.
779 } // end switch
781 csi::xml::Element & rOut = *pOut;
783 Get_LinkedTypeText( rOut, i_rEnv, nClassType, false );
784 rOut << " (";
785 if ( bVirtual )
786 rOut << "virtual ";
787 switch ( eProtection )
789 case ary::cpp::PROTECT_public:
790 rOut << "public)";
791 break;
792 case ary::cpp::PROTECT_protected:
793 rOut << "protected)";
794 break;
795 case ary::cpp::PROTECT_private:
796 rOut << "private)";
797 break;
798 default: // do nothing.
800 } // end switch
803 void
804 Node::IncrBaseCount()
806 ++nCountBases;
807 if (pDerived != 0)
808 pDerived->IncrBaseCount();
812 } // anonymous namespace