NCBI C++ ToolKit
|
Search Toolkit Book for CBDB_FC_Condition
Internal class used by CBDB_FileCursor to represent search condition criteries. More...
Public Member Functions | |
CBDB_BufferManager & | GetBuffer () |
Get field buffer reference (non-const) More... | |
const CBDB_BufferManager & | GetBuffer () const |
Get field buffer reference (const) More... | |
unsigned int | GetFieldsAssigned () const |
Get number of fields assigned to condition. More... | |
unsigned int | IncFieldsAssigned () |
+1 increment of number of assigned fields. More... | |
bool | IsComplete () const |
Return TRUE if all search criteria fileds have been assigned. More... | |
IBDB_FieldConvert & | GetUnassignedField () |
Return next unassigned field. More... | |
~CBDB_FC_Condition () | |
Protected Types | |
enum | EIncompleteVal { eAssignMinVal , eAssignMaxVal } |
Protected Member Functions | |
CBDB_FC_Condition (const CBDB_BufferManager &key_buf, CBDB_FileCursor &cursor) | |
Constructor. key_buf - key buffer of the main table. More... | |
void | InitUnassignedFields (EIncompleteVal incv) |
Set incomplete (non assigned) fields to min(max) possible values. More... | |
void | ResetUnassigned () |
Set number of assigned fields to zero. More... | |
Private Member Functions | |
CBDB_FC_Condition (const CBDB_FC_Condition &) | |
const CBDB_FC_Condition & | operator= (const CBDB_FC_Condition &) |
Private Attributes | |
const CBDB_BufferManager & | m_KeyBuf |
Reference on "parent file" key buffer. More... | |
CBDB_FileCursor & | m_Cursor |
Reference on parent cursor. More... | |
CBDB_BufferManager | m_Buf |
Field buffer. More... | |
unsigned int | m_FieldsAssigned |
Number of fields assigned (for multi-segment) prefix searches. More... | |
Friends | |
class | CBDB_FileCursor |
class | CBDB_ConditionHandle |
Internal class used by CBDB_FileCursor to represent search condition criteries.
Definition at line 47 of file bdb_cursor.cpp.
|
protected |
Enumerator | |
---|---|
eAssignMinVal | |
eAssignMaxVal |
Definition at line 83 of file bdb_cursor.cpp.
|
inline |
Definition at line 80 of file bdb_cursor.cpp.
References DeleteFields(), and m_Buf.
|
inlineprotected |
Constructor. key_buf - key buffer of the main table.
Definition at line 90 of file bdb_cursor.cpp.
References CBDB_BufferManager::Construct(), CBDB_BufferManager::DuplicateStructureFrom(), and m_Buf.
|
private |
|
inline |
Get field buffer reference (non-const)
Definition at line 51 of file bdb_cursor.cpp.
References m_Buf.
Referenced by CBDB_FileCursor::Fetch(), CBDB_FileCursor::FetchFirst(), CBDB_FileCursor::TestTo(), and CBDB_FileCursor::x_FetchFirst_Prolog().
|
inline |
|
inline |
Get number of fields assigned to condition.
Definition at line 56 of file bdb_cursor.cpp.
References m_FieldsAssigned.
Referenced by CBDB_FileCursor::Fetch(), CBDB_FileCursor::FetchFirst(), and IsComplete().
|
inline |
Return next unassigned field.
Definition at line 74 of file bdb_cursor.cpp.
References _ASSERT, CBDB_BufferManager::FieldCount(), CBDB_FileCursor::GetFieldConvert(), m_Buf, m_Cursor, and m_FieldsAssigned.
Referenced by CBDB_ConditionHandle::operator<<().
|
inline |
+1 increment of number of assigned fields.
Return new fields count
Definition at line 60 of file bdb_cursor.cpp.
References _ASSERT, CBDB_BufferManager::FieldCount(), m_Buf, m_Cursor, m_FieldsAssigned, and CBDB_FileCursor::ResetFirstFetched().
Referenced by CBDB_ConditionHandle::operator<<().
|
inlineprotected |
Set incomplete (non assigned) fields to min(max) possible values.
Definition at line 101 of file bdb_cursor.cpp.
References eAssignMinVal, CBDB_BufferManager::FieldCount(), m_Buf, m_FieldsAssigned, CBDB_BufferManager::SetMaxVal(), and CBDB_BufferManager::SetMinVal().
Referenced by CBDB_FileCursor::x_FetchFirst_Prolog().
|
inline |
Return TRUE if all search criteria fileds have been assigned.
Definition at line 68 of file bdb_cursor.cpp.
References CBDB_BufferManager::FieldCount(), GetFieldsAssigned(), and m_KeyBuf.
Referenced by CBDB_FileCursor::FetchFirst(), and CBDB_FileCursor::x_FetchFirst_Prolog().
|
private |
|
inlineprotected |
Set number of assigned fields to zero.
Definition at line 111 of file bdb_cursor.cpp.
References m_FieldsAssigned.
Referenced by CBDB_FileCursor::Fetch(), CBDB_FileCursor::ReOpen(), and CBDB_FileCursor::SetCondition().
|
friend |
Definition at line 133 of file bdb_cursor.cpp.
|
friend |
Definition at line 132 of file bdb_cursor.cpp.
|
private |
Field buffer.
Definition at line 128 of file bdb_cursor.cpp.
Referenced by CBDB_FC_Condition(), CBDB_FileCursor::FetchFirst(), GetBuffer(), GetUnassignedField(), IncFieldsAssigned(), InitUnassignedFields(), and ~CBDB_FC_Condition().
|
private |
Reference on parent cursor.
Definition at line 125 of file bdb_cursor.cpp.
Referenced by GetUnassignedField(), and IncFieldsAssigned().
|
private |
Number of fields assigned (for multi-segment) prefix searches.
Definition at line 130 of file bdb_cursor.cpp.
Referenced by GetFieldsAssigned(), GetUnassignedField(), IncFieldsAssigned(), InitUnassignedFields(), and ResetUnassigned().
|
private |
Reference on "parent file" key buffer.
Definition at line 123 of file bdb_cursor.cpp.
Referenced by IsComplete().