My Project
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Public Member Functions | Private Attributes | List of all members
DiagramRow Class Reference
Inheritance diagram for DiagramRow:

Public Member Functions

 DiagramRow (TreeDiagram *d, int l)
 
void insertClass (DiagramItem *parent, ClassDef *cd, bool doBases, Protection prot, Specifier virt, const char *ts)
 
uint number ()
 

Private Attributes

TreeDiagramdiagram
 
uint level
 

Detailed Description

Class representing a row in the built-in class diagram

Definition at line 85 of file diagram.cpp.

Constructor & Destructor Documentation

DiagramRow::DiagramRow ( TreeDiagram d,
int  l 
)
inline

Definition at line 88 of file diagram.cpp.

References diagram, and level.

Referenced by insertClass().

: QList<DiagramItem>()
{
diagram=d;
level=l;
setAutoDelete(TRUE);
}

Member Function Documentation

void DiagramRow::insertClass ( DiagramItem parent,
ClassDef cd,
bool  doBases,
Protection  prot,
Specifier  virt,
const char *  ts 
)

Definition at line 357 of file diagram.cpp.

References DiagramItem::addChild(), ClassDef::baseClasses(), BaseClassDef::classDef, diagram, DiagramRow(), gridHeight, gridWidth, insertClass(), ClassDef::isVisibleInHierarchy(), level, DiagramItem::move(), Normal, Private, BaseClassDef::prot, ClassDef::subClasses(), BaseClassDef::templSpecifiers, and BaseClassDef::virt.

Referenced by insertClass(), and TreeDiagram::TreeDiagram().

{
//if (cd->visited) return; // the visit check does not work in case of
// multiple inheritance of the same class!
DiagramItem *di=new DiagramItem(parent, diagram->at(level)->count(),
cd,prot,virt,ts);
//cd->visited=TRUE;
if (parent) parent->addChild(di);
append(di);
BaseClassList *bcl=doBases ? cd->baseClasses() : cd->subClasses();
int count=0;
if (bcl)
{
/* there are base/sub classes */
for (;(bcd=it.current());++it)
{
ClassDef *ccd=bcd->classDef;
if (ccd && ccd->isVisibleInHierarchy() /*&& !ccd->visited*/) count++;
}
}
if (count>0 && (prot!=Private || !doBases))
{
DiagramRow *row=0;
if (diagram->count()<=level+1) /* add new row */
{
row = new DiagramRow(diagram,level+1);
diagram->append(row);
}
else /* get next row */
{
row=diagram->at(level+1);
}
/* insert base classes in the next row */
for (;(bcd=it.current());++it)
{
ClassDef *ccd=bcd->classDef;
if (ccd && ccd->isVisibleInHierarchy() /*&& !ccd->visited*/)
{
row->insertClass(di,ccd,doBases,bcd->prot,
doBases?bcd->virt:Normal,
doBases?bcd->templSpecifiers.data():"");
}
}
}
}
uint DiagramRow::number ( )
inline

Definition at line 96 of file diagram.cpp.

References level.

{ return level; }

Member Data Documentation

TreeDiagram* DiagramRow::diagram
private

Definition at line 98 of file diagram.cpp.

Referenced by DiagramRow(), and insertClass().

uint DiagramRow::level
private

Definition at line 99 of file diagram.cpp.

Referenced by DiagramRow(), insertClass(), and number().


The documentation for this class was generated from the following file: