Workspace 6.21.5
Public Member Functions | Public Attributes | List of all members
ExecutionTimekeeper::Event Class Reference

Event to be passed around.

#include <Workspace/DataExecution/Execution/executiontimekeeper.h>

Inheritance diagram for ExecutionTimekeeper::Event:
[legend]

Public Member Functions

 Event ()=default
 
 Event (ObjectType objectType, EventType eventType, qint64 timeStamp, Qt::HANDLE threadHandle, const QString &longLabel, const QString &idPath, const QString &objectClass, bool isProfiled, const QString &host="localhost")
 
 Event (ObjectType objectType, EventType eventType, qint64 timeStamp, Qt::HANDLE threadHandle, const QUuid &uuid, const QUuid &parentUuid, const QString &longLabel, const QString &idPath, const QString &objectClass, bool isProfiled, const QString &host="localhost")
 
bool canSerialize () const override
 
bool isBeginEvent () const
 
bool isLocalHost () const
 
bool load (const SerializedItem &item) override
 
bool save (SerializedItem &item) const override
 
- Public Member Functions inherited from Serialize
virtual ~Serialize ()=default
 
virtual bool canSerialize () const =0
 
virtual bool load (const SerializedItem &item)=0
 
virtual bool save (SerializedItem &item) const =0
 

Public Attributes

EventType eventType_
 
QString host_
 
QString idPath_
 
bool isProfiled_ {}
 
QString longLabel_
 
QString objectClass_
 
ObjectType objectType_
 
QUuid parentUuid_
 
Qt::HANDLE threadHandle_ {}
 
qint64 timeStamp_ {}
 
QUuid uuid_
 

Constructor & Destructor Documentation

◆ Event() [1/3]

Event ( )
default

◆ Event() [2/3]

Event ( ObjectType  objectType,
EventType  eventType,
qint64  timeStamp,
Qt::HANDLE  threadHandle,
const QUuid &  uuid,
const QUuid &  parentUuid,
const QString &  longLabel,
const QString &  idPath,
const QString &  objectClass,
bool  isProfiled,
const QString &  host = "localhost" 
)
inline

◆ Event() [3/3]

Event ( ObjectType  objectType,
EventType  eventType,
qint64  timeStamp,
Qt::HANDLE  threadHandle,
const QString &  longLabel,
const QString &  idPath,
const QString &  objectClass,
bool  isProfiled,
const QString &  host = "localhost" 
)
inline

Member Function Documentation

◆ canSerialize()

bool canSerialize ( ) const
overridevirtual
Returns
True if this object can be serialized.

For objects that can be serialized, the save and load functions will be used to do the serialization. If this function returns false, both load() and save() must also return false.

Implements Serialize.

◆ isBeginEvent()

bool isBeginEvent ( ) const
inline

◆ isLocalHost()

bool isLocalHost ( ) const
inline

◆ load()

bool load ( const SerializedItem item)
overridevirtual
Parameters
itemSupplies the state to be loaded into this object.

This function will load the state of this object from item. For many object types, this is most easily implemented in terms of the object's input operator (>>).

It would be reasonable for subclass implementations to assume that the data provided in item is in the same form as would have been saved from a call to save.

Returns
If the state of the object could not be loaded, the function returns false. A return value of true implies that the object state was successfully loaded. If canSerialize() returns false, this function must do nothing except return false as well.

Implements Serialize.

◆ save()

bool save ( SerializedItem item) const
overridevirtual
Parameters
itemWhere to save the state of this object.

This function will serialise the object by saving it to item. For most object types, this is most easily implemented in terms of the object's output operator (<<).

It is allowable for an object to only serialize part of itself. This would be useful if the data it represents has a set of defaults and only those values different to the defaults need to be serialized. Such an implementation then needs to be careful how it handles the complimentary load member function.

Returns
If an object could not be serialised or if the underlying object type does not support serialisation, this function should return false. A return value of true implies that the object was successfully saved to item. If canSerialize() returns false, this function must do nothing except return false as well.

Implements Serialize.

Member Data Documentation

◆ eventType_

EventType eventType_

◆ host_

QString host_

◆ idPath_

QString idPath_

◆ isProfiled_

bool isProfiled_ {}

◆ longLabel_

QString longLabel_

◆ objectClass_

QString objectClass_

◆ objectType_

ObjectType objectType_

◆ parentUuid_

QUuid parentUuid_

◆ threadHandle_

Qt::HANDLE threadHandle_ {}

◆ timeStamp_

qint64 timeStamp_ {}

◆ uuid_

QUuid uuid_