xapian-core  2.0.0
Public Member Functions | Private Member Functions | Private Attributes | List of all members
PrefixCompressedStringItor Class Reference

#include <prefix_compressed_strings.h>

+ Collaboration diagram for PrefixCompressedStringItor:

Public Member Functions

 PrefixCompressedStringItor (const std::string &s)
 Construct for glass. More...
 
 PrefixCompressedStringItor (const std::string &s, const std::string &key)
 Construct for honey. More...
 
const std::string & operator* () const
 
PrefixCompressedStringItor operator++ (int)
 
PrefixCompressedStringItoroperator++ ()
 
bool at_end () const
 

Private Member Functions

 PrefixCompressedStringItor (PrefixCompressedStringItor &o)
 
 PrefixCompressedStringItor (PrefixCompressedStringItor &&o)
 

Private Attributes

const unsigned char * p
 
size_t left
 
std::string current
 
int tail = 0
 Number of constant characters on the end of the value. More...
 

Detailed Description

Definition at line 38 of file prefix_compressed_strings.h.

Constructor & Destructor Documentation

◆ PrefixCompressedStringItor() [1/4]

PrefixCompressedStringItor::PrefixCompressedStringItor ( PrefixCompressedStringItor o)
inlineprivate

Definition at line 51 of file prefix_compressed_strings.h.

◆ PrefixCompressedStringItor() [2/4]

PrefixCompressedStringItor::PrefixCompressedStringItor ( PrefixCompressedStringItor &&  o)
inlineprivate

Definition at line 54 of file prefix_compressed_strings.h.

◆ PrefixCompressedStringItor() [3/4]

PrefixCompressedStringItor::PrefixCompressedStringItor ( const std::string &  s)
inlineexplicit

Construct for glass.

Parameters
sthe encoded data.

Definition at line 62 of file prefix_compressed_strings.h.

References left, operator++(), and p.

◆ PrefixCompressedStringItor() [4/4]

PrefixCompressedStringItor::PrefixCompressedStringItor ( const std::string &  s,
const std::string &  key 
)
inline

Construct for honey.

Parameters
sthe encoded data.
keythe key

Definition at line 77 of file prefix_compressed_strings.h.

References Assert, AssertRel, current, Honey::KEY_PREFIX_BOOKEND, Honey::KEY_PREFIX_HEAD, Honey::KEY_PREFIX_TAIL, Honey::KEY_PREFIX_WORD, left, operator++(), p, and tail.

Member Function Documentation

◆ at_end()

bool PrefixCompressedStringItor::at_end ( ) const
inline

◆ operator*()

const std::string& PrefixCompressedStringItor::operator* ( ) const
inline

Definition at line 104 of file prefix_compressed_strings.h.

References current.

◆ operator++() [1/2]

PrefixCompressedStringItor& PrefixCompressedStringItor::operator++ ( )
inline

Definition at line 114 of file prefix_compressed_strings.h.

References current, left, MAGIC_XOR_VALUE, p, rare, tail, and usual.

Referenced by operator++(), and PrefixCompressedStringItor().

◆ operator++() [2/2]

PrefixCompressedStringItor PrefixCompressedStringItor::operator++ ( int  )
inline

Definition at line 108 of file prefix_compressed_strings.h.

References operator++().

Member Data Documentation

◆ current

std::string PrefixCompressedStringItor::current
private

Definition at line 41 of file prefix_compressed_strings.h.

Referenced by operator*(), operator++(), and PrefixCompressedStringItor().

◆ left

size_t PrefixCompressedStringItor::left
private

Definition at line 40 of file prefix_compressed_strings.h.

Referenced by operator++(), and PrefixCompressedStringItor().

◆ p

const unsigned char* PrefixCompressedStringItor::p
private

Definition at line 39 of file prefix_compressed_strings.h.

Referenced by at_end(), operator++(), and PrefixCompressedStringItor().

◆ tail

int PrefixCompressedStringItor::tail = 0
private

Number of constant characters on the end of the value.

Valid values once iterating are 0, 1, 2. Before iteration, can be 0 (no head or tail), 2 (two tails), -1 (one head, one tail -> 1 once iterating) or -2 (two heads, no tail -> 0 once iterating).

Definition at line 49 of file prefix_compressed_strings.h.

Referenced by operator++(), and PrefixCompressedStringItor().


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