GL Studio C++ Runtime API
VPFTableHeader::ColumnDefinition Class Reference

#include <vpf_table_header.h>

Classes

struct  Check
 

Public Member Functions

 ColumnDefinition (VPFFile &infile)
 
 ~ColumnDefinition ()
 
bool IsValid (void) const
 
const char * GetName (void) const
 
VPFUtil::DataType GetDataType (void) const
 
int GetNumberOfElements (void) const
 
VPFUtil::KeyType GetKeyType (void) const
 
const char * GetDescription (void) const
 
const char * GetValueDescriptionTableName (void) const
 
const char * GetThematicIndexName (void) const
 
const char * GetNarrativeTableName (void) const
 
bool CheckDefinition (const Check &colCheck, const bool colCanBeNULL=false) const
 

Protected Member Functions

bool ReadNumElements (VPFFile &infile)
 

Protected Attributes

VPFUtil::WarningBool _isValid
 
char _name [NAME_LENGTH+1u]
 
VPFUtil::DataType _dataType
 
int _numElements
 
VPFUtil::KeyType _keyType
 
char * _description
 
char _valDescTableName [VAL_DESC_TABLE_NAME_LENGTH+1u]
 
char _thematicIndexName [THEMATIC_INDEXES_NAME_LENGTH+1u]
 
char _narrativeTableName [NARRATIVE_TABLE_NAME_LENGTH+1u]
 

Detailed Description

< VPF table column definition

Constructor & Destructor Documentation

ColumnDefinition ( VPFFile &  infile)

Construct a VPF table column definition read from the given file. Input file should be "seeked" to beginning of column definition and will end "seeked" one past end of column separator

Parameters
infileinput file to read description from

Dtor

Member Function Documentation

bool CheckDefinition ( const Check colCheck,
const bool  colCanBeNULL = false 
) const

Determine if this column definition matches the given column check

Parameters
colCheckcolumn check
colCanBeNULL[optional, defaults to false] true if column can optionally be a NULL data type and pass this check test
Returns
true if matches else false
VPFUtil::DataType GetDataType ( void  ) const
inline

Get the data type of the column

Returns
data type of the column
const char* GetDescription ( void  ) const
inline

Get description of column

Returns
description of column else NULL if not valid
VPFUtil::KeyType GetKeyType ( void  ) const
inline

Get the key type for the column

Returns
key type for the column
const char* GetName ( void  ) const
inline

Get the name of the column

Returns
name of the column else "" if not valid
const char* GetNarrativeTableName ( void  ) const
inline

Get the narrative table name of the column

Returns
narrative table name of the column else "" if not valid
int GetNumberOfElements ( void  ) const
inline

Get the number of data elements in the column

Returns
number of data elements in the column (-1 indicates variable length)
const char* GetThematicIndexName ( void  ) const
inline

Get the thematic indexes name of the column

Returns
thematic indexes name of the column else "" if not valid
const char* GetValueDescriptionTableName ( void  ) const
inline

Get the value description table name of the column

Returns
value description table name of the column else "" if not valid
bool IsValid ( void  ) const
inline

Determine if a valid column definition was read

Returns
true if valid else false
bool ReadNumElements ( VPFFile &  infile)
protected

Read the number of elements and populate _numElements accordingly. _numElements gets -1 if variable length is indicated. Input file should be "seeked" to num elements field and will end "seeked" one past column def delimiter

Parameters
infileinput file to read number of elements
Returns
true on success else false

Member Data Documentation

VPFUtil::DataType _dataType
protected

column data type

char* _description
protected

column description (meaning)

VPFUtil::WarningBool _isValid
protected

true if a valid definition was read else false

VPFUtil::KeyType _keyType
protected

column key type

char _name[NAME_LENGTH+1u]
protected

column name plus one for terminator

char _narrativeTableName[NARRATIVE_TABLE_NAME_LENGTH+1u]
protected

narrative table name plus one for terminator

int _numElements
protected

number of elements in column else -1 for variable length

char _thematicIndexName[THEMATIC_INDEXES_NAME_LENGTH+1u]
protected

thematic indexes name plus one for terminator

char _valDescTableName[VAL_DESC_TABLE_NAME_LENGTH+1u]
protected

value description table name plus one for terminator


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