#include <entriesblk.h>
Definition at line 32 of file entriesblk.h.
EntriesBlock::EntriesBlock |
( |
const char * |
iBlock, |
|
|
unsigned long |
size |
|
) |
| |
EntriesBlock::EntriesBlock |
( |
| ) |
|
EntriesBlock::~EntriesBlock |
( |
| ) |
|
int EntriesBlock::addEntry |
( |
const char * |
entry | ) |
|
Definition at line 113 of file entriesblk.cpp.
114 unsigned long dataSize;
116 unsigned long len = strlen(entry);
117 unsigned long offset;
124 memmove(block + dataStart +
METAENTRYSIZE, block + dataStart, dataSize - dataStart);
126 for (
int loop = 0; loop < count; loop++) {
static const int METAHEADERSIZE
const char * getRawData(unsigned long *size)
void setMetaEntry(int index, unsigned long offset, unsigned long size)
static const int METAENTRYSIZE
void getMetaEntry(int index, unsigned long *offset, unsigned long *size)
int EntriesBlock::getCount |
( |
| ) |
|
const char * EntriesBlock::getEntry |
( |
int |
entryIndex | ) |
|
Definition at line 147 of file entriesblk.cpp.
148 unsigned long offset;
150 static const char *empty =
"";
153 return (offset) ?
block+offset : empty;
void getMetaEntry(int index, unsigned long *offset, unsigned long *size)
unsigned long EntriesBlock::getEntrySize |
( |
int |
entryIndex | ) |
|
Definition at line 157 of file entriesblk.cpp.
158 unsigned long offset;
162 return (offset) ? size : 0;
void getMetaEntry(int index, unsigned long *offset, unsigned long *size)
void EntriesBlock::getMetaEntry |
( |
int |
index, |
|
|
unsigned long * |
offset, |
|
|
unsigned long * |
size |
|
) |
| |
|
private |
Definition at line 69 of file entriesblk.cpp.
79 memcpy(&rawSize,
block +
METAHEADERSIZE + (index * METAENTRYSIZE) +
sizeof(rawOffset),
sizeof(rawSize));
static const int METAHEADERSIZE
static const int METAENTRYSIZE
const char * EntriesBlock::getRawData |
( |
unsigned long * |
size | ) |
|
Definition at line 99 of file entriesblk.cpp.
100 unsigned long max = 4;
102 unsigned long offset;
104 for (loop = 0; loop <
getCount(); loop++) {
106 max = ((offset +
size) > max) ? (offset +
size) : max;
void getMetaEntry(int index, unsigned long *offset, unsigned long *size)
void EntriesBlock::removeEntry |
( |
int |
entryIndex | ) |
|
Definition at line 166 of file entriesblk.cpp.
167 unsigned long offset;
169 unsigned long dataSize;
178 memmove(
block + offset,
block + offset + size, dataSize - (offset + size));
181 for (
int loop = entryIndex + 1; loop < count; loop++) {
const char * getRawData(unsigned long *size)
void setMetaEntry(int index, unsigned long offset, unsigned long size)
void getMetaEntry(int index, unsigned long *offset, unsigned long *size)
void EntriesBlock::setCount |
( |
int |
count | ) |
|
|
private |
void EntriesBlock::setMetaEntry |
( |
int |
index, |
|
|
unsigned long |
offset, |
|
|
unsigned long |
size |
|
) |
| |
|
private |
Definition at line 86 of file entriesblk.cpp.
95 memcpy(
block +
METAHEADERSIZE + (index * METAENTRYSIZE) +
sizeof(rawOffset), &rawSize,
sizeof(rawSize));
static const int METAHEADERSIZE
static const int METAENTRYSIZE
char* EntriesBlock::block |
|
private |
const int EntriesBlock::METAENTRYSIZE = 8 |
|
staticprivate |
The documentation for this class was generated from the following files: