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
Public Member Functions | Protected Attributes | List of all members
Zbl::ZblLogMap Class Reference

Logmap objects contain a collection of compressed links to log records. More...

#include <ZblLogMap.h>

Public Member Functions

 ZblLogMap ()
 
 ZblLogMap (int id, const QString &name)
 
 ZblLogMap (const ZblLogMap &other)
 
ZblLogMapData::MarkType getMapType ()
 returns this log map's mark type More...
 
bool isValidMapType (int mapType)
 Determine if a value is a valid logmap type. More...
 
bool insertMark (qint64 recordID, qint64 lastRecordID, qint64 seekPosition)
 Creates a new log mark in the database. More...
 
bool hasMark (qint64 recordID)
 Determine if the log map contains a mark for the specified log record. More...
 
qint64 findNextMark (qint64 startID, bool forward=true) 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...
 

Protected Attributes

QSharedDataPointer< ZblLogMapDatam_d
 The log map data object. More...
 

Detailed Description

Logmap objects contain a collection of compressed links to log records.

ZblLogMap objects are implicitly shared. The ZLogMap class provides a Javascript wrapper for this class.

See also
Zbl::ZLogMap

Definition at line 19 of file ZblLogMap.h.

Constructor & Destructor Documentation

◆ ZblLogMap() [1/3]

Zbl::ZblLogMap::ZblLogMap ( )
inline

Definition at line 23 of file ZblLogMap.h.

◆ ZblLogMap() [2/3]

Zbl::ZblLogMap::ZblLogMap ( int  id,
const QString &  name 
)
inline

Definition at line 25 of file ZblLogMap.h.

◆ ZblLogMap() [3/3]

Zbl::ZblLogMap::ZblLogMap ( const ZblLogMap other)
inline

Definition at line 30 of file ZblLogMap.h.

Member Function Documentation

◆ clear()

bool Zbl::ZblLogMap::clear ( )
inline

Removes all marks from the log map.

Returns
true if marks were removed from logmap, false if logmap was already empty

Definition at line 119 of file ZblLogMap.h.

Referenced by Zbl::ZLogMap::clear(), and Zbl::ZLogMap::getReader().

◆ findNextMark()

qint64 Zbl::ZblLogMap::findNextMark ( qint64  startID,
bool  forward = true 
) const
inline

Search forward or backward for the next mark from a specified starting position.

The search begins with the record after the specified starting ID.

Parameters
startIDThe log record ID from which to start the search. Zero starts from the beginning of map, -1 starts from the end of map.
forwardtrue = search forward, false = search backward
Returns
The next ID following the specified ID in the specified direction, or -1 if no ID was found

Definition at line 95 of file ZblLogMap.h.

Referenced by Zbl::ZLogMap::findNextMark().

◆ getLogLinkList()

ZblLogLinkList Zbl::ZblLogMap::getLogLinkList ( ) const
inline

Obtain a ZblLogLinkList object containing expanded log links.

Returns

Definition at line 127 of file ZblLogMap.h.

Referenced by Zbl::ZblLogSearch::populateLinkModel().

◆ getMapType()

ZblLogMapData::MarkType Zbl::ZblLogMap::getMapType ( )

returns this log map's mark type

Returns

Referenced by ZblLogMap().

◆ hasMark()

bool Zbl::ZblLogMap::hasMark ( qint64  recordID)
inline

Determine if the log map contains a mark for the specified log record.

Parameters
recordIDThe log record ID to test
Returns
true if a mark exists for the specified log record ID, false otherwise

Definition at line 75 of file ZblLogMap.h.

Referenced by Zbl::ZLogMap::hasMark().

◆ insertMark()

bool Zbl::ZblLogMap::insertMark ( qint64  recordID,
qint64  lastRecordID,
qint64  seekPosition 
)
inline

Creates a new log mark in the database.

Parameters
recordIDthe starting log record number for the mark
lastRecordIDthe ending (inclusive) log record number for the mark
seekPositionthe seek position of the starting record, -1 if unknown
Returns
true if logmap was modified, false otherwise

Definition at line 59 of file ZblLogMap.h.

Referenced by Zbl::ZLogMap::insertMark().

◆ isValidMapType()

bool Zbl::ZblLogMap::isValidMapType ( int  mapType)
inline

Determine if a value is a valid logmap type.

Parameters
mapTypeAn integer value representing a logmap type.
Returns
true if mapType is a valid logmap type, false if invalid

Definition at line 49 of file ZblLogMap.h.

◆ removeMark()

bool Zbl::ZblLogMap::removeMark ( qint64  recordID,
qint64  lastRecordID 
)
inline

Removes the specified mark from the log map.

Parameters
recordIDthe starting log record number for the mark
lastRecordIDthe ending (inclusive) log record number for the mark
Returns
true if the mark was present and removed, false if the mark did not exist

Definition at line 107 of file ZblLogMap.h.

Referenced by Zbl::ZLogMap::removeMark().

Member Data Documentation

◆ m_d

QSharedDataPointer<ZblLogMapData> Zbl::ZblLogMap::m_d
protected

The log map data object.

Definition at line 138 of file ZblLogMap.h.

Referenced by clear(), findNextMark(), getLogLinkList(), hasMark(), insertMark(), removeMark(), and ZblLogMap().


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