Public Member Functions | |
IndexImpl () | |
virtual | ~IndexImpl () |
virtual void | open (const char *fileName, EDuplicateKeysFlag allowDuplicates=E_NO_DUPLICATES) |
virtual void | close () |
Close the underlying index file if it is open. | |
virtual IndexEntry | findFirst (const char *key=NULL) |
Position the cursor on the 1st entry in the index or the first record with a given key. | |
virtual IndexEntry | findNext () |
Position the cursor on the next entry in the index. | |
virtual IndexEntry | findPrev () |
Position the cursor on the previous entry in the index. | |
virtual IndexEntry | find (const char *key) |
Position the cursor on the index entry associated a specified key. | |
virtual bool | add (const char *key, Int32 offset) |
Add an entry to the index. | |
virtual bool | remove (const char *key, Int32 offset=-1L) |
Remove an entry from the index. | |
virtual bool | update (const char *key, Int32 newOffset) |
Update an index entry. | |
virtual void | flush () |
Flush all changes to the underlying index file. | |
void | reopen () |
void | openIfClosed () |
Private Attributes | |
DB * | m_pDB |
String | m_dbFileName |
Definition at line 67 of file OW_IndexImpl.cpp.
|
Definition at line 96 of file OW_IndexImpl.cpp. |
|
Definition at line 101 of file OW_IndexImpl.cpp. References close(). |
|
Add an entry to the index.
Implements OW_NAMESPACE::Index. Definition at line 262 of file OW_IndexImpl.cpp. References OW_THROW, and OW_NAMESPACE::ThreadImpl::theKey. |
|
Close the underlying index file if it is open.
Implements OW_NAMESPACE::Index. Definition at line 201 of file OW_IndexImpl.cpp. Referenced by open(), reopen(), and ~IndexImpl(). |
|
Position the cursor on the index entry associated a specified key.
Implements OW_NAMESPACE::Index. Definition at line 239 of file OW_IndexImpl.cpp. References openIfClosed(), OW_THROW, and OW_NAMESPACE::ThreadImpl::theKey. Referenced by update(). |
|
Position the cursor on the 1st entry in the index or the first record with a given key.
Implements OW_NAMESPACE::Index. Definition at line 325 of file OW_IndexImpl.cpp. References openIfClosed(), OW_THROW, and OW_NAMESPACE::ThreadImpl::theKey. Referenced by remove(). |
|
Position the cursor on the next entry in the index.
Implements OW_NAMESPACE::Index. Definition at line 353 of file OW_IndexImpl.cpp. References openIfClosed(), OW_THROW, and OW_NAMESPACE::ThreadImpl::theKey. Referenced by remove(). |
|
Position the cursor on the previous entry in the index.
Implements OW_NAMESPACE::Index. Definition at line 371 of file OW_IndexImpl.cpp. References openIfClosed(), OW_THROW, and OW_NAMESPACE::ThreadImpl::theKey. |
|
Flush all changes to the underlying index file.
Reimplemented from OW_NAMESPACE::Index. Definition at line 211 of file OW_IndexImpl.cpp. References reopen(). |
|
Definition at line 114 of file OW_IndexImpl.cpp. References OW_NAMESPACE::FileSystem::canRead(), OW_NAMESPACE::FileSystem::canWrite(), close(), OW_NAMESPACE::Index::E_ALLDUPLICATES, m_dbFileName, m_pDB, OW_THROW, and recCompare(). |
|
Definition at line 177 of file OW_IndexImpl.cpp. References OW_NAMESPACE::String::c_str(), m_dbFileName, OW_THROW, and recCompare(). Referenced by find(), findFirst(), findNext(), and findPrev(). |
|
Remove an entry from the index.
Implements OW_NAMESPACE::Index. Definition at line 278 of file OW_IndexImpl.cpp. References findFirst(), findNext(), OW_THROW, and OW_NAMESPACE::ThreadImpl::theKey. |
|
Definition at line 155 of file OW_IndexImpl.cpp. References OW_NAMESPACE::String::c_str(), close(), m_dbFileName, OW_THROW, and recCompare(). Referenced by flush(). |
|
Update an index entry.
Implements OW_NAMESPACE::Index. Definition at line 305 of file OW_IndexImpl.cpp. References find(), OW_THROW, and OW_NAMESPACE::ThreadImpl::theKey. |
|
Definition at line 86 of file OW_IndexImpl.cpp. Referenced by open(), openIfClosed(), and reopen(). |
|
Definition at line 85 of file OW_IndexImpl.cpp. Referenced by open(). |