| GlsMap Toolkit 1.10.1

Classes | Public Types | Public Member Functions | Protected Types | Protected Attributes | List of all members
disti::VPFTableHeader Class Reference

`#include <vpf_table_header.h>`

## Classes
class | ColumnDefinition

## Public Types
typedef VPFUtil::PointerArray< ColumnDefinition > | ColumnDefinitionArray

## Public Member Functions
| VPFTableHeader (VPFFile &infile)
VPFUtil::EndianMode | GetEndianMode (void) const
const char * | GetDescription (void) const
const char * | GetNarrativeFilename (void) const
unsigned int | GetColumnCount (void) const
const ColumnDefinition * | GetColumnDefinition (unsigned int index) const
bool | FindColumn (const char *const colName, unsigned int &colIndex) const
bool | IsValid (void) const

## Protected Types
enum | { DESCRIPTION_LENGTH = 81u }
enum | { NARRATIVE_FILE_LENGTH = 13u }

## Protected Attributes
VPFUtil::WarningBool | _isValid
VPFUtil::EndianMode | _endianMode
char | _description [DESCRIPTION_LENGTH+1u]
char | _narrativeFile [NARRATIVE_FILE_LENGTH+1u]
ColumnDefinitionArray | _columnDefs

## Detailed Description

reads and encapsulates a VPF table header

## Member Typedef Documentation

## ◆ ColumnDefinitionArray

typedef VPFUtil::PointerArray<ColumnDefinition> disti::VPFTableHeader::ColumnDefinitionArray

array of column definition pointers

## Constructor & Destructor Documentation

## ◆ VPFTableHeader()

VPFTableHeader::VPFTableHeader | ( | VPFFile & | infile | ) |

Read the table header from the given VPF file. Infile will be "seeked" to just past the header on success.

Parameters

  infile | VPF file to read header from (must be "seeked" to start of file)

## Member Function Documentation

## ◆ FindColumn()

bool VPFTableHeader::FindColumn | ( | const char *const | colName,
|  | unsigned int & | colIndex
| ) |  | const

Find the column index to the column in the table header with the given column name

Parameters

  colName | name of desired column
  colIndex | [out] receives zero based column index on success

Returns
  true if column found else false

## ◆ GetColumnCount()

unsigned int disti::VPFTableHeader::GetColumnCount | ( | void |  | ) | const
| inline

Get the number of columns in the table

Returns
  number of columns in the table

## ◆ GetColumnDefinition()

const ColumnDefinition * disti::VPFTableHeader::GetColumnDefinition | ( | unsigned int | index | ) | const
| inline

Get a column definition for a given column in the table

Parameters

  index | zero based index into columns

Returns
  column definition at index else NULL

## ◆ GetDescription()

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

Get the description from the table header /return description from the table header

## ◆ GetEndianMode()

VPFUtil::EndianMode disti::VPFTableHeader::GetEndianMode | ( | void |  | ) | const
| inline

Get the endian mode read from the table header

Returns
  the endian mode from the table header

## ◆ GetNarrativeFilename()

const char * disti::VPFTableHeader::GetNarrativeFilename | ( | void |  | ) | const
| inline

Get the filename of a narrative file associated with the table header

Returns
  narrative filename

## ◆ IsValid()

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

Returns
  True if the header was read successfully from the file

## Member Data Documentation

## ◆ _columnDefs

ColumnDefinitionArray disti::VPFTableHeader::_columnDefs
| protected

column definitions in header

## ◆ _description

char disti::VPFTableHeader::_description[DESCRIPTION_LENGTH+1u]
| protected

table description plus terminator

## ◆ _endianMode

VPFUtil::EndianMode disti::VPFTableHeader::_endianMode
| protected

endian mode of data in table

## ◆ _isValid

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

true if header was read successfully else false

## ◆ _narrativeFile

char disti::VPFTableHeader::_narrativeFile[NARRATIVE_FILE_LENGTH+1u]
| protected

narrative file name plus terminator

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

- vpf_table_header.h
- vpf_table_header.cpp