1 #ifndef ZBLLOGMAPDATA_H 2 #define ZBLLOGMAPDATA_H 105 qint64 seekPosition);
115 bool hasMark(qint64 recordID)
const;
132 qint64
findNextMark(qint64 startID,
bool forward)
const;
143 bool removeMark(qint64 recordID, qint64 lastRecordID);
170 QObject* getMarkModel();
192 qint64 recordID = -1,
199 if(recordID != -1 && lastID == -1)
254 bool removeRange(QMap<qint64, MarkNode>::iterator it, qint64 recordID, qint64 lastRecordID);
256 bool decapitateRange(QMap<qint64, MarkNode>::iterator it, qint64 newStartID);
258 bool truncateRange(QMap<qint64, MarkNode>::iterator it, qint64 newEndID);
260 bool splitRange(QMap<qint64, MarkNode>::iterator it, qint64 endHeadID, qint64 startTailID);
284 #endif // ZBLLOGMAPDATA_H ZblLogMapData(MarkType markType)
MarkType
Types of log maps: Invalid, Selection, Search, Bookmark.
bool operator>=(const MarkNode &other) const
ZblLogMapData(const ZblLogMapData &other)
void mergeMarkNodes(QMap< qint64, MarkNode >::iterator it)
#define ZBL_DECLARE_LOGGED_OBJECT
bool splitRange(QMap< qint64, MarkNode >::iterator it, qint64 endHeadID, qint64 startTailID)
bool insertMark(qint64 recordID, qint64 lastRecordID, qint64 seekPosition)
Creates a new log mark in the database.
MarkRole
Roles for the log map's data model.
MarkNode(qint64 recordID, qint64 seekPos=-1)
bool operator<=(const MarkNode &other) const
qint64 getSeekPos() const
MarkType m_markType
The type of mark map: invalid, selection, bookmark, searchmark.
bool truncateRange(QMap< qint64, MarkNode >::iterator it, qint64 newEndID)
MarkNode(qint64 recordID=-1, qint64 lastID=-1, qint64 seekPos=-1)
ZblLogLinkList getLogLinkList() const
Obtain a ZblLogLinkList object containing expanded log links.
bool clear()
Removes all marks from the log map.
QList< ZLogMap * > zLogMapList
A mark node is a compressed set of contiguous log record links.
bool decapitateRange(QMap< qint64, MarkNode >::iterator it, qint64 newStartID)
MarkNode & operator=(const MarkNode &other)
bool operator>(const MarkNode &other) const
MarkType getMapType() const
returns this log map's mark type
This class allows Zuble log file viewer text search operations to pass log record link parameters bet...
ZblLogMapData(int markType)
static bool isValidMapType(int mapType)
Determine if a value is a valid logmap type.
MarkNode(const MarkNode &other)
bool removeRange(QMap< qint64, MarkNode >::iterator it, qint64 recordID, qint64 lastRecordID)
bool removeMark(qint64 recordID, qint64 lastRecordID)
Removes the specified mark from the log map.
qint64 getFirstID() const
ZBL_DECLARE_LOGGED_OBJECT QMap< qint64, MarkNode > m_map
A lookup table for mark nodes. It maps firstRecordID to MarkNode object.
bool operator<(const MarkNode &other) const
qint64 findNextMark(qint64 startID, bool forward) const
Search forward or backward for the next mark from a specified starting position.
bool hasMark(qint64 recordID) const
Determine if the log map contains a mark for the specified log record.
The implicitly shared data object encapsulated by ZblLogMap objects.
bool operator==(const MarkNode &other)