Sen API
Sen Libraries
Toggle main menu visibility
Loading...
Searching...
No Matches
proxy_object.h
Go to the documentation of this file.
1
// === proxy_object.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_CORE_OBJ_DETAIL_PROXY_OBJECT_H
9
#define SEN_CORE_OBJ_DETAIL_PROXY_OBJECT_H
10
11
// sen
12
#include "
sen/core/base/compiler_macros.h
"
13
#include "
sen/core/obj/object.h
"
14
15
// std
16
#include <mutex>
17
18
namespace
sen::kernel::impl
19
{
20
21
class
LocalParticipant;
22
class
RemoteParticipant;
23
24
}
// namespace sen::kernel::impl
25
26
namespace
sen::impl
27
{
28
29
class
RemoteObject;
30
32
class
SEN_EXPORT ProxyObject:
public
Object
33
{
34
SEN_NOCOPY_NOMOVE(ProxyObject)
35
36
public
:
// special members
37
ProxyObject() =
default
;
38
~ProxyObject()
override
=
default
;
39
40
public
:
42
virtual
void
drainInputs() = 0;
43
45
[[nodiscard]]
virtual
bool
isRemote() const noexcept = 0;
46
48
[[nodiscard]] virtual RemoteObject* asRemoteObject() noexcept = 0;
49
51
[[nodiscard]] virtual const RemoteObject* asRemoteObject() const noexcept = 0;
52
53
public:
// lock interface to externally/internally lock a proxy object during updates
54
void
lock()
const
{ selfMutex_.lock(); }
55
56
void
unlock()
const
{ selfMutex_.unlock(); }
57
58
private
:
59
mutable
std::mutex selfMutex_;
60
};
61
62
}
// namespace sen::impl
63
64
#endif
// SEN_CORE_OBJ_DETAIL_PROXY_OBJECT_H
compiler_macros.h
object.h
libs
core
include
sen
core
obj
detail
proxy_object.h
Generated by
1.17.0