Sen API
Sen Libraries
Toggle main menu visibility
Loading...
Searching...
No Matches
property_change.h
Go to the documentation of this file.
1
// === property_change.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_PROPERTY_CHANGE_H
9
#define SEN_DB_PROPERTY_CHANGE_H
10
11
#include "
sen/core/base/class_helpers.h
"
12
#include "
sen/core/base/timestamp.h
"
13
#include "
sen/core/meta/property.h
"
14
#include "
sen/core/obj/object.h
"
15
16
namespace
sen::db
17
{
18
19
class
Input
;
20
23
class
PropertyChange
24
{
25
SEN_COPY_MOVE(PropertyChange)
26
27
public
:
28
~PropertyChange
() =
default
;
29
30
public
:
32
[[nodiscard]] ObjectId
getObjectId
() const noexcept;
33
35
[[nodiscard]] const
Property
*
getProperty
() const noexcept;
36
38
[[nodiscard]]
Span
<const uint8_t>
getValueAsBuffer
() const noexcept;
39
41
[[nodiscard]] const
Var
&
getValueAsVariant
() const;
42
43
private:
44
friend class
Input
;
45
PropertyChange(ObjectId objectId, const
Property
* property,
std
::vector<uint8_t> buffer);
46
47
private:
48
ObjectId objectId_;
49
const
Property
* property_;
50
mutable
bool
variantExtracted_ = false;
51
mutable
Var
variant_;
52
std
::vector<uint8_t> buffer_;
53
};
54
55
}
// namespace sen::db
56
57
#endif
// SEN_DB_PROPERTY_CHANGE_H
class_helpers.h
Here we define a set of template meta-programming helpers to let the compiler take some decisions bas...
sen::Property
Represents a property.
Definition
property.h:79
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::Input
Allows you to access an existing recording in the file system.
Definition
input.h:63
sen::db::PropertyChange::getObjectId
ObjectId getObjectId() const noexcept
The ID of the object that holds the property.
sen::db::PropertyChange::~PropertyChange
~PropertyChange()=default
sen::db::PropertyChange::Input
friend class Input
Definition
property_change.h:44
sen::db::PropertyChange::getProperty
const Property * getProperty() const noexcept
The meta information of the property.
sen::db::PropertyChange::getValueAsBuffer
Span< const uint8_t > getValueAsBuffer() const noexcept
The property value as a serialized buffer.
sen::db::PropertyChange::getValueAsVariant
const Var & getValueAsVariant() const
The property value as a variant.
sen::db
Definition
type_specs.h:19
std
STL namespace.
object.h
property.h
sen::Var
Can hold any supported value type. Wraps std::variant to allow recursion and implements some helpers.
Definition
var.h:119
timestamp.h
libs
db
include
sen
db
property_change.h
Generated by
1.17.0