CIdentifier utility classes

fake() returns a fake identifier, simulating an existing one.
isFromSameMachine() is a utility class to compare whether another
CIdentifier is from the same machine

refs #881
This commit is contained in:
Roland Winklmeier
2017-03-05 14:00:11 +01:00
committed by Mathew Sutcliffe
parent 42a13fceff
commit 54b76d91ad
2 changed files with 24 additions and 0 deletions

View File

@@ -55,6 +55,9 @@ namespace BlackMisc
//! Returns an anonymous identifier.
static CIdentifier anonymous();
//! Returns a fake identifier.
static CIdentifier fake();
//! Produces a UUID generated from the identifier.
QUuid toUuid() const;
@@ -82,6 +85,9 @@ namespace BlackMisc
//! Check if originating from the same local machine
bool isFromLocalMachine() const;
//! Check if other identifier is from the same machine
bool isFromSameMachine(const CIdentifier &other) const;
//! Check if originating from the same process id
bool isFromSameProcess() const;