Kyoto Cabinet
|
Memory-saving string array list. More...
#include <kcmap.h>
Public Member Functions | |
TinyArrayList () | |
Default constructor. | |
~TinyArrayList () | |
Destructor. | |
void | push (const char *buf, size_t size) |
Insert a record at the bottom of the list. | |
bool | pop () |
Remove a record at the bottom of the list. | |
void | unshift (const char *buf, size_t size) |
Insert a record at the top of the list. | |
bool | shift () |
Remove a record at the top of the list. | |
void | insert (const char *buf, size_t size, size_t idx) |
Insert a record at the position of the given index of the list. | |
void | remove (size_t idx) |
Remove a record at the position of the given index of the list. | |
const char * | get (size_t idx, size_t *sp) |
Retrieve a record at the position of the given index of the list. | |
void | clear () |
Remove all records. | |
size_t | count () |
Get the number of records. |
Memory-saving string array list.
kyotocabinet::TinyArrayList::TinyArrayList | ( | ) | [explicit] |
Default constructor.
Destructor.
void kyotocabinet::TinyArrayList::push | ( | const char * | buf, |
size_t | size | ||
) |
Insert a record at the bottom of the list.
buf | the pointer to the record region. |
size | the size of the record region. |
bool kyotocabinet::TinyArrayList::pop | ( | ) |
Remove a record at the bottom of the list.
void kyotocabinet::TinyArrayList::unshift | ( | const char * | buf, |
size_t | size | ||
) |
Insert a record at the top of the list.
buf | the pointer to the record region. |
size | the size of the record region. |
bool kyotocabinet::TinyArrayList::shift | ( | ) |
Remove a record at the top of the list.
void kyotocabinet::TinyArrayList::insert | ( | const char * | buf, |
size_t | size, | ||
size_t | idx | ||
) |
Insert a record at the position of the given index of the list.
buf | the pointer to the record region. |
size | the size of the record region. |
idx | the index of the position. It must be equal to or less than the number of records. |
void kyotocabinet::TinyArrayList::remove | ( | size_t | idx | ) |
Remove a record at the position of the given index of the list.
idx | the index of the position. It must be less than the number of records. |
const char* kyotocabinet::TinyArrayList::get | ( | size_t | idx, |
size_t * | sp | ||
) |
Retrieve a record at the position of the given index of the list.
idx | the index of the position. It must be less than the number of records. |
sp | the pointer to the variable into which the size of the region of the return value is assigned. |
void kyotocabinet::TinyArrayList::clear | ( | ) |
Remove all records.
size_t kyotocabinet::TinyArrayList::count | ( | ) |
Get the number of records.