22 #ifndef DBA_CORE_AOFFILE_H
23 #define DBA_CORE_AOFFILE_H
66 void write_record(
const uint32_t* words,
size_t wordcount);
77 virtual Encoding
type()
const throw () {
return AOF; }
bool read_record(std::string &res)
Read a Fortran Unformatted Sequential Binary record from a file.
void read_header()
Read the file header, perform some consistency checks then discard the data.
FILE * fd
FILE structure used to read or write to the file.
Definition: file.h:52
void write_word(uint32_t word)
Write a word to the file, byteswapping it for endianness if needed.
void write_record(const std::string &res)
Write a Fortran Unformatted Sequential Binary record to a file.
File I/O for files containing meterorological messages.
virtual Encoding type() const
Get the name of the dba_file.
Definition: aoffile.h:77
void write(const Rawmsg &msg)
Write the encoded message data to the file.
void write_dummy_header()
Write a dummy file header.
const std::string & name() const
Get the type of the dba_file.
Definition: file.h:73
Annotated string buffer for encoded messages.
Definition: rawmsg.h:38
bool read(Rawmsg &msg)
Read a message from the file.
void fix_header()
Rewrite the file header, scanning the file to compute a correct one.
bool close_on_exit
Set to true if fd should be closed when dba_file_delete() is called.
Definition: file.h:54