45 class NotFound:
public Exception
59 return *
reinterpret_cast<float*
>(
offset + field * 4);
65 return *
reinterpret_cast<unsigned int*
>(
offset + field * 4);
71 return *
reinterpret_cast<int*
>(
offset + field * 4);
77 size_t stringOffset =
getUInt(field);
91 Record(
Record const& right) : file(right.file), offset(right.offset)
157 unsigned char *
_data;
const std::string & getMessage()
Definition: dbcfile.h:40
Record getRecord(size_t id)
Definition: dbcfile.cpp:81
void * HANDLE
Definition: CascPort.h:146
size_t getFieldCount() const
Definition: dbcfile.h:146
HANDLE _file
Definition: dbcfile.h:139
~DBCFile()
Definition: dbcfile.cpp:76
Iterator end()
Get begin iterator over records.
Definition: dbcfile.cpp:105
Record record
Definition: dbcfile.h:122
bool open()
Definition: dbcfile.cpp:29
unsigned char * _data
Definition: dbcfile.h:144
Iterator(DBCFile &file, unsigned char *offset)
Definition: dbcfile.h:100
Record(Record const &right)
Definition: dbcfile.h:91
char const * getString(size_t field) const
Definition: dbcfile.h:74
size_t _recordSize
Definition: dbcfile.h:140
Exception(const std::string &message)
Definition: dbcfile.h:38
Record(DBCFile &file, unsigned char *offset)
Definition: dbcfile.h:83
size_t getMaxId()
Definition: dbcfile.cpp:87
std::string message
Definition: dbcfile.h:42
unsigned char * _stringTable
Definition: dbcfile.h:145
unsigned char * offset
Definition: dbcfile.h:85
size_t _recordCount
Definition: dbcfile.h:141
DBCFile & file
Definition: dbcfile.h:84
virtual ~Exception()
Definition: dbcfile.h:39
int getInt(size_t field) const
Definition: dbcfile.h:68
HANDLE _mpq
Definition: dbcfile.h:150
Iterator begin()
Get begin iterator over records.
Definition: dbcfile.cpp:99
bool operator!=(Iterator const &b) const
Definition: dbcfile.h:123
float getFloat(size_t field) const
Definition: dbcfile.h:56
const char * _filename
Definition: dbcfile.h:151
size_t _stringSize
Definition: dbcfile.h:143
unsigned int getUInt(size_t field) const
Definition: dbcfile.h:62
DBCFile(HANDLE file)
Definition: dbcfile.cpp:23
size_t getRecordCount() const
Trivial.
Definition: dbcfile.h:145
size_t _fieldCount
Definition: dbcfile.h:142
Iterator(Iterator const &right)
Definition: dbcfile.h:102
Record const * operator->() const
Definition: dbcfile.h:115
bool operator==(Iterator const &b) const
Comparison.
Definition: dbcfile.h:118
Iterator & operator=(Iterator const &right)
Definition: dbcfile.h:128
NotFound()
Definition: dbcfile.h:48
Record & operator=(Record const &right)
Record const & operator*() const
Return address of current instance.
Definition: dbcfile.h:114
Iterator & operator++()
Advance (prefix only)
Definition: dbcfile.h:107