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

#include <UnitHolder.h>

Inheritance diagram for CUnitHolder:
Inheritance graph
[legend]

Public Member Functions

const vector< CGraLine > & GetUnits () const
 
CGraLineGetUnit (size_t UnitNo)
 
const vector< char > & GetUnitBuf () const
 
const vector< BYTE > & GetInputBuffer () const
 
 CUnitHolder ()
 
void SetState (size_t LB, size_t HB, WORD state)
 
void SetDes (size_t x, Descriptors des)
 
bool HasDescr (size_t i, int descr) const
 
bool AreGrouped (size_t LB, size_t HB) const
 
bool HasGrouped (size_t LB, size_t HB) const
 
bool HasAbbreviation (size_t LB, size_t HB) const
 
size_t PassSpace (size_t i, size_t HB) const
 
size_t PPunctOrSoft (size_t i, size_t HB) const
 
size_t PPunct (size_t i, size_t HB) const
 
size_t BSpace (size_t i, size_t LB=0) const
 
size_t PSoft (size_t i, size_t HB) const
 
size_t BSoft (size_t i) const
 
bool IsHyphen (size_t x) const
 
bool is_latin_alpha (int ch) const
 
bool is_lowercase (int ch) const
 
bool is_uppercase (int ch) const
 
bool IsOneAlpha (size_t x) const
 
bool IsOneChar (size_t x, int i) const
 
bool IsOneULet (size_t x) const
 
bool FirstUpper (size_t x) const
 
bool IsBulletWord (size_t x) const
 
bool IsOneFullStop (size_t i) const
 
bool EmptyLineBeforeGraph (size_t i, size_t HB) const
 
bool IsQuestionOrExclamationMarks (size_t i) const
 
bool IsSentenceEndMark (size_t i) const
 
bool IsOneCloseQuotationMark (size_t i) const
 
bool IsOneOpenQuotationMark (size_t i) const
 
void FreeTable ()
 
void BuildUnitBufferUpper ()
 
void InitTokenBuffer ()
 
bool InitInputBuffer (const string &S)
 
void ClearInputBuffer ()
 
void AddUnit (const CGraLine &NewLine)
 
const char * GetUnitBufferStart () const
 
const char * GetUnitUpperBufferStart () const
 
const char * GetUppercaseToken (DWORD LineNo) const
 
string GetToken (DWORD LineNo) const
 
size_t GetTokensCount () const
 
DWORD GetTokenInputOffset (DWORD LineNo) const
 
BYTE GetTokenLength (DWORD LineNo) const
 
void DeleteDescr (size_t LineNo, Descriptors d)
 
void SetOborotNo (size_t LineNo, short OborotNo)
 
short GetOborotNo (size_t LineNo) const
 
void SetPageNumber (size_t LineNo, DWORD PageNumber)
 
DWORD GetPageNumber (size_t LineNo) const
 

Public Attributes

MorphLanguageEnum m_Language
 

Private Attributes

vector< CGraLinem_Units
 
vector< char > m_TokenBuf
 
vector< char > m_UnitBufUpper
 
vector< BYTEm_InputBuffer
 
map< size_t, short > m_FoundOborots
 
map< size_t, DWORDm_FoundPageBreaks
 

Constructor & Destructor Documentation

◆ CUnitHolder()

CUnitHolder::CUnitHolder ( )

References m_Language, and morphRussian.

Member Function Documentation

◆ GetUnits()

const vector<CGraLine>& CUnitHolder::GetUnits ( ) const
inline

◆ GetUnit()

CGraLine & CUnitHolder::GetUnit ( size_t  UnitNo)

References m_Units.

Referenced by GetUnits(), CGraphmatFile::GraphmatMain(), CGraphmatFile::InitContextDescriptors(), and InitEnglishNameSlot().

Here is the caller graph for this function:

◆ GetUnitBuf()

const vector< char > & CUnitHolder::GetUnitBuf ( ) const

References m_TokenBuf.

Referenced by GetUnitBufferStart(), and GetUnits().

Here is the caller graph for this function:

◆ GetInputBuffer()

const vector< BYTE > & CUnitHolder::GetInputBuffer ( ) const

References m_InputBuffer.

Referenced by GetUnits(), CGraphmatFile::GraphmatMain(), and CGraLine::ReadWord().

Here is the caller graph for this function:

◆ SetState()

void CUnitHolder::SetState ( size_t  LB,
size_t  HB,
WORD  state 
)

◆ SetDes()

void CUnitHolder::SetDes ( size_t  x,
Descriptors  des 
)

◆ HasDescr()

bool CUnitHolder::HasDescr ( size_t  i,
int  descr 
) const
inline

References _QM, AddUnit(), AreGrouped(), BSoft(), BSpace(), BuildUnitBufferUpper(), ClearInputBuffer(), DeleteDescr(), EmptyLineBeforeGraph(), FirstUpper(), FreeTable(), GetOborotNo(), GetPageNumber(), GetToken(), GetTokenInputOffset(), GetTokenLength(), GetTokensCount(), GetUnitBufferStart(), GetUnitUpperBufferStart(), GetUppercaseToken(), HasAbbreviation(), HasGrouped(), InitInputBuffer(), InitTokenBuffer(), is_latin_alpha(), is_lowercase(), is_uppercase(), IsBulletWord(), IsHyphen(), IsOneAlpha(), IsOneChar(), IsOneCloseQuotationMark(), IsOneFullStop(), IsOneOpenQuotationMark(), IsOneULet(), IsQuestionOrExclamationMarks(), IsSentenceEndMark(), PassSpace(), PPunct(), PPunctOrSoft(), PSoft(), SetOborotNo(), and SetPageNumber().

Referenced by CanBeFileName(), CanBeRussianInitial(), CheckComma(), CheckGermanSentenceBreak(), CGraphmatFile::DealAsteriskBullet(), CGraphmatFile::DealBullet(), CGraphmatFile::DealBulletsWithTwoBrackets(), CGraphmatFile::DealEnglishStyleFIO(), CGraphmatFile::DealFIO(), CGraphmatFile::DealGermanDividedCompounds(), CGraphmatFile::DealKeySequence(), CGraphmatFile::DealModifierKey(), CGraphmatFile::DealNames(), CGraphmatFile::DealSentBreaker(), CGraphmatFile::DealShortFIO(), DealSimpleEnglishNames(), CGraphmatFile::FindKeySequence(), FindSentEndAfterParagraph(), FirstUpper(), CGraphmatFile::GraphmatMain(), CGraphmatFile::HasIndention(), CConcIndexator::IndexTextOrHtmlFile(), CConSent::InitBasicInformation(), CGraphmatFile::InitContextDescriptors(), InitEnglishNameSlot(), IsBulletWord(), IsDigit(), CConcIndexator::IsDWDSToken(), IsHyphen(), IsLastInGroupOrFree(), IsOneAlpha(), IsSentenceEnd(), IsWord(), PPunct(), PPunctOrSoft(), RubiconText(), and SetSentMarkers().

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

◆ AreGrouped()

bool CUnitHolder::AreGrouped ( size_t  LB,
size_t  HB 
) const

References m_Units.

Referenced by HasDescr().

Here is the caller graph for this function:

◆ HasGrouped()

bool CUnitHolder::HasGrouped ( size_t  LB,
size_t  HB 
) const

◆ HasAbbreviation()

bool CUnitHolder::HasAbbreviation ( size_t  LB,
size_t  HB 
) const

References m_Units.

Referenced by CGraphmatFile::DealExtensionsAndLocalFileNames(), and HasDescr().

Here is the caller graph for this function:

◆ PassSpace()

size_t CUnitHolder::PassSpace ( size_t  i,
size_t  HB 
) const

◆ PPunctOrSoft()

size_t CUnitHolder::PPunctOrSoft ( size_t  i,
size_t  HB 
) const

References HasDescr(), m_Units, and OPun.

Referenced by CGraphmatFile::DealSentBreaker(), and HasDescr().

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

◆ PPunct()

size_t CUnitHolder::PPunct ( size_t  i,
size_t  HB 
) const

References HasDescr(), and OPun.

Referenced by CGraphmatFile::DealSentBreaker(), and HasDescr().

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

◆ BSpace()

size_t CUnitHolder::BSpace ( size_t  i,
size_t  LB = 0 
) const

◆ PSoft()

size_t CUnitHolder::PSoft ( size_t  i,
size_t  HB 
) const

◆ BSoft()

size_t CUnitHolder::BSoft ( size_t  i) const

◆ IsHyphen()

bool CUnitHolder::IsHyphen ( size_t  x) const

References HasDescr(), m_Units, and OHyp.

Referenced by HasDescr().

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

◆ is_latin_alpha()

bool CUnitHolder::is_latin_alpha ( int  ch) const

References is_english_alpha(), is_german_alpha(), m_Language, and morphGerman.

Referenced by HasDescr(), CGraphmatFile::InitNonContextDescriptors(), and IsOneAlpha().

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

◆ is_lowercase()

bool CUnitHolder::is_lowercase ( int  ch) const

References is_english_lower(), is_german_lower(), is_russian_lower(), m_Language, and morphGerman.

Referenced by HasDescr(), and CGraphmatFile::InitNonContextDescriptors().

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

◆ is_uppercase()

bool CUnitHolder::is_uppercase ( int  ch) const

References is_english_upper(), is_german_upper(), is_russian_upper(), m_Language, and morphGerman.

Referenced by HasDescr(), and CGraphmatFile::InitNonContextDescriptors().

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

◆ IsOneAlpha()

bool CUnitHolder::IsOneAlpha ( size_t  x) const

References GetTokenLength(), HasDescr(), is_latin_alpha(), m_Units, OLLE, and ORLE.

Referenced by CGraphmatFile::DealSimpleKey(), HasDescr(), IsBulletWord(), and CGraphmatFile::IsKey().

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

◆ IsOneChar()

bool CUnitHolder::IsOneChar ( size_t  x,
int  i 
) const

References m_Units.

Referenced by CheckComma(), CGraphmatFile::DealGermanDividedCompounds(), and HasDescr().

Here is the caller graph for this function:

◆ IsOneULet()

bool CUnitHolder::IsOneULet ( size_t  x) const

Referenced by HasDescr().

Here is the caller graph for this function:

◆ FirstUpper()

bool CUnitHolder::FirstUpper ( size_t  x) const

References HasDescr(), OUp, and OUpLw.

Referenced by CGraphmatFile::DealFIO(), CGraphmatFile::DealShortFIO(), and HasDescr().

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

◆ IsBulletWord()

bool CUnitHolder::IsBulletWord ( size_t  x) const

References HasDescr(), IsOneAlpha(), and ODigits.

Referenced by CGraphmatFile::DealBullet(), CGraphmatFile::DealBulletsWithTwoBrackets(), and HasDescr().

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

◆ IsOneFullStop()

bool CUnitHolder::IsOneFullStop ( size_t  i) const

◆ EmptyLineBeforeGraph()

bool CUnitHolder::EmptyLineBeforeGraph ( size_t  i,
size_t  HB 
) const

References BSpace(), GetToken(), GetTokenLength(), and m_Units.

Referenced by HasDescr(), and RubiconText().

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

◆ IsQuestionOrExclamationMarks()

bool CUnitHolder::IsQuestionOrExclamationMarks ( size_t  i) const

References GetToken(), GetTokenLength(), and m_Units.

Referenced by HasDescr(), and IsSentenceEndMark().

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

◆ IsSentenceEndMark()

bool CUnitHolder::IsSentenceEndMark ( size_t  i) const

References cEllipseChar, GetTokenLength(), IsOneFullStop(), IsQuestionOrExclamationMarks(), and m_Units.

Referenced by CGraphmatFile::DealSentBreaker(), FindSentEndAfterParagraph(), and HasDescr().

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

◆ IsOneCloseQuotationMark()

bool CUnitHolder::IsOneCloseQuotationMark ( size_t  i) const

References GetToken(), GetTokenLength(), and m_Units.

Referenced by CGraphmatFile::DealSentBreaker(), and HasDescr().

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

◆ IsOneOpenQuotationMark()

bool CUnitHolder::IsOneOpenQuotationMark ( size_t  i) const

References GetToken(), GetTokenLength(), and m_Units.

Referenced by HasDescr(), and SetSentMarkers().

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

◆ FreeTable()

void CUnitHolder::FreeTable ( )

References ClearVector(), m_FoundOborots, m_FoundPageBreaks, m_TokenBuf, and m_Units.

Referenced by HasDescr(), CConcIndexator::IndexTextOrHtmlFile(), InitTokenBuffer(), and CGraphmatFile::~CGraphmatFile().

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

◆ BuildUnitBufferUpper()

void CUnitHolder::BuildUnitBufferUpper ( )

References GerEngRusMakeUpperTemplate(), m_Language, m_UnitBufUpper, and m_Units.

Referenced by CGraphmatFile::GraphmatMain(), and HasDescr().

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

◆ InitTokenBuffer()

void CUnitHolder::InitTokenBuffer ( )

References FreeTable(), m_InputBuffer, m_TokenBuf, m_Units, OBeg, and SetDes().

Referenced by CGraphmatFile::GraphmatMain(), and HasDescr().

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

◆ InitInputBuffer()

bool CUnitHolder::InitInputBuffer ( const string &  S)

References m_InputBuffer.

Referenced by HasDescr(), and CGraphmatFile::LoadStringToGraphan().

Here is the caller graph for this function:

◆ ClearInputBuffer()

void CUnitHolder::ClearInputBuffer ( )

References ClearVector(), and m_InputBuffer.

Referenced by CGraphmatFile::GraphmatMain(), and HasDescr().

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

◆ AddUnit()

void CUnitHolder::AddUnit ( const CGraLine NewLine)

References m_Units.

Referenced by CGraphmatFile::GraphmatMain(), and HasDescr().

Here is the caller graph for this function:

◆ GetUnitBufferStart()

const char * CUnitHolder::GetUnitBufferStart ( ) const

References GetUnitBuf().

Referenced by GetUppercaseToken(), CGraphmatFile::GraphmatMain(), and HasDescr().

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

◆ GetUnitUpperBufferStart()

const char * CUnitHolder::GetUnitUpperBufferStart ( ) const

References m_UnitBufUpper.

Referenced by GetUppercaseToken(), and HasDescr().

Here is the caller graph for this function:

◆ GetUppercaseToken()

const char * CUnitHolder::GetUppercaseToken ( DWORD  LineNo) const

◆ GetToken()

string CUnitHolder::GetToken ( DWORD  LineNo) const

References CriticalTokenLength, GetTokenLength(), and GetUnits().

Referenced by EmptyLineBeforeGraph(), CGraphmatFile::GraphmatMain(), HasDescr(), CGraphmatFile::IsKey(), IsOneCloseQuotationMark(), IsOneOpenQuotationMark(), and IsQuestionOrExclamationMarks().

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

◆ GetTokensCount()

size_t CUnitHolder::GetTokensCount ( ) const

References GetUnits().

Referenced by HasDescr(), and CConcIndexator::IndexTextOrHtmlFile().

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

◆ GetTokenInputOffset()

DWORD CUnitHolder::GetTokenInputOffset ( DWORD  LineNo) const

References GetUnits().

Referenced by CGraphmatFile::DealSentBreaker(), HasDescr(), and SetSentMarkers().

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

◆ GetTokenLength()

BYTE CUnitHolder::GetTokenLength ( DWORD  LineNo) const

◆ DeleteDescr()

void CUnitHolder::DeleteDescr ( size_t  LineNo,
Descriptors  d 
)

References m_Units.

Referenced by CGraphmatFile::DealKeySequence(), HasDescr(), and CGraphmatFile::InitContextDescriptors().

Here is the caller graph for this function:

◆ SetOborotNo()

void CUnitHolder::SetOborotNo ( size_t  LineNo,
short  OborotNo 
)

References m_FoundOborots, and m_Units.

Referenced by CGraphmatFile::DealOborotto(), and HasDescr().

Here is the caller graph for this function:

◆ GetOborotNo()

short CUnitHolder::GetOborotNo ( size_t  LineNo) const

References m_FoundOborots, and m_Units.

Referenced by CGraphmatFile::GetGraphematicalLine(), and HasDescr().

Here is the caller graph for this function:

◆ SetPageNumber()

void CUnitHolder::SetPageNumber ( size_t  LineNo,
DWORD  PageNumber 
)

References m_FoundPageBreaks, m_Units, and UnknownPageNumber.

Referenced by CGraphmatFile::GraphmatMain(), and HasDescr().

Here is the caller graph for this function:

◆ GetPageNumber()

DWORD CUnitHolder::GetPageNumber ( size_t  LineNo) const

References m_FoundPageBreaks, m_Units, and UnknownPageNumber.

Referenced by CGraphmatFile::GetGraphematicalLine(), HasDescr(), and CConcIndexator::IndexTextOrHtmlFile().

Here is the caller graph for this function:

Member Data Documentation

◆ m_Units

vector<CGraLine> CUnitHolder::m_Units
private

◆ m_TokenBuf

vector<char> CUnitHolder::m_TokenBuf
private

◆ m_UnitBufUpper

vector<char> CUnitHolder::m_UnitBufUpper
private

◆ m_InputBuffer

vector<BYTE> CUnitHolder::m_InputBuffer
private

◆ m_FoundOborots

map<size_t, short> CUnitHolder::m_FoundOborots
private

Referenced by FreeTable(), GetOborotNo(), and SetOborotNo().

◆ m_FoundPageBreaks

map<size_t, DWORD> CUnitHolder::m_FoundPageBreaks
private

◆ m_Language

MorphLanguageEnum CUnitHolder::m_Language

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