ddc
Public Member Functions | Public Attributes | Protected Member Functions | List of all members
CFreeBiblIndex Class Reference

#include <FreeBiblIndex.h>

Inheritance diagram for CFreeBiblIndex:
Inheritance graph
[legend]
Collaboration diagram for CFreeBiblIndex:
Collaboration graph
[legend]

Public Member Functions

 CFreeBiblIndex ()
 
virtual ~CFreeBiblIndex ()
 
string GetDescriptionStr () const
 
virtual int GetIntegerValue (DWORD FileNo) const
 
virtual void clear ()
 
virtual string GetStringValue (DWORD FileNo) const
 
virtual void ReadFromDisk (string Path, DWORD FileBreaksSize, bool useMMap=false)
 
virtual void CreateUnion (const string &Path, const vector< const CFreeBiblIndex *> &Indices, const vector< size_t > &FileCounts)
 
virtual void CreatePartitions (vector< CFreeBiblIndex *> &Parts, const vector< string > &Paths, const vector< DWORD > &EndFileNo) const
 
virtual void RegisterBiblStringItemId (const string &Value)
 
virtual bool DeleteBiblFiles (string Path) const
 
virtual bool ConvertAndSaveToDiskAfterIndexing (string Path)
 
virtual string GetTypeStr () const
 
virtual const string & GetXpathStr () const
 
virtual CFreeBiblIndexTypeId GetTypeId () const
 return bibl-field subtype identifier More...
 
virtual bool GetFilterBounds (CDDCFilterWithBounds &Filter, const string &LoValue, const string &HiValue) const
 
virtual bool GetFilterValue (CDDCFilterWithBounds &Filter, const string &Value) const
 
virtual bool GetFilterValues (CDDCFilterWithBounds &Filter, const string &Regex) const
 
virtual bool GetFilterValues (CDDCFilterWithBounds &Filter, const set< string > &Values) const
 initialize CDDCFilterWithBounds for a set of target values (default throws errLogic) More...
 
virtual bool FileMatches (DWORD FileNo, const CDDCFilterWithBounds &Filter) const
 test whether a given file matches the filter condition (for count(*) queries) More...
 
virtual size_t size (void) const
 for server info More...
 
virtual DWORD GetIntegerLowerBound (const string &Value) const
 
- Public Member Functions inherited from CFreeBiblIndexInterface
virtual ~CFreeBiblIndexInterface ()
 

Public Attributes

string m_Name
 the name of the index (from options file) More...
 
string m_Xpath
 the XPath to this information (from options file) More...
 
ddcVecFile< DWORDm_ValuesForEachFile
 integer references to m_Values for each corpus file More...
 
bool m_bShowInHeader
 should DDC show this field for each header? More...
 
RML_RE::Optionsm_pRegexOpts
 regex options More...
 

Protected Member Functions

string GetIndexFileName (string Path) const
 

Constructor & Destructor Documentation

◆ CFreeBiblIndex()

CFreeBiblIndex::CFreeBiblIndex ( )

◆ ~CFreeBiblIndex()

CFreeBiblIndex::~CFreeBiblIndex ( )
virtual

Member Function Documentation

◆ GetIndexFileName()

string CFreeBiblIndex::GetIndexFileName ( string  Path) const
protected

References m_Name, and MakeFName().

Referenced by ConvertAndSaveToDiskAfterIndexing(), CreatePartitions(), CFreeBiblStringIndex::CreatePartitions(), CreateUnion(), CFreeBiblStringIndex::CreateUnion(), DeleteBiblFiles(), and ReadFromDisk().

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

◆ GetDescriptionStr()

string CFreeBiblIndex::GetDescriptionStr ( ) const

References Format(), FreeBiblAttribOptionFieldName, GetTypeStr(), GetXpathStr(), m_bShowInHeader, and m_Name.

Here is the call graph for this function:

◆ GetIntegerValue()

int CFreeBiblIndex::GetIntegerValue ( DWORD  FileNo) const
virtual

Reimplemented in CFreeBiblStringConstant.

References m_ValuesForEachFile.

Referenced by FileMatches(), and CBiblIndex::InitSortByBiblIntegerField().

Here is the caller graph for this function:

◆ clear()

void CFreeBiblIndex::clear ( void  )
virtual

Reimplemented in CFreeBiblStringConstant, and CFreeBiblStringIndex.

References ddcVecFile< T >::clear(), m_bShowInHeader, and m_ValuesForEachFile.

Referenced by CFreeBiblStringIndex::clear(), and CFreeBiblStringConstant::setValue().

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

◆ GetStringValue()

string CFreeBiblIndex::GetStringValue ( DWORD  FileNo) const
virtual

◆ ReadFromDisk()

void CFreeBiblIndex::ReadFromDisk ( string  Path,
DWORD  FileBreaksSize,
bool  useMMap = false 
)
virtual

Reimplemented in CFreeBiblStringConstant, and CFreeBiblStringIndex.

References Format(), GetIndexFileName(), m_Name, m_ValuesForEachFile, ddcVecFile< T >::open(), and ddcVecFile< T >::size().

Referenced by CFreeBiblStringIndex::ReadFromDisk().

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

◆ CreateUnion()

void CFreeBiblIndex::CreateUnion ( const string &  Path,
const vector< const CFreeBiblIndex *> &  Indices,
const vector< size_t > &  FileCounts 
)
virtual

◆ CreatePartitions()

void CFreeBiblIndex::CreatePartitions ( vector< CFreeBiblIndex *> &  Parts,
const vector< string > &  Paths,
const vector< DWORD > &  EndFileNo 
) const
virtual

Reimplemented in CFreeBiblStringConstant, and CFreeBiblStringIndex.

References ddcVecFile< T >::begin(), GetIndexFileName(), and m_ValuesForEachFile.

Referenced by CConcXml::SplitBibliography().

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

◆ RegisterBiblStringItemId()

void CFreeBiblIndex::RegisterBiblStringItemId ( const string &  Value)
virtual

Reimplemented in CFreeBiblStringIndex.

References m_ValuesForEachFile, and ddcVecFile< T >::push_back().

Here is the call graph for this function:

◆ DeleteBiblFiles()

bool CFreeBiblIndex::DeleteBiblFiles ( string  Path) const
virtual

Reimplemented in CFreeBiblStringIndex.

References GetIndexFileName().

Referenced by CFreeBiblStringIndex::DeleteBiblFiles().

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

◆ ConvertAndSaveToDiskAfterIndexing()

bool CFreeBiblIndex::ConvertAndSaveToDiskAfterIndexing ( string  Path)
virtual

Reimplemented in CFreeBiblStringConstant, and CFreeBiblStringIndex.

References ddcVecFile< T >::ensureVec(), GetIndexFileName(), m_ValuesForEachFile, ddcVecFile< T >::m_vec, and WriteVector().

Referenced by CFreeBiblStringIndex::ConvertAndSaveToDiskAfterIndexing().

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

◆ GetTypeStr()

string CFreeBiblIndex::GetTypeStr ( ) const
virtual

Reimplemented in CFreeBiblStringConstant, and CFreeBiblStringIndex.

References IntegerTypeStr.

Referenced by GetDescriptionStr().

Here is the caller graph for this function:

◆ GetXpathStr()

const string & CFreeBiblIndex::GetXpathStr ( ) const
virtual

Reimplemented in CFreeBiblStringConstant.

References m_Xpath.

Referenced by CBiblIndex::FreeBiblMapToJson(), and GetDescriptionStr().

Here is the caller graph for this function:

◆ GetTypeId()

CFreeBiblIndexTypeId CFreeBiblIndex::GetTypeId ( ) const
virtual

return bibl-field subtype identifier

Reimplemented in CFreeBiblStringConstant, and CFreeBiblStringIndex.

References cfbiInteger.

Referenced by CFreeBiblStringConstant::CreateUnion(), CBiblIndex::FreeBiblMapToJson(), CQFSort::GetBiblConstant(), and CBiblIndex::GetBiblFieldTypeId().

Here is the caller graph for this function:

◆ GetFilterBounds()

bool CFreeBiblIndex::GetFilterBounds ( CDDCFilterWithBounds Filter,
const string &  LoValue,
const string &  HiValue 
) const
virtual

initialize CDDCFilterWithBounds for a literal target or regex value (default treats Value as integer string and sets range)

Parameters
Filterfilter to populate
LoValuelower bound value to seek (inclusive)
HiValueupper bound value to seek (exclusive)

Reimplemented in CFreeBiblStringIndex.

References CDDCFilterWithBounds::m_BiblIndex, CDDCFilterWithBounds::m_bSet, CDDCFilterWithBounds::m_KeyHi, and CDDCFilterWithBounds::m_KeyLo.

Referenced by CBiblIndex::GetFilterBounds().

Here is the caller graph for this function:

◆ GetFilterValue()

bool CFreeBiblIndex::GetFilterValue ( CDDCFilterWithBounds Filter,
const string &  Value 
) const
virtual

initialize CDDCFilterWithBounds for a literal target value (treats Value as integer string and sets singleton range)

Parameters
Filterfilter to populate
Valuevalue to seek
  • formerly GetValueForDDCFilter() with isRegex==false (default)

Reimplemented in CFreeBiblStringIndex.

References CHitSortKey::i, CDDCFilterWithBounds::m_BiblIndex, CDDCFilterWithBounds::m_bSet, CDDCFilterWithBounds::m_KeyHi, and CDDCFilterWithBounds::m_KeyLo.

Referenced by CBiblIndex::GetFilterValue().

Here is the caller graph for this function:

◆ GetFilterValues() [1/2]

bool CFreeBiblIndex::GetFilterValues ( CDDCFilterWithBounds Filter,
const string &  Regex 
) const
virtual

initialize CDDCFilterWithBounds for a target regex (default throws errLogic)

  • formerly GetValueForDDCFilter() with isRegex==true

Reimplemented in CFreeBiblStringIndex.

References errLogic, and m_Name.

Referenced by CBiblIndex::GetFilterValues().

Here is the caller graph for this function:

◆ GetFilterValues() [2/2]

bool CFreeBiblIndex::GetFilterValues ( CDDCFilterWithBounds Filter,
const set< string > &  Values 
) const
virtual

initialize CDDCFilterWithBounds for a set of target values (default throws errLogic)

Reimplemented in CFreeBiblStringIndex.

References errLogic, and m_Name.

◆ FileMatches()

bool CFreeBiblIndex::FileMatches ( DWORD  FileNo,
const CDDCFilterWithBounds Filter 
) const
virtual

test whether a given file matches the filter condition (for count(*) queries)

References GetIntegerValue(), CHitSortKey::i, CDDCFilterWithBounds::m_bSet, CDDCFilterWithBounds::m_KeyHi, CDDCFilterWithBounds::m_KeyLo, and CDDCFilterWithBounds::m_SatisfiedValues.

Referenced by CBiblIndex::FileMatches().

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

◆ size()

virtual size_t CFreeBiblIndex::size ( void  ) const
inlinevirtual

for server info

Reimplemented in CFreeBiblStringIndex.

References GetIntegerLowerBound().

Referenced by CBiblIndex::FreeBiblMapToJson(), and CFreeBiblStringIndex::WriteBiblStringItems().

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

◆ GetIntegerLowerBound()

DWORD CFreeBiblIndex::GetIntegerLowerBound ( const string &  Value) const
virtual

for key-based pruning (v2.1.9): map a single value-string to its value-id

  • default implementation just calls hex2int(Value)

Implements CFreeBiblIndexInterface.

Reimplemented in CFreeBiblStringIndex.

References hex2int().

Referenced by size(), and CFreeBiblStringIndex::size().

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

Member Data Documentation

◆ m_Name

string CFreeBiblIndex::m_Name

◆ m_Xpath

string CFreeBiblIndex::m_Xpath

◆ m_ValuesForEachFile

ddcVecFile<DWORD> CFreeBiblIndex::m_ValuesForEachFile

◆ m_bShowInHeader

bool CFreeBiblIndex::m_bShowInHeader

◆ m_pRegexOpts

RML_RE::Options* CFreeBiblIndex::m_pRegexOpts

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