Switchboard SDK
Toggle main menu visibility
Loading...
Searching...
No Matches
Event.hpp
1
//
2
// Event.hpp
3
// SwitchboardSDK
4
//
5
// Copyright © 2026 Synervoz. All rights reserved.
6
//
7
8
#pragma once
9
10
#include "export.h"
11
12
#include <any>
13
#include <functional>
14
#include <string>
15
#include <switchboard/SBAny.hpp>
16
17
namespace
switchboard {
18
20
using
EventData =
SBAny
;
21
23
struct
SWITCHBOARDSDK_EXPORT
Event
{
25
std::string
id
;
26
28
std::string
objectURI
;
29
31
std::string
name
;
32
34
int64_t
timestamp
;
35
37
EventData
data
;
38
};
39
41
using
EventCallback = std::function<void(
const
Event
&)>;
42
43
}
switchboard::SBAny
A versatile container class that can hold values of various types.
Definition
SBAny.hpp:53
switchboard::Event
Represents an event that can be emitted and listened to.
Definition
Event.hpp:23
switchboard::Event::objectURI
std::string objectURI
URI of the object emitting the event.
Definition
Event.hpp:28
switchboard::Event::timestamp
int64_t timestamp
Timestamp of when the event was created (in milliseconds since epoch).
Definition
Event.hpp:34
switchboard::Event::name
std::string name
Name of the event.
Definition
Event.hpp:31
switchboard::Event::id
std::string id
Unique identifier for the event.
Definition
Event.hpp:25
switchboard::Event::data
EventData data
Data associated with the event.
Definition
Event.hpp:37
SwitchboardSDK
include
switchboard
Event.hpp
Generated by
1.17.0