stringTable
Section: OATH Reference Manual (3O)
Updated: 26 August 1991
Index
Return to Main Contents
NAME
stringTable (stringTableA, stringTableG) - a table of stringTokens and associated objs
SYNOPSIS
#include <oath/stringTable.h>
DESCRIPTION
The stringTable is a collection of stringTokens and associated objs.
StringTokens can be inserted into a stringTable but are not necessarily
maintained in any order. An obj can be optionally associated with
each stringToken inserted. When a stringToken is inserted, the count()
will increase by one. If a stringToken is inserted more than once,
assoc() will access the object associated with the most recent insertion
and extract() and remove() will remove the most recent insertion.
To prevent multiple stringTable lookups when creating a stringToken from
a string or sub-string, stringTable provides lookup() which takes a
string or two stringPos's and searches for such an entry in the table.
This class is intended to be a fast-as-possible implementation type and was
not intended to be derived from as most OATH abstract types are. BEWARE!
DERIVATION
stringTable : table : bag : obj
stringTable is an abstract, leaf implementation type.
STATIC OPERATIONS
- stringTableA stringTableA:: isa (objA)
-
stringTableA::isa(O) returns O if it is truly a stringTable; otherwise it
returns Nil.
- stringTableA stringTableA:: make (int = 255, int = FALSE)
-
stringTableA::make() makes and returns an empty stringTable. The optional
first argument is the number of buckets to use in the hash table. If the
optional second argument is TRUE, then the new stringTable will be const.
MEMBER OPERATIONS
- stringTokenA stringTableA:: lookup (stringA)
-
T.lookup(S) returns the stringToken in table T that corresponds to string S.
- stringTokenA stringTableA:: lookup (const char*)
-
T.lookup(S) returns the stringToken in table T that corresponds to string S.
- stringTokenA stringTableA:: lookup (stringPosA, stringPosA)
-
T.lookup(Start, Beyond) returns the stringToken in table T that corresponds
to characters between pos's Start and Beyond.
- stringTokenA stringTableA:: lookup (int, stringA)
-
T.lookup(Upper, S) is the same as T.lookup(S), except that if Upper is TRUE,
then all lowercase characters in S are treated as uppercase, otherwise all
uppercase characters in S are treated as lowercase.
- stringTokenA stringTableA:: lookup (int, const char*)
-
T.lookup(Upper, S) is the same as T.lookup(S), except that if Upper is TRUE,
then all lowercase characters in S are treated as uppercase, otherwise all
uppercase characters in S are treated as lowercase.
- stringTokenA stringTableA:: lookup (int, stringPosA, stringPosA)
-
T.lookup(Upper, Start, Beyond) is the same as T.lookup(Start, Beyond), except
that if Upper is TRUE, then all lowercase characters in S are treated as
uppercase, otherwise all uppercase characters in S are treated as lowercase.
INTERNAL OPERATIONS
- const stringTokenG* stringTableG:: lookup (const stringG*) const
-
- const stringTokenG* stringTableG:: lookup (const char*) const
-
- const stringTokenG* stringTableG:: lookup (const stringPosG*, const stringPosG*) const
-
- const stringTokenG* stringTableG:: lookup (int, const stringG*) const
-
- const stringTokenG* stringTableG:: lookup (int, const char*) const
-
- const stringTokenG* stringTableG:: lookup (int, const stringPosG*, const stringPosG*) const
-
SEE ALSO
OATH(3O), table(3O), string(3O), stringToken(3O)
AUTHOR
Brian M. Kennedy (Computer Science Center, Texas Instruments Incorporated)
BUGS
The virtual function isEqual() is currently not implemented.
Index
- NAME
-
- SYNOPSIS
-
- DESCRIPTION
-
- DERIVATION
-
- STATIC OPERATIONS
-
- MEMBER OPERATIONS
-
- INTERNAL OPERATIONS
-
- SEE ALSO
-
- AUTHOR
-
- BUGS
-
This document was created by
man2html,
using the manual pages.
Time: 20:37:46 GMT, July 24, 2024