25 #ifndef COMMON_FOXPRO_H 26 #define COMMON_FOXPRO_H 28 #include <boost/noncopyable.hpp> 37 class SeekableReadStream;
95 const std::vector<Field> &
getFields ()
const;
121 void setInt (
size_t record,
size_t field,
int32 value);
122 void setBool (
size_t record,
size_t field,
bool value);
123 void setDouble(
size_t record,
size_t field,
double value);
168 #endif // COMMON_FOXPRO_H int32 getInt(const Record &record, size_t field) const
static void checkName(const UString &name)
bool getBool(const Record &record, size_t field) const
bool deleted
Has this record been deleted?
void loadRecords(SeekableReadStream &dbf, uint32 recordSize, uint32 recordCount)
A class holding an UTF-8 string.
const std::vector< Record > & getRecords() const
size_t addFieldInt(const UString &name)
void deleteRecord(size_t record)
size_t getRecordCount() const
void saveMemos(WriteStream &fpt) const
void saveHeader(WriteStream &dbf) const
A list storing pointer to objects, with automatic deletion.
A vector of pointer to objects, with automatic deletion.
A list of pointer to objects, with automatic deletion.
void saveFields(WriteStream &dbf) const
size_t addFieldDate(const UString &name)
size_t addFieldBool(const UString &name)
size_t addFieldNumber(const UString &name, uint8 size, uint8 decimals)
void setDate(size_t record, size_t field, uint16 year, uint8 month, uint8 day)
size_t addFieldMemo(const UString &name)
Low-level type definitions to handle fixed width types portably.
void loadFields(SeekableReadStream &dbf, uint32 recordSize)
A vector storing pointer to objects, with automatic deletion.
std::vector< Record > _records
void save(WriteStream *dbf, WriteStream *cdx=0, WriteStream *fpt=0) const
Generic interface for a writable data stream.
void setMemo(size_t record, size_t field, SeekableReadStream *value=0)
double getDouble(const Record &record, size_t field) const
void saveRecords(WriteStream &dbf) const
PtrList< byte, DeallocatorArray > _pool
void setString(size_t record, size_t field, const UString &value)
A database in FoxPro 2.0 format.
void loadHeader(SeekableReadStream &dbf, uint32 &recordSize, uint32 &recordCount, uint32 &firstRecordPos)
SeekableReadStream * getMemo(const Record &record, size_t field) const
const std::vector< Field > & getFields() const
PtrVector< byte, DeallocatorArray > _memos
UString getString(const Record &record, size_t field) const
void getDate(const Record &record, size_t field, uint16 &year, uint8 &month, uint8 &day)
size_t addFieldString(const UString &name, uint8 size)
std::vector< Field > _fields
size_t getFieldCount() const
void getLastUpdate(uint16 &lastUpdateYear, uint8 &lastUpdateMonth, uint8 &lastUpdateDay) const
void load(SeekableReadStream *dbf, SeekableReadStream *cdx=0, SeekableReadStream *fpt=0)
std::vector< byte * > fields
Raw field data.
void setDouble(size_t record, size_t field, double value)
void setBool(size_t record, size_t field, bool value)
Interface for a seekable & readable data stream.
void addField(uint8 size)
void setInt(size_t record, size_t field, int32 value)
void loadMemos(SeekableReadStream &fpt)