OSSIA
Open Scenario System for Interactive Application
Loading...
Searching...
No Matches
typed_value.hpp
1#pragma once
2#include <ossia/dataflow/timed_value.hpp>
4#include <ossia/network/common/complex_type.hpp>
5#include <ossia/network/dataspace/dataspace.hpp>
6#include <ossia/network/value/value.hpp>
7namespace ossia
8{
9
10struct typed_value
11{
12 explicit typed_value(ossia::value&& v)
13 : value{std::move(v)}
14 {
15 }
16 explicit typed_value(ossia::timed_value&& v)
17 : value{std::move(v.value)}
18 , timestamp{v.timestamp}
19 {
20 }
21 typed_value(ossia::value&& v, const destination_index& d)
22 : value{std::move(v)}
23 , index{d}
24 {
25 }
26 typed_value(ossia::timed_value&& v, const destination_index& d)
27 : value{std::move(v.value)}
28 , timestamp{v.timestamp}
29 , index{d}
30 {
31 }
32 typed_value(const ossia::timed_value& v, const destination_index& d)
33 : value{v.value}
34 , timestamp{v.timestamp}
35 , index{d}
36 {
37 }
38 typed_value(ossia::value&& v, const ossia::complex_type& u)
39 : value{std::move(v)}
40 , type{u}
41 {
42 }
43 typed_value(const ossia::timed_value& v, const ossia::complex_type& u)
44 : value{v.value}
45 , type{u}
46 {
47 }
48 typed_value(ossia::timed_value&& v, const ossia::complex_type& u)
49 : value{std::move(v.value)}
50 , type{u}
51 {
52 }
53 typed_value(ossia::value&& v, const destination_index& d, const ossia::complex_type& u)
54 : value{std::move(v)}
55 , index{d}
56 , type{u}
57 {
58 }
59 typed_value(
60 ossia::timed_value&& v, const destination_index& d, const ossia::complex_type& u)
61 : value{std::move(v.value)}
62 , timestamp{v.timestamp}
63 , index{d}
64 , type{u}
65 {
66 }
67
68 explicit typed_value(const ossia::value& v)
69 : value{v}
70 {
71 }
72 explicit typed_value(const ossia::timed_value& v)
73 : value{v.value}
74 , timestamp{v.timestamp}
75 {
76 }
77 typed_value(const ossia::value& v, const destination_index& d)
78 : value{v}
79 , index{d}
80 {
81 }
82 typed_value(
83 const ossia::value& v, const destination_index& d, const ossia::complex_type& u)
84 : value{v}
85 , index{d}
86 , type{u}
87 {
88 }
89 typed_value(
90 const ossia::timed_value& v, const destination_index& d,
91 const ossia::complex_type& u)
92 : value{v.value}
93 , timestamp{v.timestamp}
94 , index{d}
95 , type{u}
96 {
97 }
98
99 typed_value() = default;
100 ~typed_value() = default;
101 typed_value(const typed_value&) = default;
102 typed_value(typed_value&&) = default;
103 typed_value& operator=(const typed_value&) = default;
104 typed_value& operator=(typed_value&&) = default;
105
106 ossia::value value{};
107 int64_t timestamp{};
108 destination_index index{};
109 ossia::complex_type type{};
110};
111
112}
The value class.
Definition value.hpp:173
Definition git_info.h:7
ossia::small_vector< int32_t, 2 > destination_index
Definition destination_index.hpp:40