libdballe  9.11
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 
12 namespace dballe {
13 namespace core {
14 
16 {
17 protected:
18  Encoding file_type;
19 
20 public:
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:130
Definition: arrayfile.h:15
BinaryMessage read() override
Read a message from the file.
Definition: cmdline.h:18
void write(const std::string &msg) override
Append the binary message to the file.
unsigned current
Current reading offset in msgs.
Definition: arrayfile.h:23
Encoding encoding() const override
Get the file encoding.
Base for dballe::File implementations.
Definition: core/file.h:15