GlsMap Toolkit  1.7.0
disti::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 Types

enum  { NAME_LENGTH = 17u }
 
enum  { VAL_DESC_TABLE_NAME_LENGTH = 13u }
 
enum  { THEMATIC_INDEXES_NAME_LENGTH = 13u }
 
enum  { NARRATIVE_TABLE_NAME_LENGTH = 13u }
 

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

VPFTableHeader::ColumnDefinition::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
VPFTableHeader::ColumnDefinition::~ColumnDefinition ( )

Dtor

Member Function Documentation

bool VPFTableHeader::ColumnDefinition::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 disti::VPFTableHeader::ColumnDefinition::GetDataType ( void  ) const
inline

Get the data type of the column

Returns
data type of the column
const char* disti::VPFTableHeader::ColumnDefinition::GetDescription ( void  ) const
inline

Get description of column

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

Get the key type for the column

Returns
key type for the column
const char* disti::VPFTableHeader::ColumnDefinition::GetName ( void  ) const
inline

Get the name of the column

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

Get the narrative table name of the column

Returns
narrative table name of the column else "" if not valid
int disti::VPFTableHeader::ColumnDefinition::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* disti::VPFTableHeader::ColumnDefinition::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* disti::VPFTableHeader::ColumnDefinition::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 disti::VPFTableHeader::ColumnDefinition::IsValid ( void  ) const
inline

Determine if a valid column definition was read

Returns
true if valid else false
bool VPFTableHeader::ColumnDefinition::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 disti::VPFTableHeader::ColumnDefinition::_dataType
protected

column data type

char* disti::VPFTableHeader::ColumnDefinition::_description
protected

column description (meaning)

VPFUtil::WarningBool disti::VPFTableHeader::ColumnDefinition::_isValid
protected

true if a valid definition was read else false

VPFUtil::KeyType disti::VPFTableHeader::ColumnDefinition::_keyType
protected

column key type

char disti::VPFTableHeader::ColumnDefinition::_name[NAME_LENGTH+1u]
protected

column name plus one for terminator

char disti::VPFTableHeader::ColumnDefinition::_narrativeTableName[NARRATIVE_TABLE_NAME_LENGTH+1u]
protected

narrative table name plus one for terminator

int disti::VPFTableHeader::ColumnDefinition::_numElements
protected

number of elements in column else -1 for variable length

char disti::VPFTableHeader::ColumnDefinition::_thematicIndexName[THEMATIC_INDEXES_NAME_LENGTH+1u]
protected

thematic indexes name plus one for terminator

char disti::VPFTableHeader::ColumnDefinition::_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 files: