Common System 0.2.0
Common interfaces and patterns for system integration
Loading...
Searching...
No Matches
kcenon::common::event Struct Reference

Generic event structure for the event bus. More...

#include <event_bus.h>

Collaboration diagram for kcenon::common::event:
Collaboration graph

Public Member Functions

 event ()=default
 
 event (const std::string &type, const std::string &data="")
 
void set_type (const std::string &type)
 
void set_data (const std::string &data)
 
std::string get_type () const
 
std::string get_data () const
 

Public Attributes

std::string type_
 
std::string data_
 

Detailed Description

Generic event structure for the event bus.

Definition at line 111 of file event_bus.h.

Constructor & Destructor Documentation

◆ event() [1/2]

kcenon::common::event::event ( )
default

◆ event() [2/2]

kcenon::common::event::event ( const std::string & type,
const std::string & data = "" )
inline

Definition at line 116 of file event_bus.h.

117 : type_(type), data_(data) {}

Member Function Documentation

◆ get_data()

std::string kcenon::common::event::get_data ( ) const
inline

Definition at line 122 of file event_bus.h.

122{ return data_; }

References data_.

◆ get_type()

std::string kcenon::common::event::get_type ( ) const
inline

Definition at line 121 of file event_bus.h.

121{ return type_; }

References type_.

◆ set_data()

void kcenon::common::event::set_data ( const std::string & data)
inline

Definition at line 120 of file event_bus.h.

120{ data_ = data; }

References data_.

◆ set_type()

void kcenon::common::event::set_type ( const std::string & type)
inline

Definition at line 119 of file event_bus.h.

119{ type_ = type; }

References type_.

Member Data Documentation

◆ data_

std::string kcenon::common::event::data_

Definition at line 113 of file event_bus.h.

Referenced by get_data(), and set_data().

◆ type_

std::string kcenon::common::event::type_

Definition at line 112 of file event_bus.h.

Referenced by get_type(), and set_type().


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