| GlsMap Toolkit 1.10.2

Classes | Public Member Functions | Protected Types | Protected Member Functions | Protected Attributes | List of all members
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

## ◆ ColumnDefinition()

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

  infile | input file to read description from

## ◆ ~ColumnDefinition()

VPFTableHeader::ColumnDefinition::~ColumnDefinition | ( |  | ) |

Dtor

## Member Function Documentation

## ◆ CheckDefinition()

bool VPFTableHeader::ColumnDefinition::CheckDefinition | ( | const Check & | colCheck,
|  | const bool | colCanBeNULL = `false`
| ) |  | const

Determine if this column definition matches the given column check

Parameters

  colCheck | column 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

## ◆ GetDataType()

VPFUtil::DataType disti::VPFTableHeader::ColumnDefinition::GetDataType | ( | void |  | ) | const
| inline

Get the data type of the column

Returns
  data type of the column

## ◆ GetDescription()

const char * disti::VPFTableHeader::ColumnDefinition::GetDescription | ( | void |  | ) | const
| inline

Get description of column

Returns
  description of column else NULL if not valid

## ◆ GetKeyType()

VPFUtil::KeyType disti::VPFTableHeader::ColumnDefinition::GetKeyType | ( | void |  | ) | const
| inline

Get the key type for the column

Returns
  key type for the column

## ◆ GetName()

const char * disti::VPFTableHeader::ColumnDefinition::GetName | ( | void |  | ) | const
| inline

Get the name of the column

Returns
  name of the column else "" if not valid

## ◆ GetNarrativeTableName()

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

## ◆ GetNumberOfElements()

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)

## ◆ GetThematicIndexName()

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

## ◆ GetValueDescriptionTableName()

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

## ◆ IsValid()

bool disti::VPFTableHeader::ColumnDefinition::IsValid | ( | void |  | ) | const
| inline

Determine if a valid column definition was read

Returns
  true if valid else false

## ◆ ReadNumElements()

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

  infile | input file to read number of elements

Returns
  true on success else false

## Member Data Documentation

## ◆ _dataType

VPFUtil::DataType disti::VPFTableHeader::ColumnDefinition::_dataType
| protected

column data type

## ◆ _description

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

column description (meaning)

## ◆ _isValid

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

true if a valid definition was read else false

## ◆ _keyType

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

column key type

## ◆ _name

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

column name plus one for terminator

## ◆ _narrativeTableName

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

narrative table name plus one for terminator

## ◆ _numElements

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

number of elements in column else -1 for variable length

## ◆ _thematicIndexName

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

thematic indexes name plus one for terminator

## ◆ _valDescTableName

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:

- vpf_table_header.h
- vpf_table_header.cpp