GlsMap Toolkit  1.4.1
disti::VPFTableHeader Class Reference

#include <vpf_table_header.h>

Classes

class  ColumnDefinition
 

Public Types

typedef VPFUtil::PointerArray< ColumnDefinitionColumnDefinitionArray
 

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 ColumnDefinitionGetColumnDefinition (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

Constructor & Destructor Documentation

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
infileVPF file to read header from (must be "seeked" to start of file)

Member Function Documentation

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
colNamename of desired column
colIndex[out] receives zero based column index on success
Returns
true if column found else false
unsigned int disti::VPFTableHeader::GetColumnCount ( void  ) const
inline

Get the number of columns in the table

Returns
number of columns in the table
const ColumnDefinition* disti::VPFTableHeader::GetColumnDefinition ( unsigned int  index) const
inline

Get a column definition for a given column in the table

Parameters
indexzero based index into columns
Returns
column definition at index else NULL
const char* disti::VPFTableHeader::GetDescription ( void  ) const
inline

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

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
const char* disti::VPFTableHeader::GetNarrativeFilename ( void  ) const
inline

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

Returns
narrative filename
bool disti::VPFTableHeader::IsValid ( void  ) const
inline
Returns
True if the header was read successfully from the file

Member Data Documentation

ColumnDefinitionArray disti::VPFTableHeader::_columnDefs
protected

column definitions in header

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

table description plus terminator

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

endian mode of data in table

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

true if header was read successfully else false

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: