Public Member Functions | Public Attributes | List of all members
FTVNode Struct Reference

Public Member Functions

 FTVNode (bool dir, const char *r, const char *f, const char *a, const char *n, bool sepIndex, bool navIndex, Definition *df)
 
int computeTreeDepth (int level) const
 
int numNodesAtLevel (int level, int maxLevel) const
 

Public Attributes

bool isLast
 
bool isDir
 
QCString ref
 
QCString file
 
QCString anchor
 
QCString name
 
int index
 
QList< FTVNodechildren
 
FTVNodeparent
 
bool separateIndex
 
bool addToNavIndex
 
Definitiondef
 

Detailed Description

Definition at line 45 of file ftvhelp.cpp.

Constructor & Destructor Documentation

FTVNode::FTVNode ( bool  dir,
const char *  r,
const char *  f,
const char *  a,
const char *  n,
bool  sepIndex,
bool  navIndex,
Definition df 
)
inline

Definition at line 47 of file ftvhelp.cpp.

49  : isLast(TRUE), isDir(dir),ref(r),file(f),anchor(a),name(n), index(0),
50  parent(0), separateIndex(sepIndex), addToNavIndex(navIndex),
51  def(df) { children.setAutoDelete(TRUE); }
Definition * def
Definition: ftvhelp.cpp:65
bool isDir
Definition: ftvhelp.cpp:55
bool addToNavIndex
Definition: ftvhelp.cpp:64
string dir
QCString file
Definition: ftvhelp.cpp:57
QList< FTVNode > children
Definition: ftvhelp.cpp:61
std::void_t< T > n
const double a
int index
Definition: ftvhelp.cpp:60
QCString ref
Definition: ftvhelp.cpp:56
QCString anchor
Definition: ftvhelp.cpp:58
FTVNode * parent
Definition: ftvhelp.cpp:62
bool isLast
Definition: ftvhelp.cpp:54
QCString name
Definition: ftvhelp.cpp:59
void setAutoDelete(bool enable)
Definition: qlist.h:99
const bool TRUE
Definition: qglobal.h:371
bool separateIndex
Definition: ftvhelp.cpp:63

Member Function Documentation

int FTVNode::computeTreeDepth ( int  level) const

Definition at line 68 of file ftvhelp.cpp.

69 {
70  int maxDepth=level;
72  FTVNode *n;
73  for (;(n=li.current());++li)
74  {
75  if (n->children.count()>0)
76  {
77  int d = n->computeTreeDepth(level+1);
78  if (d>maxDepth) maxDepth=d;
79  }
80  }
81  return maxDepth;
82 }
int computeTreeDepth(int level) const
Definition: ftvhelp.cpp:68
uint count() const
Definition: qlist.h:66
QList< FTVNode > children
Definition: ftvhelp.cpp:61
std::void_t< T > n
int FTVNode::numNodesAtLevel ( int  level,
int  maxLevel 
) const

Definition at line 84 of file ftvhelp.cpp.

85 {
86  int num=0;
87  if (level<maxLevel)
88  {
89  num++; // this node
91  FTVNode *n;
92  for (;(n=li.current());++li)
93  {
94  num+=n->numNodesAtLevel(level+1,maxLevel);
95  }
96  }
97  return num;
98 }
int numNodesAtLevel(int level, int maxLevel) const
Definition: ftvhelp.cpp:84
QList< FTVNode > children
Definition: ftvhelp.cpp:61
std::void_t< T > n

Member Data Documentation

bool FTVNode::addToNavIndex

Definition at line 64 of file ftvhelp.cpp.

QCString FTVNode::anchor

Definition at line 58 of file ftvhelp.cpp.

QList<FTVNode> FTVNode::children

Definition at line 61 of file ftvhelp.cpp.

Definition* FTVNode::def

Definition at line 65 of file ftvhelp.cpp.

QCString FTVNode::file

Definition at line 57 of file ftvhelp.cpp.

int FTVNode::index

Definition at line 60 of file ftvhelp.cpp.

bool FTVNode::isDir

Definition at line 55 of file ftvhelp.cpp.

bool FTVNode::isLast

Definition at line 54 of file ftvhelp.cpp.

QCString FTVNode::name

Definition at line 59 of file ftvhelp.cpp.

FTVNode* FTVNode::parent

Definition at line 62 of file ftvhelp.cpp.

QCString FTVNode::ref

Definition at line 56 of file ftvhelp.cpp.

bool FTVNode::separateIndex

Definition at line 63 of file ftvhelp.cpp.


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