Doxygen
Loading...
Searching...
No Matches
FTVNode Struct Reference
Collaboration diagram for FTVNode:

Public Member Functions

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

Public Attributes

bool isLast
bool isDir
DString ref
DString file
DString anchor
DString name
DString nameAsHtml
int index = 0
FTVNodes children
FTVNodeWeakPtr parent
bool separateIndex
bool addToNavIndex
const Definitiondef

Detailed Description

Definition at line 54 of file ftvhelp.cpp.

Constructor & Destructor Documentation

◆ FTVNode()

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

Definition at line 56 of file ftvhelp.cpp.

59 : isLast(true), isDir(dir), ref(r), file(f), anchor(a), name(n), nameAsHtml(nameAsHtml_),
60 separateIndex(sepIndex), addToNavIndex(navIndex), def(df) {}
DString name
Definition ftvhelp.cpp:68
bool separateIndex
Definition ftvhelp.cpp:73
bool isLast
Definition ftvhelp.cpp:63
DString nameAsHtml
Definition ftvhelp.cpp:69
const Definition * def
Definition ftvhelp.cpp:75
bool addToNavIndex
Definition ftvhelp.cpp:74
DString file
Definition ftvhelp.cpp:66
bool isDir
Definition ftvhelp.cpp:64
DString ref
Definition ftvhelp.cpp:65
DString anchor
Definition ftvhelp.cpp:67

References addToNavIndex, anchor, def, file, isDir, isLast, name, nameAsHtml, ref, and separateIndex.

Member Function Documentation

◆ computeTreeDepth()

int FTVNode::computeTreeDepth ( int level) const

Definition at line 78 of file ftvhelp.cpp.

79{
80 int maxDepth=level;
81 for (const auto &n : children)
82 {
83 if (!n->children.empty())
84 {
85 int d = n->computeTreeDepth(level+1);
86 if (d>maxDepth) maxDepth=d;
87 }
88 }
89 return maxDepth;
90}
FTVNodes children
Definition ftvhelp.cpp:71

References children.

◆ numNodesAtLevel()

int FTVNode::numNodesAtLevel ( int level,
int maxLevel ) const

Definition at line 92 of file ftvhelp.cpp.

93{
94 int num=0;
95 if (level<maxLevel)
96 {
97 num++; // this node
98 for (const auto &n : children)
99 {
100 num+=n->numNodesAtLevel(level+1,maxLevel);
101 }
102 }
103 return num;
104}

References children.

Member Data Documentation

◆ addToNavIndex

bool FTVNode::addToNavIndex

Definition at line 74 of file ftvhelp.cpp.

Referenced by FTVNode().

◆ anchor

DString FTVNode::anchor

Definition at line 67 of file ftvhelp.cpp.

Referenced by FTVNode().

◆ children

FTVNodes FTVNode::children

Definition at line 71 of file ftvhelp.cpp.

Referenced by computeTreeDepth(), and numNodesAtLevel().

◆ def

const Definition* FTVNode::def

Definition at line 75 of file ftvhelp.cpp.

Referenced by FTVNode().

◆ file

DString FTVNode::file

Definition at line 66 of file ftvhelp.cpp.

Referenced by FTVNode().

◆ index

int FTVNode::index = 0

Definition at line 70 of file ftvhelp.cpp.

◆ isDir

bool FTVNode::isDir

Definition at line 64 of file ftvhelp.cpp.

Referenced by FTVNode().

◆ isLast

bool FTVNode::isLast

Definition at line 63 of file ftvhelp.cpp.

Referenced by FTVNode().

◆ name

DString FTVNode::name

Definition at line 68 of file ftvhelp.cpp.

Referenced by FTVNode().

◆ nameAsHtml

DString FTVNode::nameAsHtml

Definition at line 69 of file ftvhelp.cpp.

Referenced by FTVNode().

◆ parent

FTVNodeWeakPtr FTVNode::parent

Definition at line 72 of file ftvhelp.cpp.

◆ ref

DString FTVNode::ref

Definition at line 65 of file ftvhelp.cpp.

Referenced by FTVNode().

◆ separateIndex

bool FTVNode::separateIndex

Definition at line 73 of file ftvhelp.cpp.

Referenced by FTVNode().


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