44#ifndef __PROTO_PROTOIO_HH__
45#define __PROTO_PROTOIO_HH__
47#include <google/protobuf/io/coded_stream.h>
48#include <google/protobuf/io/gzip_stream.h>
49#include <google/protobuf/io/zero_copy_stream_impl.h>
50#include <google/protobuf/message.h>
115 void write(
const google::protobuf::Message& msg);
165 bool read(google::protobuf::Message& msg);
A ProtoOutputStream wraps a coded stream, potentially with compression, based on looking at the file ...
std::ofstream fileStream
Underlying file output stream.
google::protobuf::io::ZeroCopyOutputStream * zeroCopyStream
Top-level zero-copy stream, either with compression or not.
google::protobuf::io::OstreamOutputStream * wrappedFileStream
Zero Copy stream wrapping the STL output stream.
~ProtoOutputStream()
Destruct the output stream, and also flush and close the underlying file streams and coded streams.
ProtoOutputStream(const std::string &filename)
Create an output stream for a given file name.
void write(const google::protobuf::Message &msg)
Write a message to the stream, preprending it with the message size.
google::protobuf::io::GzipOutputStream * gzipStream
Optional Gzip stream to wrap the Zero Copy stream.
A ProtoStream provides the shared functionality of the input and output streams.
ProtoStream(const ProtoStream &)
Hide the copy constructor and assignment operator.
ProtoStream & operator=(const ProtoStream &)
static const uint32_t magicNumber
Use the ASCII characters gem5 as our magic number.
ProtoStream()
Create a ProtoStream.