OSSIA
Open Scenario System for Interactive Application
Loading...
Searching...
No Matches
generic_parameter.hpp
1
#pragma once
2
#include <
ossia/detail/callback_container.hpp
>
3
#include <ossia/detail/mutex.hpp>
4
#include <ossia/detail/optional.hpp>
5
#include <
ossia/network/base/node_attributes.hpp
>
6
#include <ossia/network/base/parameter.hpp>
7
#include <ossia/network/domain/domain.hpp>
8
#include <ossia/network/generic/generic_device.hpp>
9
#include <ossia/network/value/value.hpp>
10
11
#include <string>
12
#include <thread>
13
#include <vector>
14
15
namespace
ossia::net
16
{
17
18
struct
parameter_data;
19
class
protocol_base;
20
23
class
OSSIA_EXPORT
generic_parameter
:
public
ossia::net::parameter_base
24
{
25
protected
:
26
ossia::net::protocol_base
& m_protocol;
27
28
ossia::val_type
m_valueType{};
29
ossia::access_mode
m_accessMode{};
30
ossia::bounding_mode
m_boundingMode{};
31
32
mutable
mutex_t m_valueMutex;
33
ossia::value
m_value TS_GUARDED_BY(m_valueMutex);
34
35
ossia::domain
m_domain;
36
37
ossia::value
m_previousValue;
38
public
:
39
generic_parameter
(
ossia::net::node_base
&
node_base
);
40
generic_parameter
(
const
parameter_data
&,
ossia::net::node_base
&
node_base
);
41
42
~generic_parameter
();
43
44
ossia::net::protocol_base
& get_protocol()
const
noexcept
override
45
{
46
return
m_protocol;
47
}
48
49
void
pull_value()
final
override
;
50
std::future<void> pull_value_async()
final
override
;
51
void
request_value()
final
override
;
52
53
ossia::net::generic_parameter
&
push_value
(
const
ossia::value
&)
final
override
;
54
ossia::net::generic_parameter
&
push_value
(
ossia::value
&&)
final
override
;
55
ossia::net::generic_parameter
&
push_value
()
final
override
;
56
57
const
ossia::value
& getValue()
const
;
58
ossia::value
value
()
const
final
override
;
59
ossia::value
set_value(
const
ossia::value
&)
override
;
60
ossia::value
set_value(
ossia::value
&&)
override
;
61
63
ossia::value
set_value_quiet(
const
ossia::value
&)
override
;
64
ossia::value
set_value_quiet(
ossia::value
&&)
override
;
65
void
set_value_quiet(
const
ossia::destination&);
66
67
ossia::val_type
get_value_type()
const
noexcept
final
override
;
68
ossia::net::generic_parameter
& set_value_type(
ossia::val_type
)
final
override
;
69
70
ossia::access_mode
get_access()
const
noexcept
final
override
;
71
ossia::net::generic_parameter
& set_access(
ossia::access_mode
)
final
override
;
72
73
const
ossia::domain
& get_domain()
const
noexcept
final
override
;
74
ossia::net::generic_parameter
& set_domain(
const
ossia::domain
&)
final
override
;
75
76
ossia::bounding_mode
get_bounding()
const
noexcept
final
override
;
77
ossia::net::generic_parameter
& set_bounding(
ossia::bounding_mode
)
final
override
;
78
79
bool
filter_value(
const
ossia::value
& val)
const
noexcept
final
override
;
80
81
generic_parameter
& set_unit(
const
ossia::unit_t
& v)
final
override
;
82
83
void
on_first_callback_added()
final
override
;
84
void
on_removing_last_callback()
final
override
;
85
86
private
:
87
friend
struct
update_parameter_visitor;
88
};
89
}
callback_container.hpp
ossia::net::generic_parameter
Definition
generic_parameter.hpp:24
ossia::net::node_base
The node_base class.
Definition
node.hpp:48
ossia::net::parameter_base
The parameter_base class.
Definition
ossia/network/base/parameter.hpp:48
ossia::net::protocol_base
The protocol_base class.
Definition
protocol.hpp:40
ossia::value
The value class.
Definition
value.hpp:173
ossia::val_type
val_type
Enum to represent the types that a value can take.
Definition
parameter_properties.hpp:16
ossia::bounding_mode
bounding_mode
Address behaviors at crossing domain boundaries.
Definition
parameter_properties.hpp:56
ossia::access_mode
access_mode
Address behaviors at crossing domain boundaries time.
Definition
parameter_properties.hpp:46
node_attributes.hpp
ossia::net::push_value
OSSIA_EXPORT void push_value(const ossia::destination &addr, const ossia::value_with_unit &)
Send a value to a given destination.
Definition
ossia/network/base/parameter.cpp:151
ossia::domain
domain A domain of values
Definition
domain_base.hpp:23
ossia::net::parameter_data
The data that can be found inside a parameter.
Definition
parameter_data.hpp:21
ossia::unit_t
Definition
dataspace.hpp:24
src
ossia
network
generic
generic_parameter.hpp
Generated on Mon Mar 31 2025 23:58:28 for OSSIA by
1.9.8