Kyoto Cabinet: kyotocabinet::TinyHashMap::Sorter Class Reference

Kyoto Cabinet

- Main Page
- Namespaces
- Classes
- Files

- Class List
- Class Index
- Class Hierarchy
- Class Members

Public Member Functions | Public Attributes
kyotocabinet::TinyHashMap::Sorter Class Reference

Sorter of records. More...

`#include <kcmap.h>`

List of all members.

## Public Member Functions
| Sorter (TinyHashMap *map)
| Constructor.
| ~Sorter ()
| Destructor.
const char * | get_key (size_t *sp)
| Get the key of the current record.
const char * | get_value (size_t *sp)
| Get the value of the current record.
const char * | get (size_t *ksp, const char **vbp, size_t *vsp)
| Get a pair of the key and the value of the current record.
void | step ()
| Step the cursor to the next record.
## Public Attributes
TinyHashMap * | map_
| The container.
size_t | ridx_
| The current record index.
std::vector< char * > | recs_
| The current records.

## Detailed Description

Sorter of records.

## Constructor & Destructor Documentation

kyotocabinet::TinyHashMap::Sorter::Sorter | ( | TinyHashMap * | map | ) | `[explicit]`

Constructor.

Parameters:

  map | the container.

Note:
  This object will be invalidated when the map object is updated once.

kyotocabinet::TinyHashMap::Sorter::~Sorter | ( |  | ) |

Destructor.

## Member Function Documentation

const char* kyotocabinet::TinyHashMap::Sorter::get_key | ( | size_t * | sp | ) |

Get the key of the current record.

Parameters:

  sp | the pointer to the variable into which the size of the region of the return value is assigned.

Returns:
  the pointer to the key region of the current record, or NULL on failure.

const char* kyotocabinet::TinyHashMap::Sorter::get_value | ( | size_t * | sp | ) |

Get the value of the current record.

Parameters:

  sp | the pointer to the variable into which the size of the region of the return value is assigned.

Returns:
  the pointer to the value region of the current record, or NULL on failure.

const char* kyotocabinet::TinyHashMap::Sorter::get | ( | size_t * | ksp,
|  | const char ** | vbp,
|  | size_t * | vsp
| ) |  |

Get a pair of the key and the value of the current record.

Parameters:

  ksp | the pointer to the variable into which the size of the region of the return value is assigned.
  vbp | the pointer to the variable into which the pointer to the value region is assigned.
  vsp | the pointer to the variable into which the size of the value region is assigned.

Returns:
  the pointer to the key region, or NULL on failure.

void kyotocabinet::TinyHashMap::Sorter::step | ( |  | ) |

Step the cursor to the next record.

## Member Data Documentation

TinyHashMap* kyotocabinet::TinyHashMap::Sorter::map_

The container.

size_t kyotocabinet::TinyHashMap::Sorter::ridx_

The current record index.

std::vector<char*> kyotocabinet::TinyHashMap::Sorter::recs_

The current records.