ddc
|
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... | |
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
|
inline |
gets the reference to the index item
References m_IndexItemOffset.
Referenced by CIndexSetForLoadingStage::AddMemoryLoadIndexToMainLoadIndex(), CIndexSetForQueryingStage::AddOneIndexItem(), and CStringIndexSet::UnionIndexSets().
|
inline |
sets the reference to the index item
Referenced by CIndexSetForLoadingStage::InsertToInputLoadIndex(), and CStringIndexSet::UnionIndexSets().
|
inline |
gets vector of occurrences
References m_pCurrOccurs.
Referenced by CIndexSetForLoadingStage::AddMemoryLoadIndexToMainLoadIndex(), CIndexSetForQueryingStage::AddOneIndexItem(), CIndexSetForLoadingStage::InsertToInputLoadIndex(), CIndexSetForLoadingStage::SortInputAndMemoryIndices(), and CStringIndexSet::UnionIndexSets().
|
inline |
gets vector of occurrences (const)
References m_pCurrOccurs.
|
inline |
References CheckOccurrences(), ClearOccurrences(), FreeOccurs(), InitOccurs(), ReadFromTemporalFile(), WriteOccurrences(), and WriteToTemporalFile().
Referenced by CIndexSetForQueryingStage::AddOneIndexItem().
bool CItemIndexForLoading::InitOccurs | ( | ) |
initializes vector of occurrences
References m_pCurrOccurs.
Referenced by CIndexSetForLoadingStage::AddMemoryLoadIndexToMainLoadIndex(), CStringIndexSet::ConvertLoadIndexToWorkingIndex(), GetOccursSize(), CIndexSetForLoadingStage::InsertToInputLoadIndex(), and CStringIndexSet::UnionIndexSets().
void CItemIndexForLoading::FreeOccurs | ( | ) |
deletes vector of occurrences
References m_pCurrOccurs.
Referenced by CIndexSetForLoadingStage::AddMemoryLoadIndexToMainLoadIndex(), CStringIndexSet::ConvertLoadIndexToWorkingIndex(), GetOccursSize(), and CStringIndexSet::UnionIndexSets().
bool CItemIndexForLoading::WriteOccurrences | ( | FILE * | fp | ) | const |
writes vector of occurrences to a file
References m_pCurrOccurs, and WriteVectorInner().
Referenced by CIndexSetForQueryingStage::AddOneIndexItem(), and GetOccursSize().
bool CItemIndexForLoading::CheckOccurrences | ( | CTokenNo | EndTokenNo | ) | const |
checks the order of occurrences
References ErrorMessage(), Format(), and m_pCurrOccurs.
Referenced by CIndexSetForQueryingStage::AddOneIndexItem(), and GetOccursSize().
void CItemIndexForLoading::ClearOccurrences | ( | ) |
clears vector of occurrences to a file
References ClearVector(), and m_pCurrOccurs.
Referenced by GetOccursSize().
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().
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().
|
private |
current vector of occurrences
Referenced by CheckOccurrences(), ClearOccurrences(), FreeOccurs(), GetOccurs(), InitOccurs(), ReadFromTemporalFile(), WriteOccurrences(), and WriteToTemporalFile().
|
private |
a reference to CStringIndexSet::m_StringBuffer
Referenced by GetIndexItemOffset(), ReadFromTemporalFile(), and WriteToTemporalFile().