Word Locator
 All Classes Files Functions Variables Typedefs
Public Member Functions | Public Attributes | List of all members
TreeNode Class Reference

TreeNode with word and pos[]. More...

#include <wl.h>

Public Member Functions

 TreeNode (wpp_t newword)
 Constructor of TreeNode. More...
 
 ~TreeNode ()
 Destructor of TreeNode. More...
 

Public Attributes

char color
 
string word
 
ArrayListposs
 
TreeNodeleft
 
TreeNoderight
 
TreeNodeparent
 

Detailed Description

TreeNode with word and pos[].

This is node in the Red-Black Tree. It stores a string type word and ArrayList type integer list.

Constructor & Destructor Documentation

TreeNode::TreeNode ( wpp_t  newword)

Constructor of TreeNode.

Set the color as red. Create ArrayList poss and save the first occurance. Set the word as the incoming word.

Parameters
newword- wpp_t type word-pos pair
TreeNode::~TreeNode ( )

Destructor of TreeNode.

free the ArrayList poss

Member Data Documentation

char TreeNode::color

color of this node

TreeNode* TreeNode::left

Left child of this node

TreeNode* TreeNode::parent

parent node of this node

ArrayList* TreeNode::poss

ArrayList of occurence position

TreeNode* TreeNode::right

Right child of this node

string TreeNode::word

word in this node


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