OSSIA
Open Scenario System for Interactive Application
destination.hpp
Go to the documentation of this file.
1 #pragma once
2 #include <ossia/detail/config.hpp>
3 
5 #include <ossia/network/common/parameter_properties.hpp>
6 #include <ossia/network/dataspace/dataspace.hpp>
7 #include <ossia/network/value/value.hpp>
8 
9 #include <functional>
10 #include <initializer_list>
11 #include <memory>
12 #include <utility>
13 #include <vector>
17 namespace ossia
18 {
19 class value;
20 namespace net
21 {
22 class parameter_base;
23 }
30 class OSSIA_EXPORT destination final
31 {
32 public:
33  std::reference_wrapper<net::parameter_base> value;
34  destination_index index;
35  ossia::unit_t unit;
36 
37  ossia::value pull() const;
38  ossia::net::parameter_base& address() { return value.get(); }
39  ossia::net::parameter_base& address() const { return value.get(); }
40 
41  destination(net::parameter_base& v) noexcept;
42  destination(net::parameter_base& v, destination_index) noexcept;
43  destination(net::parameter_base& v, destination_index, const ossia::unit_t&) noexcept;
44  destination(net::parameter_base& v, const ossia::unit_t&) noexcept;
45 
46  destination(const destination& other);
47  destination(destination&& other) noexcept;
48  destination& operator=(const destination&);
49  destination& operator=(destination&&) noexcept;
50 
51  bool operator==(const ossia::value&) const noexcept;
52  bool operator!=(const ossia::value&) const noexcept;
53  bool operator>(const ossia::value&) const noexcept;
54  bool operator>=(const ossia::value&) const noexcept;
55  bool operator<(const ossia::value&) const noexcept;
56  bool operator<=(const ossia::value&) const noexcept;
57 };
58 
59 OSSIA_EXPORT bool operator==(const destination&, const destination&) noexcept;
60 OSSIA_EXPORT bool operator!=(const destination&, const destination&) noexcept;
61 OSSIA_EXPORT bool
62 operator==(const destination&, const ossia::net::parameter_base&) noexcept;
63 OSSIA_EXPORT bool
64 operator!=(const destination&, const ossia::net::parameter_base&) noexcept;
65 
66 OSSIA_EXPORT std::string to_pretty_string(const destination& d) noexcept;
67 }
The parameter_base class.
Definition: ossia/network/base/parameter.hpp:48
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
std::string to_pretty_string(const value_with_unit &v)
to_pretty_string Pretty string of unit & value
Definition: dataspace_visitors.cpp:242
Definition: dataspace.hpp:24