#include <StoreMetaUnpacker.h>

Collaboration diagram for StoreMetaUnpacker:

Public Member Functions

 StoreMetaUnpacker (const char *buf, ssize_t bufferLength, int *hdrlen)
 
StoreMetacreateStoreMeta ()
 
bool isBufferZero ()
 useful for meta stored in pre-initialized (with zeros) db files More...
 
void checkBuffer ()
 validates buffer sanity and throws if validation fails More...
 

Private Member Functions

void getBufferLength ()
 
void getType ()
 
void getLength ()
 
void getTLV ()
 
bool doOneEntry ()
 
bool moreToProcess () const
 

Private Attributes

char const *const buf
 
ssize_t buflen
 
inthdr_len
 
int position
 
char type
 
int length
 
StoreMeta ** tail
 

Static Private Attributes

static int const MinimumBufferLength = sizeof(char) + sizeof(int)
 

Detailed Description

Definition at line 15 of file StoreMetaUnpacker.h.

Constructor & Destructor Documentation

StoreMetaUnpacker::StoreMetaUnpacker ( const char *  buf,
ssize_t  bufferLength,
int hdrlen 
)

Definition at line 61 of file StoreMetaUnpacker.cc.

References assert, and NULL.

Member Function Documentation

void StoreMetaUnpacker::checkBuffer ( )
StoreMeta * StoreMetaUnpacker::createStoreMeta ( )
bool StoreMetaUnpacker::doOneEntry ( )
private
void StoreMetaUnpacker::getBufferLength ( )
private

Definition at line 56 of file StoreMetaUnpacker.cc.

References buf, and hdr_len.

Referenced by checkBuffer(), and createStoreMeta().

void StoreMetaUnpacker::getLength ( )
private

Definition at line 81 of file StoreMetaUnpacker.cc.

References buf, int, length, and position.

Referenced by doOneEntry().

void StoreMetaUnpacker::getTLV ( )
private
void StoreMetaUnpacker::getType ( )
private

Definition at line 74 of file StoreMetaUnpacker.cc.

References buf, position, and type.

Referenced by doOneEntry().

bool StoreMetaUnpacker::isBufferZero ( )

all-zeros buffer, checkBuffer() would throw

Definition at line 22 of file StoreMetaUnpacker.cc.

References buf, buflen, and i.

bool StoreMetaUnpacker::moreToProcess ( ) const
private

Definition at line 110 of file StoreMetaUnpacker.cc.

References hdr_len, MinimumBufferLength, and position.

Referenced by createStoreMeta().

Member Data Documentation

char const* const StoreMetaUnpacker::buf
private
ssize_t StoreMetaUnpacker::buflen
private

Definition at line 36 of file StoreMetaUnpacker.h.

Referenced by checkBuffer(), and isBufferZero().

int* StoreMetaUnpacker::hdr_len
private
int StoreMetaUnpacker::length
private

Definition at line 40 of file StoreMetaUnpacker.h.

Referenced by doOneEntry(), and getLength().

int const StoreMetaUnpacker::MinimumBufferLength = sizeof(char) + sizeof(int)
staticprivate

Definition at line 26 of file StoreMetaUnpacker.h.

Referenced by checkBuffer(), and moreToProcess().

int StoreMetaUnpacker::position
private

Definition at line 38 of file StoreMetaUnpacker.h.

Referenced by createStoreMeta(), doOneEntry(), getLength(), getType(), and moreToProcess().

StoreMeta** StoreMetaUnpacker::tail
private

Definition at line 41 of file StoreMetaUnpacker.h.

Referenced by createStoreMeta(), and doOneEntry().

char StoreMetaUnpacker::type
private

Definition at line 39 of file StoreMetaUnpacker.h.

Referenced by doOneEntry(), and getType().


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

 

Introduction

Documentation

Support

Miscellaneous

Web Site Translations

Mirrors