VR-Forces 4.6 Class Documentation
Home
Modules
Namespaces
Classes
Files
Examples
Behavior Models
File List
File Members
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Properties
Friends
Macros
Groups
Pages
include
vmap
vpfTable.h
Go to the documentation of this file.
1
/******************************************************************************
2
** Copyright (c) 2006 MAK Technologies, Inc.** All rights reserved.
3
******************************************************************************/
4
/******************************************************************************
5
* $RCSfile: vpfTable.h,v $ $Revision: 1.11 $ $State: Exp $
6
******************************************************************************/
7
8
#ifndef VPF_TABLE_H_
9
#define VPF_TABLE_H_
10
13
14
#include <string>
15
#include <iostream>
16
#include <fstream>
17
#include <vector>
18
19
#include <vlutil/vlString.h>
20
#include <vlutil/vlFilename.h>
21
22
#include "
vmap/vmapDefines.h
"
23
24
//forward defs
25
class
DtVpfIndexTable
;
26
class
DtVpfColumn
;
27
class
DtVpfRow
;
28
29
typedef
std::vector<DtVpfColumn*>
DtColumnList
;
30
typedef
std::vector<DtVpfRow*>
DtRowList
;
31
32
34
class
DT_DLL_vmap
DtVpfTable
35
{
37
enum
DtByteOrderEnum
{LSB, MSB};
38
39
private
:
41
DtVpfTable
(
const
DtVpfTable
& table);
42
44
DtVpfTable
& operator=(
const
DtVpfTable
& table);
45
46
public
:
49
DtVpfTable
(
const
DtFilename& path);
50
52
virtual
~
DtVpfTable
();
53
56
virtual
std::istream& file();
57
60
virtual
const
DtFilename& fileName()
const
;
61
64
virtual
const
DtFilename& filePath();
65
68
virtual
bool
mustSwap()
const
;
69
74
virtual
const
DtVpfColumn
* column(
const
DtString
& columnName)
const
;
75
78
virtual
const
DtColumnList
* columns()
const
;
79
82
virtual
unsigned
int
numColumns()
const
;
83
88
virtual
const
DtVpfRow
* row(
int
unsigned
rowNumber)
const
;
89
94
virtual
const
DtVpfRow
* rowById(
int
unsigned
id
)
const
;
95
98
virtual
const
DtRowList
* rows()
const
;
99
102
virtual
unsigned
int
numRows()
const
;
103
106
virtual
const
DtVpfTable
* intDescriptionTable()
const
;
107
110
virtual
const
DtVpfTable
* charDescriptionTable()
const
;
111
112
protected
:
115
virtual
bool
readTable();
116
119
virtual
bool
readHeader();
120
123
virtual
bool
readData();
124
126
virtual
void
calculateByteOrder();
127
130
virtual
bool
loadValueDescriptionTable(
const
DtString
&tableName);
131
132
int
myHeaderLength
;
133
DtByteOrderEnum
myFileByteOrder
;
134
DtByteOrderEnum
myMachineByteOrder
;
135
DtString
myTableDescription
;
136
DtString
myNarrativeTableFileName
;
137
DtFilename
myFileName
;
138
DtFilename
myFilePath
;
139
std::ifstream
myFile
;
140
std::ifstream::pos_type
myFileSize
;
141
142
DtColumnList
myColumns
;
143
DtRowList
myRows
;
144
145
//some columns have descriptions stored in these tables
146
//a columns description() function will reference these tables
147
DtVpfTable
*
myIntDescriptions
;
148
DtVpfTable
*
myCharDescriptions
;
149
};
150
151
#endif
Document ID: Generated on Thu Apr 12 03:15:37 EDT 2018 from SVN revision 187986
Copyright © 2005-2018 VT MÄK. All Rights Reserved (
www.mak.com
)