Feathercoin  0.5.0
P2P Digital Currency
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros
Classes | Public Member Functions | Private Types | Private Member Functions | Private Attributes | List of all members
leveldb::log::Reader Class Reference

#include <log_reader.h>

Collaboration diagram for leveldb::log::Reader:
Collaboration graph
[legend]

Classes

class  Reporter
 

Public Member Functions

 Reader (SequentialFile *file, Reporter *reporter, bool checksum, uint64_t initial_offset)
 
 ~Reader ()
 
bool ReadRecord (Slice *record, std::string *scratch)
 
uint64_t LastRecordOffset ()
 

Private Types

enum  { kEof = kMaxRecordType + 1, kBadRecord = kMaxRecordType + 2 }
 

Private Member Functions

bool SkipToInitialBlock ()
 
unsigned int ReadPhysicalRecord (Slice *result)
 
void ReportCorruption (size_t bytes, const char *reason)
 
void ReportDrop (size_t bytes, const Status &reason)
 
 Reader (const Reader &)
 
void operator= (const Reader &)
 

Private Attributes

SequentialFile *const file_
 
Reporter *const reporter_
 
bool const checksum_
 
char *const backing_store_
 
Slice buffer_
 
bool eof_
 
uint64_t last_record_offset_
 
uint64_t end_of_buffer_offset_
 
uint64_t const initial_offset_
 

Detailed Description

Definition at line 20 of file log_reader.h.

Member Enumeration Documentation

anonymous enum
private
Enumerator
kEof 
kBadRecord 

Definition at line 77 of file log_reader.h.

Constructor & Destructor Documentation

leveldb::log::Reader::Reader ( SequentialFile file,
Reporter reporter,
bool  checksum,
uint64_t  initial_offset 
)

Definition at line 18 of file log_reader.cc.

leveldb::log::Reader::~Reader ( )

Definition at line 31 of file log_reader.cc.

leveldb::log::Reader::Reader ( const Reader )
private

Member Function Documentation

uint64_t leveldb::log::Reader::LastRecordOffset ( )

Definition at line 164 of file log_reader.cc.

void leveldb::log::Reader::operator= ( const Reader )
private
unsigned int leveldb::log::Reader::ReadPhysicalRecord ( Slice result)
private

Definition at line 179 of file log_reader.cc.

bool leveldb::log::Reader::ReadRecord ( Slice record,
std::string *  scratch 
)

Definition at line 59 of file log_reader.cc.

void leveldb::log::Reader::ReportCorruption ( size_t  bytes,
const char *  reason 
)
private

Definition at line 168 of file log_reader.cc.

void leveldb::log::Reader::ReportDrop ( size_t  bytes,
const Status reason 
)
private

Definition at line 172 of file log_reader.cc.

bool leveldb::log::Reader::SkipToInitialBlock ( )
private

Definition at line 35 of file log_reader.cc.

Member Data Documentation

char* const leveldb::log::Reader::backing_store_
private

Definition at line 64 of file log_reader.h.

Slice leveldb::log::Reader::buffer_
private

Definition at line 65 of file log_reader.h.

bool const leveldb::log::Reader::checksum_
private

Definition at line 63 of file log_reader.h.

uint64_t leveldb::log::Reader::end_of_buffer_offset_
private

Definition at line 71 of file log_reader.h.

bool leveldb::log::Reader::eof_
private

Definition at line 66 of file log_reader.h.

SequentialFile* const leveldb::log::Reader::file_
private

Definition at line 61 of file log_reader.h.

uint64_t const leveldb::log::Reader::initial_offset_
private

Definition at line 74 of file log_reader.h.

uint64_t leveldb::log::Reader::last_record_offset_
private

Definition at line 69 of file log_reader.h.

Reporter* const leveldb::log::Reader::reporter_
private

Definition at line 62 of file log_reader.h.


The documentation for this class was generated from the following files: