ddc
Public Member Functions | Public Attributes | List of all members
NavHintKey Struct Reference

navigation hint-key for branch server get_first_hits() "paging" More...

#include <NavHint.h>

Public Member Functions

 NavHintKey (const string &qstr="", const size_t hitno=0)
 default constructor More...
 
void clear ()
 clear the object More...
 
bool operator< (const NavHintKey &X) const
 
bool operator== (const NavHintKey &X) const
 equality operator (for debugging) More...
 
void assign (const string &qstr, const size_t hitno=0)
 verbose assignment More...
 
NavHintKeyoperator= (const NavHintKey &X)
 assignment operator More...
 
string toString () const
 debug: native stringification More...
 
void fromString (const char *s)
 debug: native decoding from string More...
 
string toJson () const
 debug: JSON stringification More...
 

Public Attributes

string m_QueryStr
 original query string More...
 
size_t m_HitNo
 maximum logical hit number covered w.r.t. local corpus More...
 

Detailed Description

navigation hint-key for branch server get_first_hits() "paging"

Constructor & Destructor Documentation

◆ NavHintKey()

NavHintKey::NavHintKey ( const string &  qstr = "",
const size_t  hitno = 0 
)
inline

default constructor

Member Function Documentation

◆ clear()

void NavHintKey::clear ( void  )
inline

clear the object

References ClearString().

Referenced by CRunQueryData::Clear(), fromString(), and NavHint::fromString().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ operator<()

bool NavHintKey::operator< ( const NavHintKey X) const
inline

comparison operator, for use with map<>

  • wraps m_QueryStr < X.m_QueryStr || m_HitNo > X.m_HitNo
  • m_HitNo comparison is reversed so we can use map<>::lower_bound()

References m_HitNo, and m_QueryStr.

◆ operator==()

bool NavHintKey::operator== ( const NavHintKey X) const
inline

equality operator (for debugging)

References m_HitNo, and m_QueryStr.

◆ assign()

void NavHintKey::assign ( const string &  qstr,
const size_t  hitno = 0 
)
inline

verbose assignment

Referenced by CRunQueryData::Init(), and operator=().

Here is the caller graph for this function:

◆ operator=()

NavHintKey& NavHintKey::operator= ( const NavHintKey X)
inline

assignment operator

References assign(), m_HitNo, and m_QueryStr.

Here is the call graph for this function:

◆ toString()

string NavHintKey::toString ( void  ) const
inline

debug: native stringification

References Format(), fromString(), and toJson().

Referenced by NavHintCache::insert(), NavHintCache::lower_bound(), and NavHint::update().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ fromString()

void NavHintKey::fromString ( const char *  s)

debug: native decoding from string

References clear(), m_HitNo, and m_QueryStr.

Referenced by NavHint::NavHint(), NavHint::operator=(), toString(), and NavHint::update().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ toJson()

string NavHintKey::toJson ( ) const

debug: JSON stringification

References Format(), jsonStr(), m_HitNo, and m_QueryStr.

Referenced by NavHintCache::insert(), toString(), NavHint::update(), and CDDCBranchServer::UpdateNavCache().

Here is the call graph for this function:
Here is the caller graph for this function:

Member Data Documentation

◆ m_QueryStr

string NavHintKey::m_QueryStr

◆ m_HitNo

size_t NavHintKey::m_HitNo

maximum logical hit number covered w.r.t. local corpus

Referenced by fromString(), CDDCBranchServer::GetHitContexts(), operator<(), operator=(), operator==(), and toJson().


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