Classes | Public Member Functions | Protected Member Functions | Private Member Functions | Private Attributes

CHitBorders Class Reference

#include <HitBorder.h>

Inheritance diagram for CHitBorders:
Inheritance graph
[legend]

List of all members.

Classes

Public Member Functions

Protected Member Functions

Private Member Functions

Private Attributes


Detailed Description

Class CHitBorders contains all break collections and all page breaks.


Constructor & Destructor Documentation

CHitBorders::CHitBorders (  ) 

Member Function Documentation

string CHitBorders::GetPageBreaksFileName ( string  Path  )  const [private]

returns the file name for page breaks

References MakeFName().

Referenced by BordersEndIndexing(), LoadHitBorders(), RemoveHitBordersFileAndClear(), and UniteBorders().

Here is the call graph for this function:

Here is the caller graph for this function:

string CHitBorders::GetShortNameByName ( const string &  BreakName  )  const [private]

returns the short name of a break collection by the long or the short name

References m_Breaks.

Referenced by ProcessHitTypeStrInQueryStr().

Here is the caller graph for this function:

bool CHitBorders::StartIndexing ( string  Path  )  [protected]

opens for writing all CBreakCollectionDescr::m_FileForIndexing from m_Breaks

References ErrorMessage(), Format(), CHitBorders::CBreakCollection::GetBreakFileName(), m_Breaks, CHitBorders::CBreakCollection::m_FileForIndexing, and m_PageBreaks.

Referenced by CConcIndexator::StartIndexing().

Here is the call graph for this function:

Here is the caller graph for this function:

bool CHitBorders::RemoveHitBordersFileAndClear ( string  Path  )  [protected]

deletes all break files

References FileExists(), GetPageBreaksFileName(), m_Breaks, and m_PageBreaks.

Referenced by CConcIndexator::DestroyIndex().

Here is the call graph for this function:

Here is the caller graph for this function:

void CHitBorders::AddPageBreak ( const CPageNumber P  )  [protected]
bool CHitBorders::UniteBorders ( const CHitBorders H1,
const CHitBorders H2,
const DWORD  EndTokenNo1,
const string &  Path 
) [protected]
bool CHitBorders::RegisterBreak ( string  ShortName,
string  LongName 
) [protected]

References ErrorMessage(), m_Breaks, m_LastTextAreaBreaks, CHitBorders::CBreakCollection::m_LongName, CHitBorders::CBreakCollection::m_ShortName, and m_ShortName2BreakCollection.

Referenced by RegisterBorderIndices(), and UniteBorders().

Here is the call graph for this function:

Here is the caller graph for this function:

string CHitBorders::GetBreakCollectionShortName ( size_t  i  )  const [protected]

References m_Breaks.

Referenced by CConcIndexator::SaveOptionsToString().

Here is the caller graph for this function:

int CHitBorders::GetBreakCollectionIndexByName ( string  ShortName  )  const [protected]
bool CHitBorders::AddBreakByIndex ( DWORD  BreakCollectionNo,
const CTokenNo B 
) [protected]

References m_Breaks, CHitBorders::CBreakCollection::m_FileForIndexing, m_LastTextAreaBreaks, and save_to_bytes().

Referenced by AddBreakByName(), EndTextAreaBorders(), CConcIndexator::IndexOneTableTextArea(), and CConcIndexator::IndexTextOrHtmlFile().

Here is the call graph for this function:

Here is the caller graph for this function:

string CHitBorders::GetBorderIndicesString (  )  const

return the string representation of break collection descriptions

References Format(), m_Breaks, m_DefaultBreakName, CHitBorders::CBreakCollection::m_LongName, CHitBorders::CBreakCollection::m_ShortName, m_ShortName2BreakCollection, PredefinedFileBreakName, and Trim().

Referenced by CConcIndexator::LoadOptionsFromString(), CConcIndexator::SaveOptionsToString(), and UniteBorders().

Here is the call graph for this function:

Here is the caller graph for this function:

vector< string > CHitBorders::GetBorderIndicesStringVector (  )  const

the same as GetBorderIndicesString, but each break collection description is written into a separate vector element

References m_Breaks, CHitBorders::CBreakCollection::m_LongName, and m_ShortName2BreakCollection.

string CHitBorders::ProcessHitTypeStrInQueryStr ( string &  Query  )  const

returns the short name of the break collection, which is specified in the input query(if nothing is specified, it returns m_DefaultBreakName)

References GetShortNameByName(), and m_DefaultBreakName.

Referenced by CQueryParser::ParseQuery().

Here is the call graph for this function:

Here is the caller graph for this function:

const vector< CTokenNo > * CHitBorders::GetBreaksByName ( const string &  ShortName  )  const

returns a break collection by a short name

References m_Breaks, and m_ShortName2BreakCollection.

Referenced by CConcHolder::SetHitType(), and UniteBorders().

Here is the caller graph for this function:

CTokenNo CHitBorders::GetCorpusEndTokenNo (  )  const

returns the value of the last file break (which should be equal to the last value of any break collection)

References GetFileBreaks(), and m_FileBreakCollectionNo.

Referenced by CConcIndexator::CalculateSearchPeriods(), CConcIndexator::CreateAsUnion(), CConcIndexatorInvoker::FinalizeIndex(), and CConcHolder::InitLessByRank().

Here is the call graph for this function:

Here is the caller graph for this function:

const vector< CTokenNo > & CHitBorders::GetFileBreaks (  )  const
CTokenNo CHitBorders::GetFileStartTokenNo ( size_t  FileNo  )  const

returns the start position of corpus file FileNo

References GetFileBreaks(), and m_FileBreakCollectionNo.

Referenced by CConcIndexator::CalculateSearchPeriods(), CConcHolder::GetContext(), and CConcHolder::GetContextJson().

Here is the call graph for this function:

Here is the caller graph for this function:

DWORD CHitBorders::GetPageNumber ( size_t  No  )  const

returns m_PageBreaks[No].m_PageNumber (see CPageNumber)

References m_PageBreaks, and UnknownPageNumber.

Referenced by CConcHolder::GenerateHitStrings().

Here is the caller graph for this function:

bool CHitBorders::IsRegisteredBreak ( const string &  ShortName  )  const

returns true if a short name is found in m_Breaks

References m_ShortName2BreakCollection.

Referenced by CConcIndexator::IndexOneTableTextArea().

Here is the caller graph for this function:

bool CHitBorders::RegisterBorderIndices ( const char *  IndicesStr  ) 

creates empty elements of m_Breaks by its string descriptions

References ErrorMessage(), Format(), m_Breaks, m_DefaultBreakName, m_FileBreakCollectionNo, m_LastTextAreaBreaks, m_ShortName2BreakCollection, PredefinedFileBreakName, PredefinedTableLineTag, PredefinedTextAreaBreakName, RegisterBreak(), Trim(), and StringTokenizer::val().

Referenced by CConcIndexator::LoadOptionsFromString().

Here is the call graph for this function:

Here is the caller graph for this function:

bool CHitBorders::LoadHitBorders ( string  Path  ) 

load break collections from the disk

References GetPageBreaksFileName(), m_Breaks, m_PageBreaks, and ReadVector().

Referenced by CConcIndexatorInvoker::FinalizeIndex(), and CConcIndexator::LoadProject().

Here is the call graph for this function:

Here is the caller graph for this function:

void CHitBorders::ConvertHitsToPageBreaks ( vector< CHit >::const_iterator  hits_begin,
vector< CHit >::const_iterator  hits_end,
const vector< CTokenNo > &  Breaks,
DwordVector PageBreaks 
) const

converts hits to page breaks, which contains this breaks

References m_PageBreaks.

Referenced by CConcHolder::GenerateHitStrings().

Here is the caller graph for this function:

bool CHitBorders::AddBreakByName ( const string &  ShortName,
const CTokenNo B 
)

adds one break to a collection identified by a short name (during indexing)

References AddBreakByIndex(), and m_ShortName2BreakCollection.

Referenced by CConcIndexatorInvoker::BuildIndex(), CConcIndexator::IndexMorphXml(), and CConcIndexator::IndexTextOrHtmlFile().

Here is the call graph for this function:

Here is the caller graph for this function:

bool CHitBorders::BordersEndIndexing ( string  Path  ) 

closes all CBreakCollectionDescr::m_FileForIndexing from m_Breaks (during indexing)

References GetPageBreaksFileName(), m_Breaks, m_PageBreaks, and WriteVector().

Referenced by CConcIndexatorInvoker::FinalizeIndex(), and CConcIndexator::TerminateIndexing().

Here is the call graph for this function:

Here is the caller graph for this function:

void CHitBorders::StartTextAreaBorders (  ) 

must be called before indexing each text area in order to create at least on break in each text area

References m_Breaks, and m_LastTextAreaBreaks.

Referenced by CConcIndexator::IndexOneTableTextArea().

Here is the caller graph for this function:

bool CHitBorders::EndTextAreaBorders ( DWORD  TextAreaEndTokenNo  ) 

must be called after indexing each text area in order to create at least on break in each text area

References AddBreakByIndex(), m_FileBreakCollectionNo, and m_LastTextAreaBreaks.

Referenced by CConcIndexator::IndexOneTableTextArea().

Here is the call graph for this function:

Here is the caller graph for this function:


Member Data Documentation

map<string,int> CHitBorders::m_ShortName2BreakCollection [private]

a quick reference to file breaks (which are also stored in m_Breaks)

Referenced by CHitBorders(), EndTextAreaBorders(), GetCorpusEndTokenNo(), GetFileBreaks(), GetFileStartTokenNo(), RegisterBorderIndices(), and UniteBorders().

The name of the default break collection (written in the options file).

Referenced by GetBorderIndicesString(), ProcessHitTypeStrInQueryStr(), RegisterBorderIndices(), and UniteBorders().


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