Fawkes API
Fawkes Development Version
Main Page
Related Pages
Modules
Namespaces
Classes
Files
File List
All
Classes
Namespaces
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Groups
Pages
fvfile.h
1
2
/***************************************************************************
3
* fvfile.h - FireVision file
4
*
5
* Created: Fri Mar 28 11:29:55 2008
6
* Copyright 2008 Tim Niemueller [www.niemueller.de]
7
*
8
****************************************************************************/
9
10
/* This program is free software; you can redistribute it and/or modify
11
* it under the terms of the GNU General Public License as published by
12
* the Free Software Foundation; either version 2 of the License, or
13
* (at your option) any later version. A runtime exception applies to
14
* this software (see LICENSE.GPL_WRE file mentioned below for details).
15
*
16
* This program is distributed in the hope that it will be useful,
17
* but WITHOUT ANY WARRANTY; without even the implied warranty of
18
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
19
* GNU Library General Public License for more details.
20
*
21
* Read the full text in the LICENSE.GPL_WRE file in the doc directory.
22
*/
23
24
#ifndef __FIREVISION_FVUTILS_FILEFORMAT_FVFILE_H_
25
#define __FIREVISION_FVUTILS_FILEFORMAT_FVFILE_H_
26
27
#include <fvutils/fileformat/fvff.h>
28
#include <fvutils/fileformat/fvfile_block.h>
29
#include <cstdlib>
30
#include <list>
31
32
namespace
firevision {
33
#if 0
/* just to make Emacs auto-indent happy */
34
}
35
#endif
36
37
class
FireVisionDataFile
38
{
39
public
:
40
FireVisionDataFile
(
unsigned
short
int
magic_token,
unsigned
short
int
version);
41
virtual
~
FireVisionDataFile
();
42
43
unsigned
int
magic_token();
44
unsigned
int
version();
45
bool
is_big_endian();
46
bool
is_little_endian();
47
size_t
num_blocks();
48
49
const
char
* get_comment()
const
;
50
void
set_comment(
const
char
*comment);
51
52
void
set_owns_blocks(
bool
owns_blocks);
53
54
virtual
void
add_block(
FireVisionDataFileBlock
*block);
55
virtual
void
clear();
56
57
virtual
void
write(
const
char
*file_name);
58
virtual
void
read(
const
char
*file_name);
59
60
static
unsigned
short
int
read_magic_token(
const
char
*filename);
61
static
bool
has_magic_token(
const
char
*filename,
unsigned
short
int
magic_token);
62
63
/** List of FireVision data file blocks. */
64
typedef
std::list<FireVisionDataFileBlock *>
BlockList
;
65
BlockList
& blocks();
66
67
protected
:
68
void
*
_spec_header
;
69
size_t
_spec_header_size
;
70
71
private
:
72
fvff_header_t
*__header;
73
BlockList
__blocks;
74
BlockList::iterator __bi;
75
76
unsigned
int
__magic_token;
77
unsigned
int
__version;
78
79
char
* __comment;
80
81
bool
__owns_blocks;
82
};
83
84
}
// end namespace firevision
85
86
#endif
src
libs
fvutils
fileformat
fvfile.h
Generated by
1.8.1.1