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 #include <string_view>
12 class QDebug;
13 
14 namespace State
15 {
16 using impulse = ossia::impulse;
17 
18 using vec2f = ossia::vec2f;
19 using vec3f = ossia::vec3f;
20 using vec4f = ossia::vec4f;
21 using list_t = std::vector<ossia::value>;
22 
23 using Value = ossia::value;
24 
25 SCORE_LIB_STATE_EXPORT std::optional<ossia::value> parseValue(std::string_view str);
26 SCORE_LIB_STATE_EXPORT QDebug& operator<<(QDebug& s, const Value& m);
27 }
28 SCORE_SERIALIZE_DATASTREAM_DECLARE(SCORE_LIB_STATE_EXPORT, State::impulse);
29 SCORE_SERIALIZE_DATASTREAM_DECLARE(SCORE_LIB_STATE_EXPORT, State::vec2f);
30 SCORE_SERIALIZE_DATASTREAM_DECLARE(SCORE_LIB_STATE_EXPORT, State::vec3f);
31 SCORE_SERIALIZE_DATASTREAM_DECLARE(SCORE_LIB_STATE_EXPORT, State::vec4f);
32 SCORE_SERIALIZE_DATASTREAM_DECLARE(SCORE_LIB_STATE_EXPORT, State::list_t);
33 SCORE_SERIALIZE_DATASTREAM_DECLARE(SCORE_LIB_STATE_EXPORT, State::Value);
Utilities for OSSIA data structures.
Definition: DeviceInterface.hpp:33