ddc
Public Member Functions | Private Attributes | List of all members
CItemIndexForLoading Class Reference

CItemIndexForLoading holds all occurrences of one index item (token, morph. pattern...) on the index stage. More...

#include <IndexSetForLoadingStage.h>

Public Member Functions

size_t GetIndexItemOffset () const
 gets the reference to the index item More...
 
void SetIndexItemOffset (size_t Value)
 sets the reference to the index item More...
 
vector< CTokenNo > * GetOccurs ()
 gets vector of occurrences More...
 
const vector< CTokenNo > * GetOccurs () const
 gets vector of occurrences (const) More...
 
size_t GetOccursSize () const
 
bool InitOccurs ()
 initializes vector of occurrences More...
 
void FreeOccurs ()
 deletes vector of occurrences More...
 
bool WriteOccurrences (FILE *fp) const
 writes vector of occurrences to a file More...
 
bool CheckOccurrences (CTokenNo EndTokenNo) const
 checks the order of occurrences More...
 
void ClearOccurrences ()
 clears vector of occurrences to a file More...
 
bool ReadFromTemporalFile (FILE *fp)
 read vector of occurrences from a temporal file More...
 
void WriteToTemporalFile (FILE *fp) const
 write vector of occurrences to a temporal file More...
 

Private Attributes

vector< CTokenNo > * m_pCurrOccurs
 current vector of occurrences More...
 
size_t m_IndexItemOffset
 a reference to CStringIndexSet::m_StringBuffer More...
 

Detailed Description

CItemIndexForLoading holds all occurrences of one index item (token, morph. pattern...) on the index stage.

There are only two members: m_pCurrOccurs and m_IndexItemOffset. Member m_pCurrOccurs is a pointer to the vector of occurrences of an indexed string. We use here pointers because we are going to create vector<CItemIndexForLoading>, and pointers can help us to avoid copying all occurrences each time when an item is inserted to vector<CItemIndexForLoading>. Member m_IndexItemOffset is an reference to CIndexSetForLoadingStage::m_StringBuffer

Member Function Documentation

◆ GetIndexItemOffset()

size_t CItemIndexForLoading::GetIndexItemOffset ( ) const
inline

gets the reference to the index item

References m_IndexItemOffset.

Referenced by CIndexSetForLoadingStage::AddMemoryLoadIndexToMainLoadIndex(), CIndexSetForQueryingStage::AddOneIndexItem(), and CStringIndexSet::UnionIndexSets().

Here is the caller graph for this function:

◆ SetIndexItemOffset()

void CItemIndexForLoading::SetIndexItemOffset ( size_t  Value)
inline

sets the reference to the index item

Referenced by CIndexSetForLoadingStage::InsertToInputLoadIndex(), and CStringIndexSet::UnionIndexSets().

Here is the caller graph for this function:

◆ GetOccurs() [1/2]

vector<CTokenNo>* CItemIndexForLoading::GetOccurs ( )
inline

◆ GetOccurs() [2/2]

const vector<CTokenNo>* CItemIndexForLoading::GetOccurs ( ) const
inline

gets vector of occurrences (const)

References m_pCurrOccurs.

◆ GetOccursSize()

size_t CItemIndexForLoading::GetOccursSize ( ) const
inline

References CheckOccurrences(), ClearOccurrences(), FreeOccurs(), InitOccurs(), ReadFromTemporalFile(), WriteOccurrences(), and WriteToTemporalFile().

Referenced by CIndexSetForQueryingStage::AddOneIndexItem().

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

◆ InitOccurs()

bool CItemIndexForLoading::InitOccurs ( )

◆ FreeOccurs()

void CItemIndexForLoading::FreeOccurs ( )

deletes vector of occurrences

References m_pCurrOccurs.

Referenced by CIndexSetForLoadingStage::AddMemoryLoadIndexToMainLoadIndex(), CStringIndexSet::ConvertLoadIndexToWorkingIndex(), GetOccursSize(), and CStringIndexSet::UnionIndexSets().

Here is the caller graph for this function:

◆ WriteOccurrences()

bool CItemIndexForLoading::WriteOccurrences ( FILE *  fp) const

writes vector of occurrences to a file

References m_pCurrOccurs, and WriteVectorInner().

Referenced by CIndexSetForQueryingStage::AddOneIndexItem(), and GetOccursSize().

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

◆ CheckOccurrences()

bool CItemIndexForLoading::CheckOccurrences ( CTokenNo  EndTokenNo) const

checks the order of occurrences

References ErrorMessage(), Format(), and m_pCurrOccurs.

Referenced by CIndexSetForQueryingStage::AddOneIndexItem(), and GetOccursSize().

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

◆ ClearOccurrences()

void CItemIndexForLoading::ClearOccurrences ( )

clears vector of occurrences to a file

References ClearVector(), and m_pCurrOccurs.

Referenced by GetOccursSize().

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

◆ ReadFromTemporalFile()

bool CItemIndexForLoading::ReadFromTemporalFile ( FILE *  fp)

read vector of occurrences from a temporal file

References FTell(), m_IndexItemOffset, m_pCurrOccurs, and ReadVectorInner().

Referenced by CIndexSetForLoadingStage::AddMemoryLoadIndexToMainLoadIndex(), CStringIndexSet::ConvertLoadIndexToWorkingIndex(), and GetOccursSize().

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

◆ WriteToTemporalFile()

void CItemIndexForLoading::WriteToTemporalFile ( FILE *  fp) const

write vector of occurrences to a temporal file

References m_IndexItemOffset, m_pCurrOccurs, and WriteVectorInner().

Referenced by CIndexSetForLoadingStage::AddMemoryLoadIndexToMainLoadIndex(), and GetOccursSize().

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

Member Data Documentation

◆ m_pCurrOccurs

vector< CTokenNo >* CItemIndexForLoading::m_pCurrOccurs
private

◆ m_IndexItemOffset

size_t CItemIndexForLoading::m_IndexItemOffset
private

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