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 51 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 53 of file ftvhelp.cpp.

56 : isLast(true), isDir(dir), ref(r), file(f), anchor(a), name(n), nameAsHtml(nameAsHtml_),
57 separateIndex(sepIndex), addToNavIndex(navIndex), def(df) {}
DString name
Definition ftvhelp.cpp:65
bool separateIndex
Definition ftvhelp.cpp:70
bool isLast
Definition ftvhelp.cpp:60
DString nameAsHtml
Definition ftvhelp.cpp:66
const Definition * def
Definition ftvhelp.cpp:72
bool addToNavIndex
Definition ftvhelp.cpp:71
DString file
Definition ftvhelp.cpp:63
bool isDir
Definition ftvhelp.cpp:61
DString ref
Definition ftvhelp.cpp:62
DString anchor
Definition ftvhelp.cpp:64

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 75 of file ftvhelp.cpp.

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

References children.

◆ numNodesAtLevel()

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

Definition at line 89 of file ftvhelp.cpp.

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

References children.

Member Data Documentation

◆ addToNavIndex

bool FTVNode::addToNavIndex

Definition at line 71 of file ftvhelp.cpp.

Referenced by FTVNode().

◆ anchor

DString FTVNode::anchor

Definition at line 64 of file ftvhelp.cpp.

Referenced by FTVNode().

◆ children

FTVNodes FTVNode::children

Definition at line 68 of file ftvhelp.cpp.

Referenced by computeTreeDepth(), and numNodesAtLevel().

◆ def

const Definition* FTVNode::def

Definition at line 72 of file ftvhelp.cpp.

Referenced by FTVNode().

◆ file

DString FTVNode::file

Definition at line 63 of file ftvhelp.cpp.

Referenced by FTVNode().

◆ index

int FTVNode::index = 0

Definition at line 67 of file ftvhelp.cpp.

◆ isDir

bool FTVNode::isDir

Definition at line 61 of file ftvhelp.cpp.

Referenced by FTVNode().

◆ isLast

bool FTVNode::isLast

Definition at line 60 of file ftvhelp.cpp.

Referenced by FTVNode().

◆ name

DString FTVNode::name

Definition at line 65 of file ftvhelp.cpp.

Referenced by FTVNode().

◆ nameAsHtml

DString FTVNode::nameAsHtml

Definition at line 66 of file ftvhelp.cpp.

Referenced by FTVNode().

◆ parent

FTVNodeWeakPtr FTVNode::parent

Definition at line 69 of file ftvhelp.cpp.

◆ ref

DString FTVNode::ref

Definition at line 62 of file ftvhelp.cpp.

Referenced by FTVNode().

◆ separateIndex

bool FTVNode::separateIndex

Definition at line 70 of file ftvhelp.cpp.

Referenced by FTVNode().


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