Fabcoin Core  0.16.2
P2P Digital Currency
Public Member Functions | Public Attributes | List of all members
dev::NibbleSlice Struct Reference

Nibble-based view on a bytesConstRef. More...

#include <TrieCommon.h>

Collaboration diagram for dev::NibbleSlice:
[legend]

Public Member Functions

 NibbleSlice (bytesConstRef _data=bytesConstRef(), unsigned _offset=0)
 
byte operator[] (unsigned _index) const
 
unsigned size () const
 
bool empty () const
 
NibbleSlice mid (unsigned _index) const
 
void clear ()
 
bool contains (NibbleSlice _k) const
 
unsigned shared (NibbleSlice _k) const
 
bool isEarlierThan (NibbleSlice _k) const
 Determine if we, a full key, are situated prior to a particular key-prefix. More...
 
bool operator== (NibbleSlice _k) const
 
bool operator!= (NibbleSlice _s) const
 

Public Attributes

bytesConstRef data
 
unsigned offset
 

Detailed Description

Nibble-based view on a bytesConstRef.

Definition at line 52 of file TrieCommon.h.

Constructor & Destructor Documentation

dev::NibbleSlice::NibbleSlice ( bytesConstRef  _data = bytesConstRef(),
unsigned  _offset = 0 
)
inline

Definition at line 57 of file TrieCommon.h.

Here is the caller graph for this function:

Member Function Documentation

void dev::NibbleSlice::clear ( )
inline

Definition at line 62 of file TrieCommon.h.

Here is the call graph for this function:

Here is the caller graph for this function:

bool dev::NibbleSlice::contains ( NibbleSlice  _k) const
inline
Returns
true iff _k is a prefix of this.

Definition at line 65 of file TrieCommon.h.

Here is the call graph for this function:

Here is the caller graph for this function:

bool dev::NibbleSlice::empty ( ) const
inline

Definition at line 60 of file TrieCommon.h.

Here is the call graph for this function:

Here is the caller graph for this function:

bool dev::NibbleSlice::isEarlierThan ( NibbleSlice  _k) const
inline

Determine if we, a full key, are situated prior to a particular key-prefix.

Parameters
_kThe prefix.
Returns
true if we are strictly prior to the prefix.

Definition at line 73 of file TrieCommon.h.

Here is the call graph for this function:

Here is the caller graph for this function:

NibbleSlice dev::NibbleSlice::mid ( unsigned  _index) const
inline

Definition at line 61 of file TrieCommon.h.

Here is the call graph for this function:

Here is the caller graph for this function:

bool dev::NibbleSlice::operator!= ( NibbleSlice  _s) const
inline

Definition at line 86 of file TrieCommon.h.

Here is the call graph for this function:

bool dev::NibbleSlice::operator== ( NibbleSlice  _k) const
inline

Definition at line 85 of file TrieCommon.h.

Here is the call graph for this function:

Here is the caller graph for this function:

byte dev::NibbleSlice::operator[] ( unsigned  _index) const
inline

Definition at line 58 of file TrieCommon.h.

Here is the call graph for this function:

unsigned dev::NibbleSlice::shared ( NibbleSlice  _k) const
inline
Returns
the number of shared nibbles at the beginning of this and _k.

Definition at line 67 of file TrieCommon.h.

Here is the call graph for this function:

Here is the caller graph for this function:

unsigned dev::NibbleSlice::size ( ) const
inline

Definition at line 59 of file TrieCommon.h.

Here is the call graph for this function:

Here is the caller graph for this function:

Member Data Documentation

bytesConstRef dev::NibbleSlice::data

Definition at line 54 of file TrieCommon.h.

unsigned dev::NibbleSlice::offset

Definition at line 55 of file TrieCommon.h.


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