Thread System 0.3.1
High-performance C++20 thread pool with work stealing and DAG scheduling
Loading...
Searching...
No Matches
kcenon::thread::event_base Class Referenceabstract

Event base class for type safety. More...

#include <event_bus.h>

Inheritance diagram for kcenon::thread::event_base:
Inheritance graph
Collaboration diagram for kcenon::thread::event_base:
Collaboration graph

Public Member Functions

virtual ~event_base ()=default
 
virtual std::string type_name () const =0
 Get event type name.
 
std::chrono::steady_clock::time_point timestamp () const
 Get event timestamp.
 

Protected Attributes

std::chrono::steady_clock::time_point timestamp_ {std::chrono::steady_clock::now()}
 

Detailed Description

Event base class for type safety.

Definition at line 28 of file event_bus.h.

Constructor & Destructor Documentation

◆ ~event_base()

virtual kcenon::thread::event_base::~event_base ( )
virtualdefault

Member Function Documentation

◆ timestamp()

std::chrono::steady_clock::time_point kcenon::thread::event_base::timestamp ( ) const
inline

Get event timestamp.

Returns
Event timestamp

Definition at line 42 of file event_bus.h.

42 {
43 return timestamp_;
44 }
std::chrono::steady_clock::time_point timestamp_
Definition event_bus.h:47

References timestamp_.

◆ type_name()

virtual std::string kcenon::thread::event_base::type_name ( ) const
pure virtual

Member Data Documentation

◆ timestamp_

std::chrono::steady_clock::time_point kcenon::thread::event_base::timestamp_ {std::chrono::steady_clock::now()}
protected

Definition at line 47 of file event_bus.h.

47{std::chrono::steady_clock::now()};

Referenced by timestamp().


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