F_NameTable Class Reference

Class for mapping names to IDs and vice versa. Methods in this class allow an application to get the dictionary number for a field, index, or container using the field name, index name, or container name. It also allows an application to to get a field name, index name, or field name using the dictionary number. More...

#include <flaim.h>

List of all members.

Public Member Functions

void clearTable (void)
 Clear the name table.
RCODE setupFromDb (HFDB hDb)
 Populate a name table from the dictionary of the specified database.
FLMBOOL getNextTagNumOrder (FLMUINT *puiNextPos, FLMUNICODE *puzTagName, char *pszTagName, FLMUINT uiNameBufSize, FLMUINT *puiTagNum=NULL, FLMUINT *puiType=NULL, FLMUINT *puiSubType=NULL)
 Get the next item from the the table in dictionary number order.
FLMBOOL getNextTagNameOrder (FLMUINT *puiNextPos, FLMUNICODE *puzTagName, char *pszTagName, FLMUINT uiNameBufSize, FLMUINT *puiTagNum=NULL, FLMUINT *puiType=NULL, FLMUINT *puiSubType=NULL)
 Get the next item from the the table in name order.
FLMBOOL getFromTagType (FLMUINT uiType, FLMUINT *puiNextPos, FLMUNICODE *puzTagName, char *pszTagName, FLMUINT uiNameBufSize, FLMUINT *puiTagNum=NULL, FLMUINT *puiSubType=NULL)
 Get the next item from the the table of the specified type.
FLMBOOL getFromTagNum (FLMUINT uiTagNum, FLMUNICODE *puzTagName, char *pszTagName, FLMUINT uiNameBufSize, FLMUINT *puiType=NULL, FLMUINT *puiSubType=NULL)
 Get the item from the table with the specified dictionary number.
FLMBOOL getFromTagName (const FLMUNICODE *puzTagName, const char *pszTagName, FLMUINT *puiTagNum, FLMUINT *puiType=NULL, FLMUINT *puiSubType=NULL)
 Get the item from the table with the specified name.
FLMBOOL getFromTagTypeAndName (const FLMUNICODE *puzTagName, const char *pszTagName, FLMUINT uiType, FLMUINT *puiTagNum, FLMUINT *puiSubType=NULL)
 Get the item from the table with the specified type (field, index, or container) and name.
RCODE addTag (const FLMUNICODE *puzTagName, const char *pszTagName, FLMUINT uiTagNum, FLMUINT uiType, FLMUINT uiSubType, FLMBOOL bCheckDuplicates=TRUE)
 Insert an item into the table.
void sortTags (void)
 Sort the items in the table.


Detailed Description

Class for mapping names to IDs and vice versa. Methods in this class allow an application to get the dictionary number for a field, index, or container using the field name, index name, or container name. It also allows an application to to get a field name, index name, or field name using the dictionary number.


Member Function Documentation

RCODE F_NameTable::addTag const FLMUNICODE *  puzTagName,
const char *  pszTagName,
FLMUINT  uiTagNum,
FLMUINT  uiType,
FLMUINT  uiSubType,
FLMBOOL  bCheckDuplicates = TRUE
 

Insert an item into the table.

Parameters:
puzTagName  If non-NULL, specifies name of item being added to the table.
pszTagName  If non-NULL, specifies name of item being added to the table. NOTE: If puzTagName is also non-NULL, the pszTagName parameter will be ignored. It is illegal for both puzTagName and pszTagName to be NULL.
uiTagNum  Specifies the dictionary number of the item being added to the table.
uiType  Specifies the dictionary type (field, index,or container) of the item being added to the table.
uiSubType  Specifies the dictionary sub-type of the item being added to the table. NOTE: This is only needed for field items, in which case the sub-type should be the data type for the field.
bCheckDuplicates  Flag specifying whether to check for duplicates. Checks will be made for duplicate name, duplicate type+name, and duplicate dictionary number. If FALSE, duplicate checking is not done. If TRUE, this call becomes more expensive because the table must be sorted in order to check for duplicates.

FLMBOOL F_NameTable::getFromTagName const FLMUNICODE *  puzTagName,
const char *  pszTagName,
FLMUINT *  puiTagNum,
FLMUINT *  puiType = NULL,
FLMUINT *  puiSubType = NULL
 

Get the item from the table with the specified name.

Parameters:
puzTagName  If non-NULL, specifies name of item to find.
pszTagName  If non-NULL, specifies name of item to find. NOTE: If puzTagName is also non-NULL, the pszTagName parameter will be ignored.
puiTagNum  Dictionary number for item is returned here - must be non-NULL.
puiType  If non-NULL, dictionary type (field, index, container) is returned here.
puiSubType  If non-NULL, dictionary sub-type is returned here. NOTE: This only applies to field items, in which case the sub-type is the data type for the field.

FLMBOOL F_NameTable::getFromTagNum FLMUINT  uiTagNum,
FLMUNICODE *  puzTagName,
char *  pszTagName,
FLMUINT  uiNameBufSize,
FLMUINT *  puiType = NULL,
FLMUINT *  puiSubType = NULL
 

Get the item from the table with the specified dictionary number.

Parameters:
uiTagNum  Dictionary number of item to be retrieved.
puzTagName  If non-NULL, name is returned here as a Unicode string.
pszTagName  If non-NULL, name is returned here as an ASCII string. NOTE: If both pszTagName and puzTagName are non-NULL, only puzTagName will be populated.
uiNameBufSize  Size, in bytes, of the puzTagName or pszTagName buffer. Needs to be big enough include a null terminator character.
puiType  If non-NULL, dictionary type (field, index, container) is returned here.
puiSubType  If non-NULL, dictionary sub-type is returned here. NOTE: This only applies to field items, in which case the sub-type is the data type for the field.

FLMBOOL F_NameTable::getFromTagType FLMUINT  uiType,
FLMUINT *  puiNextPos,
FLMUNICODE *  puzTagName,
char *  pszTagName,
FLMUINT  uiNameBufSize,
FLMUINT *  puiTagNum = NULL,
FLMUINT *  puiSubType = NULL
 

Get the next item from the the table of the specified type.

This method allows an application to traverse through all of the items of a particular type (field, index, container). Items will be returned in name order.

Parameters:
uiType  Type of items to be returned.
puiNextPos  Points to a variable that keeps the position of the last item returned. Returns the position of the next item. Initialize to zero to retrieve the first item of the specified type.
puzTagName  If non-NULL, name is returned here as a Unicode string.
pszTagName  If non-NULL, name is returned here as an ASCII string. NOTE: If both pszTagName and puzTagName are non-NULL, only puzTagName will be populated.
uiNameBufSize  Size, in bytes, of the puzTagName or pszTagName buffer. Needs to be big enough include a null terminator character.
puiTagNum  If non-NULL, dictionary number for item is returned here.
puiSubType  If non-NULL, dictionary sub-type is returned here. NOTE: This only applies to field items, in which case the sub-type is the data type for the field.

FLMBOOL F_NameTable::getFromTagTypeAndName const FLMUNICODE *  puzTagName,
const char *  pszTagName,
FLMUINT  uiType,
FLMUINT *  puiTagNum,
FLMUINT *  puiSubType = NULL
 

Get the item from the table with the specified type (field, index, or container) and name.

Parameters:
puzTagName  If non-NULL, specifies name of item to find.
pszTagName  If non-NULL, specifies name of item to find. NOTE: If puzTagName is also non-NULL, the pszTagName parameter will be ignored.
uiType  Type of item to be found.
puiTagNum  Dictionary number for item is returned here - must be non-NULL.
puiSubType  If non-NULL, dictionary sub-type is returned here. NOTE: This only applies to field items, in which case the sub-type is the data type for the field.

FLMBOOL F_NameTable::getNextTagNameOrder FLMUINT *  puiNextPos,
FLMUNICODE *  puzTagName,
char *  pszTagName,
FLMUINT  uiNameBufSize,
FLMUINT *  puiTagNum = NULL,
FLMUINT *  puiType = NULL,
FLMUINT *  puiSubType = NULL
 

Get the next item from the the table in name order.

This method allows an application to traverse through all of the names in a table in name order.

Parameters:
puiNextPos  Points to a variable that keeps the position of the last item returned. Returns the position of the next item. Initialize to zero to retrieve the first item.
puzTagName  If non-NULL, name is returned here as a Unicode string.
pszTagName  If non-NULL, name is returned here as an ASCII string. NOTE: If both pszTagName and puzTagName are non-NULL, only puzTagName will be populated.
uiNameBufSize  Size, in bytes, of the puzTagName or pszTagName buffer. Needs to be big enough include a null terminator character.
puiTagNum  If non-NULL, dictionary number for item is returned here.
puiType  If non-NULL, dictionary type (field, index, container) is returned here.
puiSubType  If non-NULL, dictionary sub-type is returned here. NOTE: This only applies to field items, in which case the sub-type is the data type for the field.

FLMBOOL F_NameTable::getNextTagNumOrder FLMUINT *  puiNextPos,
FLMUNICODE *  puzTagName,
char *  pszTagName,
FLMUINT  uiNameBufSize,
FLMUINT *  puiTagNum = NULL,
FLMUINT *  puiType = NULL,
FLMUINT *  puiSubType = NULL
 

Get the next item from the the table in dictionary number order.

This method allows an application to traverse through all of the items in a table in dictionary number order.

Parameters:
puiNextPos  Points to a variable that keeps the position of the last item returned. Returns the position of the next item. Initialize to zero to retrieve the first item.
puzTagName  If non-NULL, name is returned here as a Unicode string.
pszTagName  If non-NULL, name is returned here as an ASCII string. NOTE: If both pszTagName and puzTagName are non-NULL, only puzTagName will be populated.
uiNameBufSize  Size, in bytes, of the puzTagName or pszTagName buffer. Needs to be big enough include a null terminator character.
puiTagNum  If non-NULL, dictionary number for item is returned here.
puiType  If non-NULL, dictionary type (field, index, container) is returned here.
puiSubType  If non-NULL, dictionary sub-type is returned here. NOTE: This only applies to field items, in which case the sub-type is the data type for the field.

RCODE F_NameTable::setupFromDb HFDB  hDb  ) 
 

Populate a name table from the dictionary of the specified database.

Parameters:
hDb  Database whose dictionary is to be used to populate the name table.

void F_NameTable::sortTags void   ) 
 

Sort the items in the table.

This method is typically called after adding a group of items to the table via the F_NameTable::addTag() method.


Generated on Wed Oct 4 12:11:42 2006 for FLAIM by  doxygen 1.4.6