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