#include <StoreMetaUnpacker.h>

Public Member Functions | |
StoreMetaUnpacker (const char *buf, ssize_t bufferLength, int *hdrlen) | |
StoreMeta * | createStoreMeta () |
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 |
int * | hdr_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::StoreMetaUnpacker | ( | const char * | buf, |
ssize_t | bufferLength, | ||
int * | hdrlen | ||
) |
Definition at line 61 of file StoreMetaUnpacker.cc.
Member Function Documentation
◆ checkBuffer()
void StoreMetaUnpacker::checkBuffer | ( | ) |
Definition at line 39 of file StoreMetaUnpacker.cc.
References assert, buf, buflen, getBufferLength(), hdr_len, MinimumBufferLength, STORE_META_OK, and TexcHere.
Referenced by createStoreMeta(), and Rock::HeaderUpdater::parseReadBytes().
◆ createStoreMeta()
StoreMeta * StoreMetaUnpacker::createStoreMeta | ( | ) |
Definition at line 116 of file StoreMetaUnpacker.cc.
References assert, checkBuffer(), doOneEntry(), getBufferLength(), hdr_len, moreToProcess(), NULL, position, tail, and TexcHere.
Referenced by storeRebuildParseEntry(), and store_client::unpackHeader().
◆ doOneEntry()
|
private |
Definition at line 88 of file StoreMetaUnpacker.cc.
References StoreMeta::Add(), buf, DBG_CRITICAL, debugs, StoreMeta::Factory(), getLength(), getType(), hdr_len, length, position, tail, and type.
Referenced by createStoreMeta().
◆ getBufferLength()
|
private |
Definition at line 56 of file StoreMetaUnpacker.cc.
Referenced by checkBuffer(), and createStoreMeta().
◆ getLength()
|
private |
Definition at line 81 of file StoreMetaUnpacker.cc.
References buf, int, length, and position.
Referenced by doOneEntry().
◆ getTLV()
|
private |
◆ getType()
|
private |
Definition at line 74 of file StoreMetaUnpacker.cc.
References buf, position, and type.
Referenced by doOneEntry().
◆ isBufferZero()
bool StoreMetaUnpacker::isBufferZero | ( | ) |
all-zeros buffer, checkBuffer() would throw
Definition at line 22 of file StoreMetaUnpacker.cc.
Referenced by storeRebuildParseEntry().
◆ moreToProcess()
|
private |
Definition at line 110 of file StoreMetaUnpacker.cc.
References hdr_len, MinimumBufferLength, and position.
Referenced by createStoreMeta().
Member Data Documentation
◆ buf
|
private |
Definition at line 35 of file StoreMetaUnpacker.h.
Referenced by checkBuffer(), doOneEntry(), getBufferLength(), getLength(), getType(), and isBufferZero().
◆ buflen
|
private |
Definition at line 36 of file StoreMetaUnpacker.h.
Referenced by checkBuffer(), and isBufferZero().
◆ hdr_len
|
private |
Definition at line 37 of file StoreMetaUnpacker.h.
Referenced by checkBuffer(), createStoreMeta(), doOneEntry(), getBufferLength(), and moreToProcess().
◆ length
|
private |
Definition at line 40 of file StoreMetaUnpacker.h.
Referenced by doOneEntry(), and getLength().
◆ MinimumBufferLength
Definition at line 26 of file StoreMetaUnpacker.h.
Referenced by checkBuffer(), and moreToProcess().
◆ position
|
private |
Definition at line 38 of file StoreMetaUnpacker.h.
Referenced by createStoreMeta(), doOneEntry(), getLength(), getType(), and moreToProcess().
◆ tail
|
private |
Definition at line 41 of file StoreMetaUnpacker.h.
Referenced by createStoreMeta(), and doOneEntry().
◆ 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: