OSSIA
Open Scenario System for Interactive Application
Loading...
Searching...
No Matches
ocue.hpp
1#pragma once
2#include "ext.h"
3#include "ext_obex.h"
4
5#include <ossia/preset/cue.hpp>
6
7#include <ossia-max/src/object_base.hpp>
8
9#include <ossia-max/src/search_filter.hpp>
10#include <ossia/detail/json.hpp>
11#include <rapidjson/stringbuffer.h>
12
13namespace ossia
14{
15namespace max_binding
16{
17
18struct ocue
19 : object_base
20 , search_sort_filter
21{
22 static t_class* max_class;
23 t_symbol* m_device_name = _sym_nothing;
24
25 void create(int argc, t_atom* argv);
26 void update(int argc, t_atom* argv);
27 void remove(int argc, t_atom* argv);
28 void rename(int argc, t_atom* argv);
29 void clear();
30 void move(int argc, t_atom* argv);
31 void output(int argc, t_atom* argv);
32 void read(int argc, t_atom* argv);
33 void write(int argc, t_atom* argv);
34 void edit(int argc, t_atom* argv);
35 void sort(int argc, t_atom* argv);
36 void json();
37 void names();
38
39 void explore(int argc, t_atom* argv);
40 void do_explore(t_symbol* name);
41
42 void recall(int argc, t_atom* argv);
43 void recall_next(int argc, t_atom* argv);
44 void recall_previous(int argc, t_atom* argv);
45
46 void display_model(int argc, t_atom* argv);
47 void do_display_model(std::string_view);
48 void select_model(int argc, t_atom* argv);
49 void select(int argc, t_atom* argv);
50
51 // Selection: what is actually going to be on the cue when we create / update
52 void selection_dump();
53 void selection_add(int argc, t_atom* argv);
54 void selection_switch(int argc, t_atom* argv);
55 void selection_filter_all(int argc, t_atom* argv);
56 void selection_filter_any(int argc, t_atom* argv);
57 void selection_remove(int argc, t_atom* argv);
58 void selection_grab(int argc, t_atom* argv);
59
60 // Filter: what we display as the output of ossia.explore
61 void filter_dump();
62 void filter_add(int argc, t_atom* argv);
63 void filter_filter_all(int argc, t_atom* argv);
64 void filter_filter_any(int argc, t_atom* argv);
65 void filter_remove(int argc, t_atom* argv);
66 void filter_grab(int argc, t_atom* argv);
67
68 void do_registration();
69 void unregister();
70
71 void update_selection();
72
73 ossia::net::device_base* get_device() const noexcept;
74 t_max_err get_device_name(long* ac, t_atom** av);
75 t_max_err set_device_name(long ac, t_atom* av);
76
77 static void in_long(ocue* x, long argc);
78 static void reset(ocue* x);
79 static void free(ocue* x);
80 static void closebang(ocue* x);
81 static t_max_err notify(ocue* x, t_symbol* s, t_symbol* msg, void* sender, void* data);
82
83 static void assist(ocue* x, void* b, long m, long a, char* s);
84
85 template <typename... T>
86 void dump_message(std::string_view str, T&&...);
87 void dump_message(std::string_view msg, const std::vector<std::string_view>& t);
88
89 std::shared_ptr<ossia::cues> m_cues;
90 namespace_selection m_ns;
91 namespace_selection m_filter;
92 std::string m_last_filename;
93 t_symbol* m_last_explore{_sym_nothing};
94};
95
96} // namespace max
97} // namespace ossia
Root of a device tree.
Definition ossia/network/base/device.hpp:58
Definition git_info.h:7