libdballe 9.6
arrayfile.h
Go to the documentation of this file.
1#ifndef DBALLE_CORE_ARRAYFILE_H
2#define DBALLE_CORE_ARRAYFILE_H
3
9#include <dballe/core/file.h>
10#include <vector>
11
12namespace dballe {
13namespace core {
14
16{
17protected:
18 Encoding file_type;
19
20public:
21 std::vector<BinaryMessage> msgs;
23 unsigned current;
24
25 ArrayFile(Encoding type);
26 virtual ~ArrayFile();
27
28 Encoding encoding() const override;
29 BinaryMessage read() override;
30 void write(const std::string& msg) override;
31};
32
33}
34}
35
36#endif
Binary message.
Definition: file.h:131
Definition: arrayfile.h:16
Encoding encoding() const override
Get the file encoding.
BinaryMessage read() override
Read a message from the file.
unsigned current
Current reading offset in msgs.
Definition: arrayfile.h:23
void write(const std::string &msg) override
Append the binary message to the file.
Base for dballe::File implementations.
Definition: core/file.h:16