OSSIA
Open Scenario System for Interactive Application
fuzzysearch.hpp
1 #pragma once
2 #include "ext.h"
3 #include "ext_obex.h"
4 #undef error
5 #undef post
6 
7 #include "search_filter.hpp"
8 
9 #include <ossia/network/base/node.hpp>
11 
12 #include <set>
13 
14 namespace ossia
15 {
16 namespace max_binding
17 {
18 
19 #pragma mark -
20 #pragma mark t_fuzzysearch structure declaration
21 
22 struct fuzzysearch : search_filter
23 {
24  t_object m_object;
25  t_symbol* m_scope{};
26 
27  void* m_outlet{};
28  long m_case_sensitive{};
29 
30  std::set<ossia::net::node_base*> m_roots;
31  std::vector<std::string> patterns;
32  std::vector<ossia::net::fuzzysearch_result> matches;
33 
34  fuzzysearch(long argc, t_atom* argv);
35 
36  static void
37  search(ossia::max_binding::fuzzysearch* x, t_symbol* s, long argc, t_atom* argv);
38  static void free(ossia::max_binding::fuzzysearch* x);
39  static t_max_err
40  notify(fuzzysearch* x, t_symbol* s, t_symbol* msg, void* sender, void* data);
41 
42  static void assist(fuzzysearch* x, void* b, long m, long a, char* s);
43 };
44 } // max namespace
45 } // ossia namespace
46 
47 #pragma mark -
48 #pragma mark ossia_fuzzysearch class declaration
49 
50 extern "C" {
51 void* ossia_fuzzysearch_new(t_symbol* s, long argc, t_atom* argv);
52 }
Definition: git_info.h:7