Value.hpp
1 #pragma once
2 #include <score/serialization/DataStreamFwd.hpp>
3 #include <score/tools/std/Optional.hpp>
4 
5 #include <ossia/network/value/value.hpp>
6 
7 #include <ossia-qt/value_metatypes.hpp>
8 
9 #include <score_lib_state_export.h>
10 
11 class QDebug;
12 
13 namespace State
14 {
15 using impulse = ossia::impulse;
16 
17 using vec2f = ossia::vec2f;
18 using vec3f = ossia::vec3f;
19 using vec4f = ossia::vec4f;
20 using list_t = std::vector<ossia::value>;
21 
22 using Value = ossia::value;
23 
24 SCORE_LIB_STATE_EXPORT std::optional<ossia::value> parseValue(const std::string& str);
25 SCORE_LIB_STATE_EXPORT QDebug& operator<<(QDebug& s, const Value& m);
26 }
27 SCORE_SERIALIZE_DATASTREAM_DECLARE(SCORE_LIB_STATE_EXPORT, State::impulse);
28 SCORE_SERIALIZE_DATASTREAM_DECLARE(SCORE_LIB_STATE_EXPORT, State::vec2f);
29 SCORE_SERIALIZE_DATASTREAM_DECLARE(SCORE_LIB_STATE_EXPORT, State::vec3f);
30 SCORE_SERIALIZE_DATASTREAM_DECLARE(SCORE_LIB_STATE_EXPORT, State::vec4f);
31 SCORE_SERIALIZE_DATASTREAM_DECLARE(SCORE_LIB_STATE_EXPORT, State::list_t);
32 SCORE_SERIALIZE_DATASTREAM_DECLARE(SCORE_LIB_STATE_EXPORT, State::Value);
Utilities for OSSIA data structures.
Definition: DeviceInterface.hpp:33