WARNING: USE THIS SOFTWARE AT YOUR OWN RISK! THIS IS EXPERIMENTAL SOFTWARE NOT INTENDED FOR PRODUCTION USE! Zuble is currently an early stage prototype. As such Zuble is minimally tested and inherently unstable. It is provided for experimental, development, and demonstration purposes only. | Zuble QML Types | Zuble C++ Classes | Zuble Overview |
Zuble
0.1
Zuble Framework C++/QML extension API
|
The implicitly shared data object encapsulated by ZblLogMap objects. More...
#include <ZblLogMapData.h>
Classes | |
class | MarkNode |
A mark node is a compressed set of contiguous log record links. More... | |
Public Types | |
enum | MarkType { Invalid, Selection, Searchmap, Bookmark } |
Types of log maps: Invalid, Selection, Search, Bookmark. More... | |
enum | MarkRole { FirstID = 0, SeekPosition, MessageText } |
Roles for the log map's data model. More... | |
typedef QList< ZLogMap * > | zLogMapList |
Public Member Functions | |
ZblLogMapData () | |
ZblLogMapData (MarkType markType) | |
ZblLogMapData (int markType) | |
ZblLogMapData (const ZblLogMapData &other) | |
~ZblLogMapData () | |
MarkType | getMapType () const |
returns this log map's mark type More... | |
bool | insertMark (qint64 recordID, qint64 lastRecordID, qint64 seekPosition) |
Creates a new log mark in the database. More... | |
bool | hasMark (qint64 recordID) const |
Determine if the log map contains a mark for the specified log record. More... | |
qint64 | findNextMark (qint64 startID, bool forward) const |
Search forward or backward for the next mark from a specified starting position. More... | |
bool | removeMark (qint64 recordID, qint64 lastRecordID) |
Removes the specified mark from the log map. More... | |
bool | clear () |
Removes all marks from the log map. More... | |
ZblLogLinkList | getLogLinkList () const |
Obtain a ZblLogLinkList object containing expanded log links. More... | |
Static Public Member Functions | |
static bool | isValidMapType (int mapType) |
Determine if a value is a valid logmap type. More... | |
Protected Member Functions | |
void | mergeMarkNodes (QMap< qint64, MarkNode >::iterator it) |
bool | removeRange (QMap< qint64, MarkNode >::iterator it, qint64 recordID, qint64 lastRecordID) |
bool | decapitateRange (QMap< qint64, MarkNode >::iterator it, qint64 newStartID) |
bool | truncateRange (QMap< qint64, MarkNode >::iterator it, qint64 newEndID) |
bool | splitRange (QMap< qint64, MarkNode >::iterator it, qint64 endHeadID, qint64 startTailID) |
Protected Attributes | |
ZBL_DECLARE_LOGGED_OBJECT QMap< qint64, MarkNode > | m_map |
A lookup table for mark nodes. It maps firstRecordID to MarkNode object. More... | |
MarkType | m_markType |
The type of mark map: invalid, selection, bookmark, searchmark. More... | |
The implicitly shared data object encapsulated by ZblLogMap objects.
This object contains the map of compressed log record links and the map type parameter.
ZblLogMap objects contain shared pointers to this object. ZLogMap objects contain ZblLogMap objects.
Definition at line 25 of file ZblLogMapData.h.
typedef QList<ZLogMap*> Zbl::ZblLogMapData::zLogMapList |
Definition at line 58 of file ZblLogMapData.h.
Roles for the log map's data model.
Enumerator | |
---|---|
FirstID | |
SeekPosition | |
MessageText |
Definition at line 49 of file ZblLogMapData.h.
Types of log maps: Invalid, Selection, Search, Bookmark.
Enumerator | |
---|---|
Invalid | |
Selection | |
Searchmap | |
Bookmark |
Definition at line 35 of file ZblLogMapData.h.
|
inline |
Definition at line 60 of file ZblLogMapData.h.
|
inline |
Definition at line 62 of file ZblLogMapData.h.
|
inline |
Definition at line 64 of file ZblLogMapData.h.
|
inline |
Definition at line 73 of file ZblLogMapData.h.
|
inline |
Definition at line 76 of file ZblLogMapData.h.
bool Zbl::ZblLogMapData::clear | ( | ) |
Removes all marks from the log map.
Definition at line 155 of file ZblLogMapData.cpp.
Referenced by ~ZblLogMapData().
|
protected |
Definition at line 389 of file ZblLogMapData.cpp.
Referenced by removeMark(), and removeRange().
qint64 Zbl::ZblLogMapData::findNextMark | ( | qint64 | startID, |
bool | forward | ||
) | const |
Search forward or backward for the next mark from a specified starting position.
The search begins with the record after the specified starting ID.
startID | The log record ID from which to start the search. Zero starts from the beginning of map, -1 starts from the end of map. |
forward | true = search forward, false = search backward |
Definition at line 212 of file ZblLogMapData.cpp.
Referenced by ~ZblLogMapData().
ZblLogLinkList Zbl::ZblLogMapData::getLogLinkList | ( | ) | const |
Obtain a ZblLogLinkList object containing expanded log links.
Definition at line 447 of file ZblLogMapData.cpp.
Referenced by ~ZblLogMapData().
ZblLogMapData::MarkType Zbl::ZblLogMapData::getMapType | ( | ) | const |
returns this log map's mark type
Definition at line 468 of file ZblLogMapData.cpp.
Referenced by ~ZblLogMapData().
bool Zbl::ZblLogMapData::hasMark | ( | qint64 | recordID | ) | const |
Determine if the log map contains a mark for the specified log record.
recordID | The log record ID to test |
Definition at line 193 of file ZblLogMapData.cpp.
Referenced by ~ZblLogMapData().
bool Zbl::ZblLogMapData::insertMark | ( | qint64 | recordID, |
qint64 | lastRecordID, | ||
qint64 | seekPosition | ||
) |
Creates a new log mark in the database.
recordID | the starting log record number for the mark |
lastRecordID | the ending (inclusive) log record number for the mark |
seekPosition | the seek position of the starting record, -1 if unknown |
Definition at line 25 of file ZblLogMapData.cpp.
Referenced by decapitateRange(), splitRange(), and ~ZblLogMapData().
|
static |
Determine if a value is a valid logmap type.
mapType | An integer value representing a logmap type. |
Definition at line 8 of file ZblLogMapData.cpp.
Referenced by Zbl::ZblLogMap::isValidMapType(), ZblLogMapData(), and ~ZblLogMapData().
|
protected |
Definition at line 167 of file ZblLogMapData.cpp.
Referenced by insertMark().
bool Zbl::ZblLogMapData::removeMark | ( | qint64 | recordID, |
qint64 | lastRecordID | ||
) |
Removes the specified mark from the log map.
recordID | the starting log record number for the mark |
lastRecordID | the ending (inclusive) log record number for the mark |
Definition at line 253 of file ZblLogMapData.cpp.
Referenced by ~ZblLogMapData().
|
protected |
Definition at line 363 of file ZblLogMapData.cpp.
Referenced by removeMark().
|
protected |
Definition at line 422 of file ZblLogMapData.cpp.
Referenced by removeMark().
|
protected |
Definition at line 409 of file ZblLogMapData.cpp.
Referenced by removeMark(), and splitRange().
|
protected |
A lookup table for mark nodes. It maps firstRecordID to MarkNode object.
Definition at line 267 of file ZblLogMapData.h.
Referenced by clear(), decapitateRange(), findNextMark(), getLogLinkList(), hasMark(), insertMark(), mergeMarkNodes(), removeMark(), and removeRange().
|
protected |
The type of mark map: invalid, selection, bookmark, searchmark.
Definition at line 273 of file ZblLogMapData.h.
Referenced by getMapType(), and ZblLogMapData().
Zuble documentation copyright © 2019 Bob Dinitto. Documentation contributions included herein are the copyrights of their respective owners. The documentation provided herein is licensed under the terms of the GNU Free Documentation License version 1.3 as published by the Free Software Foundation. Zuble is a derivative work of Qt version 5. Qt and respective logos are trademarks of The Qt Company Ltd. in Finland and/or other countries worldwide. All other trademarks are property of their respective owners.