LogCabin
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines
Public Member Functions
LogCabin::Core::ProtoBuf::InputStream Struct Reference

An abstract stream from which ProtoBufs may be read. More...

#include <ProtoBuf.h>

Inheritance diagram for LogCabin::Core::ProtoBuf::InputStream:
LogCabin::Storage::SnapshotFile::Reader

List of all members.

Public Member Functions

virtual ~InputStream ()
 Destructor.
virtual uint64_t getBytesRead () const =0
 Return the number of bytes read so far.
virtual std::string readMessage (google::protobuf::Message &message)=0
 Read a ProtoBuf message from the stream.
virtual uint64_t readRaw (void *data, uint64_t length)=0
 Read some raw bytes from the stream.

Detailed Description

An abstract stream from which ProtoBufs may be read.

Definition at line 153 of file ProtoBuf.h.


Constructor & Destructor Documentation

Destructor.

Definition at line 157 of file ProtoBuf.h.


Member Function Documentation

virtual uint64_t LogCabin::Core::ProtoBuf::InputStream::getBytesRead ( ) const [pure virtual]

Return the number of bytes read so far.

Implemented in LogCabin::Storage::SnapshotFile::Reader.

virtual std::string LogCabin::Core::ProtoBuf::InputStream::readMessage ( google::protobuf::Message &  message) [pure virtual]

Read a ProtoBuf message from the stream.

Returns:
Empty string if successful, otherwise an error message if an error occurred. The stream is probably no longer usable after an error.

Implemented in LogCabin::Storage::SnapshotFile::Reader.

virtual uint64_t LogCabin::Core::ProtoBuf::InputStream::readRaw ( void *  data,
uint64_t  length 
) [pure virtual]

Read some raw bytes from the stream.

Returns:
The number of bytes read before the end of the stream was reached, up to 'length'.

Implemented in LogCabin::Storage::SnapshotFile::Reader.


The documentation for this struct was generated from the following file:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines