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 , timestamp{v.timestamp}
46 , type{u}
47 {
48 }
49 typed_value(ossia::timed_value&& v, const ossia::complex_type& u)
50 : value{std::move(v.value)}
51 , timestamp{v.timestamp}
52 , type{u}
53 {
54 }
55 typed_value(ossia::value&& v, const destination_index& d, const ossia::complex_type& u)
56 : value{std::move(v)}
57 , index{d}
58 , type{u}
59 {
60 }
61 typed_value(
62 ossia::timed_value&& v, const destination_index& d, const ossia::complex_type& u)
63 : value{std::move(v.value)}
64 , timestamp{v.timestamp}
65 , index{d}
66 , type{u}
67 {
68 }
69
70 explicit typed_value(const ossia::value& v)
71 : value{v}
72 {
73 }
74 explicit typed_value(const ossia::timed_value& v)
75 : value{v.value}
76 , timestamp{v.timestamp}
77 {
78 }
79 typed_value(const ossia::value& v, const destination_index& d)
80 : value{v}
81 , index{d}
82 {
83 }
84 typed_value(
85 const ossia::value& v, const destination_index& d, const ossia::complex_type& u)
86 : value{v}
87 , index{d}
88 , type{u}
89 {
90 }
91 typed_value(
92 const ossia::timed_value& v, const destination_index& d,
93 const ossia::complex_type& u)
94 : value{v.value}
95 , timestamp{v.timestamp}
96 , index{d}
97 , type{u}
98 {
99 }
100
101 typed_value() = default;
102 ~typed_value() = default;
103 typed_value(const typed_value&) = default;
104 typed_value(typed_value&&) = default;
105 typed_value& operator=(const typed_value&) = default;
106 typed_value& operator=(typed_value&&) = default;
107
108 ossia::value value{};
109 int64_t timestamp{};
110 destination_index index{};
111 ossia::complex_type type{};
112};
113
114}
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