MCPcopy Create free account
hub / github.com/celtera/avendish / processor

Method processor

include/avnd/binding/python/processor.hpp:112–138  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

110 }
111
112 explicit processor(pybind11::module_& m)
113 : class_def(m, c_str(avnd::get_c_identifier<T>()))
114 {
115 m.doc() = c_str(avnd::get_description<T>());
116
117 class_def.def(py::init<>());
118 if constexpr(requires { T{}(); })
119 {
120 class_def.def("process", &T::operator());
121 }
122
123 if constexpr(avnd::inputs_is_value<T>)
124 {
125 avnd::parameter_input_introspection<T>::for_all(
126 [this](auto a) { setup_input(a); });
127 }
128
129 if constexpr(avnd::outputs_is_value<T>)
130 {
131 avnd::parameter_output_introspection<T>::for_all(
132 [this](auto a) { setup_output(a); });
133 avnd::callback_output_introspection<T>::for_all(
134 [this](auto a) { setup_callback(a); });
135 }
136
137 avnd::messages_introspection<T>::for_all([this](auto a) { setup_message(a); });
138 }
139
140 template <std::size_t Idx, typename C>
141 void setup_callback(const avnd::field_reflection<Idx, C>& out)

Callers

nothing calls this directly

Calls 1

c_strFunction · 0.70

Tested by

no test coverage detected