Sen API
Sen Libraries
Toggle main menu visibility
Loading...
Searching...
No Matches
db/include/sen/db/event.h
Go to the documentation of this file.
1
// === event.h =========================================================================================================
2
// Sen Infrastructure
3
// Released under the Apache License v2.0 (SPDX-License-Identifier Apache-2.0).
4
// See the LICENSE.txt file for more information.
5
// © Airbus SAS, Airbus Helicopters, and Airbus Defence and Space SAU/GmbH/SAS.
6
// =====================================================================================================================
7
8
#ifndef SEN_DB_EVENT_H
9
#define SEN_DB_EVENT_H
10
11
#include "
sen/core/meta/event.h
"
12
#include "
sen/core/obj/object.h
"
13
14
namespace
sen::db
15
{
16
17
class
Input
;
18
21
class
Event
22
{
23
SEN_COPY_MOVE(Event)
24
25
public
:
26
~Event
() =
default
;
27
28
public
:
30
[[nodiscard]] ObjectId
getObjectId
() const noexcept;
31
33
[[nodiscard]] const ::
sen
::Event*
getEvent
() const noexcept;
34
36
[[nodiscard]] const
std
::vector<
Var
>&
getArgsAsVariants
() const;
37
39
[[nodiscard]]
Span
<const uint8_t>
getArgsAsBuffer
() const noexcept;
40
41
private:
42
friend class
Input
;
43
Event(ObjectId objectId, const ::
sen
::Event* event,
std
::vector<uint8_t> buffer);
44
45
private:
46
ObjectId objectId_;
47
const ::
sen
::Event* event_;
48
mutable
bool
argsExtracted_ = false;
49
mutable
std
::vector<
Var
> args_;
50
std
::vector<uint8_t> buffer_;
51
};
52
53
}
// namespace sen::db
54
55
#endif
// SEN_DB_EVENT_H
sen::Span
Contiguous view of elements of type T. Inspired by http://www.open-std.org/jtc1/sc22/wg21/docs/papers...
Definition
span.h:34
sen::db::Event::getEvent
const ::sen::Event * getEvent() const noexcept
The meta information about the event.
sen::db::Event::getArgsAsBuffer
Span< const uint8_t > getArgsAsBuffer() const noexcept
The list of arguments, as a (serialized) binary buffer.
sen::db::Event::Input
friend class Input
Definition
db/include/sen/db/event.h:42
sen::db::Event::getObjectId
ObjectId getObjectId() const noexcept
The ID of the object that emitted the event.
sen::db::Event::getArgsAsVariants
const std::vector< Var > & getArgsAsVariants() const
The list of arguments, as variants.
sen::db::Event::~Event
~Event()=default
sen::db::Input
Allows you to access an existing recording in the file system.
Definition
input.h:63
event.h
sen::db
Definition
type_specs.h:19
sen
Definition
assert.h:17
std
STL namespace.
object.h
sen::Var
Can hold any supported value type. Wraps std::variant to allow recursion and implements some helpers.
Definition
var.h:119
libs
db
include
sen
db
event.h
Generated by
1.17.0