Defined in file: hzNamering.h

A name-ring is a set of one or more name-groups, each of which is considered as set of alternative spellings of the same basic 'root' name. For example, the name 'Steven' which can be spelt as 'Steven' or 'Stephen', will form a name group with a root of Steven and two members, Steven and Stephen. Such an arrangement can serve as a useful aide to search facilities. The hzNamering class impliments a name-ring as a pair of many-to-one maps. The first maps names to name groups while the second does the reverse. Since this would not ensure uniqueness among name groups, a set is added to ensure no two groups have the same root name.

This class employes the private sub-class _name_ring as follows:-

_name_ring

Constructors/Detructors

hzNamering*hzNamering(void)
hzNamering*hzNamering(hzNamering& op)
NULL-TYPEhzNamering(void)Default constructor with optional bool arg for locking. Creates a new name-ring and sets the maps compare functions to operate as case insensitive.
NULL-TYPEhzNamering(hzNamering& op)Copy constructor. Note that while this will create a new instance of hzNamering, the internal component is not copied.
void~hzNamering(void)
NULL-TYPE~hzNamering(void)Delete the hzNamering instance. If the internal component is pointed to by another hzNamering then this is not deleted.

Public Methods:

hzEcodeAddMember(hzString& root)hzString& member, Add a member to the group with the given root name
hzEcodeAddRoot(hzString& root)Insert a new element with a key or update an existing element that matches the key. If root exists, reject
voidClear(void)Clear the name-ring of all keys and elements Arguments: None Returns: None
uint32_tCountRoot(void)
hzEcodeDelMember(hzString& root)Delete from m_Roots only (not implimented)
hzEcodeDelRoot(hzString& root)Delete from m_Root then delete all references to it from m_Roots (not implimented)
uint32_tMemberLocate(hzVect<hzString>& results)hzString& root, Locate all members of a supplied root.
voidReport(ofstream& os)Provide a namering summary report to a file stream Returns: None
voidReport(hzLogger* plog)Provide a namering summary report to a logfile Returns: None
uint32_tRootIncidence(hzString& member)Perform a lookup for a string assumed to be a member of one or more groups.
hzStringRootLocate(hzString& member)Perform a lookup for a string assumed to be a member of one or more groups and stop at the first group the member fits.
uint32_tRootLocate(hzVect<hzString>& results)hzString& member, Locate all possible roots for a given member and place the root name for each in the supplied results vector.
hzStringRootLocate(uint32_t nPos)Locate the Nth root of the name-ring
hzEcodeUseLocking(const char* name)
hzEcodeUseLocking(hzString& name)

Overloaded operators:

hzNamering&operator=(hzNamering& op)Make this namering equal the operand namering

Member Variables:

hzNamering::_name_ring*mxInternal instance