JASSv2
Public Member Functions | Public Attributes | List of all members
JASS::index_manager::delegate Class Referenceabstract

Base class for the callback function called by iterate. More...

#include <index_manager.h>

Inheritance diagram for JASS::index_manager::delegate:
Inheritance graph
[legend]

Public Member Functions

 delegate (size_t documents)
 Destructor.
 
virtual ~delegate ()
 Destructor.
 
virtual void operator() (const slice &term, const index_postings &postings, compress_integer::integer document_frequency, compress_integer::integer *document_ids, index_postings_impact::impact_type *term_frequencies)=0
 The callback function to serialise the postings (given the term) is operator(). More...
 
virtual void operator() (size_t document_id, const slice &primary_key)=0
 The callback function to serialise the primary keys (external document ids) is operator(). More...
 
virtual void finish (void)=0
 Finish up any serialising that needs to be done.
 

Public Attributes

size_t documents
 The number of documents in the collection.
 

Detailed Description

Base class for the callback function called by iterate.

Member Function Documentation

◆ operator()() [1/2]

virtual void JASS::index_manager::delegate::operator() ( const slice term,
const index_postings postings,
compress_integer::integer  document_frequency,
compress_integer::integer document_ids,
index_postings_impact::impact_type term_frequencies 
)
pure virtual

The callback function to serialise the postings (given the term) is operator().

Parameters
term[in] The term name.
postings[in] The postings lists.
document_frequency[in] The document frequency of the term
document_ids[in] An array (of length document_frequency) of document ids.
term_frequencies[in] An array (of length document_frequency) of term frequencies (corresponding to document_ids).

Implemented in JASS::serialise_jass_v1, JASS::index_manager_sequential::delegate, JASS::quantize< RANKER >, JASS::serialise_jass_v2, JASS::serialise_ci, JASS::serialise_integers, JASS::serialise_forward_index, and JASS::quantize_none< RANKER >.

◆ operator()() [2/2]

virtual void JASS::index_manager::delegate::operator() ( size_t  document_id,
const slice primary_key 
)
pure virtual

The callback function to serialise the primary keys (external document ids) is operator().

Parameters
document_id[in] The internal document identfier.
primary_key[in] This document's primary key (external document identifier).

Implemented in JASS::serialise_jass_v1, JASS::quantize< RANKER >, JASS::index_manager_sequential::delegate, JASS::serialise_ci, JASS::serialise_integers, and JASS::serialise_forward_index.


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