tStringToULong Reference

tStringToULong Reference Members Hierarchy

class EXT_CLASS tStringToULong : public tBalTree

tStringToULong implements maps having string keys and unsigned long data.

Before deriving a class from tStringToULong, it is highly recommended that you read the tBalTree reference material and the Deriving Specialized Classes section.

Public Interface

Construction/Destruction

tStringToULong provides a default constructor, and a virtual destructor.

(public) POSITION Find(const char* key);

Given a key in the form of a string, the Find() member returns a POSITION variable describing the node having that key. If there is not such a node, the result is zero.

(public) unsigned long Get(const char* key);

Given a key in the form of a string, the Get() member returns the associated data. If no data is associated with the key specified, the result is zero.

(public) unsigned long GetData(POSITION node);

Given the POSITION of a specific node, the GetData() member returns that node's data. If the node is zero, the result is zero.

(public) const char* GetKey(POSITION node);

Given the POSITION of a specific node, the GetKey() member returns that node's key pointer. If the node is zero, the result is zero.

(public) int Remove(const char* key);

(public) int Remove(POSITION& node);

The Remove() member removes the node associated with the specified key or node POSITION. If there is no node having the specified key, or if the node is zero, the result is zero. Note that the POSITION reference is zeroed by Remove() to invalidate it, since the node no longer exists.

(public) int Set(const char* key, unsigned long data);

The Set() member sets the data associated with the given string key to the unsigned long data that is passed.

(public) int SetData(POSITION node, unsigned long data);

The SetData() member updates the data associated with the node whose POSITION is passed.