5#include <ossia/network/base/node.hpp>
7static const constexpr int MAX_NUM_ITEMS = 256;
16 t_symbol* m_filter_type[MAX_NUM_ITEMS] = {
nullptr };
17 long m_filter_type_size{};
18 t_symbol* m_filter_tags[MAX_NUM_ITEMS] = {
nullptr };
19 long m_filter_tags_size{};
20 t_symbol* m_filter_modes[3] = {
nullptr};
21 long m_filter_modes_size{};
22 long m_filter_visible{0};
23 long m_filter_terminal{0};
28 static void setup_attribute(t_class* c)
30 CLASS_ATTR_SYM_VARSIZE(
31 c,
"type", 0, T, m_filter_type, m_filter_type_size, MAX_NUM_ITEMS);
32 CLASS_ATTR_LABEL(c,
"type", 0,
"Type of object to search");
34 CLASS_ATTR_SYM_VARSIZE(
35 c,
"tags", 0, T, m_filter_tags, m_filter_tags_size, MAX_NUM_ITEMS);
36 CLASS_ATTR_LABEL(c,
"tags", 0,
"Filter by tags");
38 CLASS_ATTR_SYM_VARSIZE(c,
"mode", 0, T, m_filter_modes, m_filter_modes_size, 3);
39 CLASS_ATTR_LABEL(c,
"mode", 0,
"Filter by access mode");
41 CLASS_ATTR_LONG(c,
"visible", 0, T, m_filter_visible);
44 "Filter by visibility (0 means no filtering, 1 only visible, 2 only hidden");
45 CLASS_ATTR_FILTER_CLIP(c,
"visible", 0, 2);
47 CLASS_ATTR_LONG(c,
"terminal", 0, T, m_filter_terminal);
48 CLASS_ATTR_STYLE_LABEL(c,
"terminal", 0,
"onoff",
"Only show terminal nodes");
52struct search_sort_filter : search_filter
59 std::vector<ossia::net::node_base*>
60 sort_and_filter(std::vector<std::shared_ptr<matcher>>& matchers);
63 static void setup_attribute(t_class* c)
65 search_filter::setup_attribute<T>(c);
67 CLASS_ATTR_LONG(c,
"depth", 0, T, m_depth);
68 CLASS_ATTR_LABEL(c,
"depth", 0,
"Limit exploration depth");
69 CLASS_ATTR_FILTER_MIN(c,
"depth", 0);
71 CLASS_ATTR_SYM(c,
"format", 0, T, m_format);
72 CLASS_ATTR_LABEL(c,
"format", 0,
"Format to output the namespace in");
73 CLASS_ATTR_ENUM(c,
"format", 0,
"list jit.cellblock");
75 CLASS_ATTR_SYM(c,
"sort", 0, T, m_sort);
76 CLASS_ATTR_LABEL(c,
"sort", 0,
"Sorting");
77 CLASS_ATTR_ENUM(c,
"sort", 0,
"none alphabetic priority");
82 void* outlet,
const std::vector<ossia::net::node_base*>& nodes, t_symbol* format,
83 t_symbol* prefix =
nullptr);
The node_base class.
Definition node.hpp:48