libdballe
5.18
Main Page
Modules
Data Structures
Files
File List
Globals
dballe
core
aoffile.h
Go to the documentation of this file.
1
/*
2
* dballe/aoffile - AOF File I/O
3
*
4
* Copyright (C) 2005--2010 ARPA-SIM <urpsim@smr.arpa.emr.it>
5
*
6
* This program is free software; you can redistribute it and/or modify
7
* it under the terms of the GNU General Public License as published by
8
* the Free Software Foundation; either version 2 of the License.
9
*
10
* This program is distributed in the hope that it will be useful,
11
* but WITHOUT ANY WARRANTY; without even the implied warranty of
12
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13
* GNU General Public License for more details.
14
*
15
* You should have received a copy of the GNU General Public License
16
* along with this program; if not, write to the Free Software
17
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
18
*
19
* Author: Enrico Zini <enrico@enricozini.com>
20
*/
21
22
#ifndef DBA_CORE_AOFFILE_H
23
#define DBA_CORE_AOFFILE_H
24
32
#include <
dballe/core/file.h
>
33
#include <stdint.h>
34
35
namespace
dballe {
36
37
class
AofFile
:
public
dballe::File
38
{
39
protected
:
48
bool
read_record
(std::string& res);
49
57
void
write_record
(
const
std::string& res);
58
66
void
write_record
(
const
uint32_t* words,
size_t
wordcount);
67
71
void
write_word
(uint32_t word);
72
73
public
:
74
AofFile
(
const
std::string&
name
, FILE*
fd
,
bool
close_on_exit
=
true
);
75
virtual
~
AofFile
();
76
77
virtual
Encoding
type
()
const
throw () {
return
AOF; }
78
79
bool
read
(
Rawmsg
& msg);
80
void
write
(
const
Rawmsg
& msg);
81
82
87
void
read_header
();
88
90
void
write_dummy_header
();
91
95
void
fix_header
();
96
};
97
98
}
// namespace dballe
99
100
/* vim:set ts=4 sw=4: */
101
#endif
Generated on Wed Mar 19 2014 05:22:59 for libdballe by
1.8.1.2