Code::Blocks  SVN r11506
Public Member Functions | Public Attributes | List of all members
SearchTreePoint Class Reference

This class is used to access items of the tree, each node may contains a lot of items, E.g. More...

#include <searchtree.h>

Collaboration diagram for SearchTreePoint:

Public Member Functions

 SearchTreePoint ()
 At what depth is the string's end located? More...
 
 SearchTreePoint (nSearchTreeNode nn, size_t dd)
 

Public Attributes

nSearchTreeNode n
 
size_t depth
 Which node are we pointing to? More...
 

Detailed Description

This class is used to access items of the tree, each node may contains a lot of items, E.g.

- "" (0)
\- "p" (4)
+- "hysi" (2)
| +- "cs" (1)
| \- "ology" (3)
\- "sychic" (5)

In the above tree, we have totally 6 nodes, each node can have an items map such as the node (2), we may have a item map with up to 4 elements

depth -> string
2 -> "ph"
3 -> "phy"
4 -> "phys"
5 -> "physi"

the value of the item map is not the string, but an size_t value (item number) To access one item, we can use a SearchTreePoint,

See also
SearchTreePoint Now, if you have a SearchTreePoint(n=2, depth=2), you can get the string "ph" and its item number

Definition at line 127 of file searchtree.h.

Constructor & Destructor Documentation

◆ SearchTreePoint() [1/2]

SearchTreePoint::SearchTreePoint ( )
inline

At what depth is the string's end located?

Definition at line 132 of file searchtree.h.

◆ SearchTreePoint() [2/2]

SearchTreePoint::SearchTreePoint ( nSearchTreeNode  nn,
size_t  dd 
)
inline

Definition at line 133 of file searchtree.h.

Member Data Documentation

◆ depth

size_t SearchTreePoint::depth

◆ n

nSearchTreeNode SearchTreePoint::n

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