Fawkes API
Fawkes Development Version
|
24 #ifndef _FIREVISION_FVUTILS_FILEFORMAT_FVFILE_H_
25 #define _FIREVISION_FVUTILS_FILEFORMAT_FVFILE_H_
27 #include <fvutils/fileformat/fvff.h>
28 #include <fvutils/fileformat/fvfile_block.h>
33 namespace firevision {
35 class FireVisionDataFile
55 virtual void write(
const char *file_name);
56 virtual void read(
const char *file_name);
62 typedef std::list<FireVisionDataFileBlock *>
BlockList;
72 BlockList::iterator bi_;
74 unsigned int magic_token_;
75 unsigned int version_;
void set_comment(const char *comment)
Set comment.
virtual ~FireVisionDataFile()
Destructor.
virtual void read(const char *file_name)
Read file.
std::list< FireVisionDataFileBlock * > BlockList
List of FireVision data file blocks.
const char * get_comment() const
Get comment.
size_t num_blocks()
Get the number of available info blocks.
virtual void add_block(FireVisionDataFileBlock *block)
Add a block.
bool is_little_endian()
Check if data is encoded as little endian.
FireVisionDataFile(unsigned short int magic_token, unsigned short int version)
Constructor.
static bool has_magic_token(const char *filename, unsigned short int magic_token)
Check if file has a certain magic token.
virtual void write(const char *file_name)
Write file.
unsigned int version()
Get the version of the file.
unsigned int magic_token()
Get the magic token of the file.
void set_owns_blocks(bool owns_blocks)
Lets the file take over the ownership and give up the ownership of the blocks, respectively.
virtual void clear()
Clear internal storage.
static unsigned short int read_magic_token(const char *filename)
Get magic token from file.
BlockList & blocks()
Get blocks.
bool is_big_endian()
Check if data is encoded as big endian.