leveldb
Public Member Functions | Public Attributes | List of all members
leveldb::MemTable::KeyComparator Struct Reference
Collaboration diagram for leveldb::MemTable::KeyComparator:
Collaboration graph
[legend]

Public Member Functions

 KeyComparator (const InternalKeyComparator &c)
 
int operator() (const char *a, const char *b) const
 

Public Attributes

const InternalKeyComparator comparator
 

Detailed Description

Definition at line 66 of file memtable.h.

Constructor & Destructor Documentation

§ KeyComparator()

leveldb::MemTable::KeyComparator::KeyComparator ( const InternalKeyComparator c)
inlineexplicit

Definition at line 68 of file memtable.h.

68 : comparator(c) { }
const InternalKeyComparator comparator
Definition: memtable.h:67
Here is the call graph for this function:

Member Function Documentation

§ operator()()

int leveldb::MemTable::KeyComparator::operator() ( const char *  a,
const char *  b 
) const

Definition at line 33 of file memtable.cc.

34  {
35  // Internal keys are encoded as length-prefixed strings.
36  Slice a = GetLengthPrefixedSlice(aptr);
37  Slice b = GetLengthPrefixedSlice(bptr);
38  return comparator.Compare(a, b);
39 }
virtual int Compare(const Slice &a, const Slice &b) const
Definition: dbformat.cc:50
static Slice GetLengthPrefixedSlice(const char *data)
Definition: memtable.cc:14
const InternalKeyComparator comparator
Definition: memtable.h:67
Here is the call graph for this function:
Here is the caller graph for this function:

Member Data Documentation

§ comparator

const InternalKeyComparator leveldb::MemTable::KeyComparator::comparator

Definition at line 67 of file memtable.h.


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