machinery_api/plugins/
graph_interpreter.rs

1#[repr(C)]
2#[derive(Copy, Clone, Debug, Default, Eq, Hash, Ord, PartialEq, PartialOrd)]
3pub struct __BindgenBitfieldUnit<Storage> {
4    storage: Storage,
5}
6impl<Storage> __BindgenBitfieldUnit<Storage> {
7    #[inline]
8    pub const fn new(storage: Storage) -> Self {
9        Self { storage }
10    }
11}
12impl<Storage> __BindgenBitfieldUnit<Storage>
13where
14    Storage: AsRef<[u8]> + AsMut<[u8]>,
15{
16    #[inline]
17    pub fn get_bit(&self, index: usize) -> bool {
18        debug_assert!(index / 8 < self.storage.as_ref().len());
19        let byte_index = index / 8;
20        let byte = self.storage.as_ref()[byte_index];
21        let bit_index = if cfg!(target_endian = "big") {
22            7 - (index % 8)
23        } else {
24            index % 8
25        };
26        let mask = 1 << bit_index;
27        byte & mask == mask
28    }
29    #[inline]
30    pub fn set_bit(&mut self, index: usize, val: bool) {
31        debug_assert!(index / 8 < self.storage.as_ref().len());
32        let byte_index = index / 8;
33        let byte = &mut self.storage.as_mut()[byte_index];
34        let bit_index = if cfg!(target_endian = "big") {
35            7 - (index % 8)
36        } else {
37            index % 8
38        };
39        let mask = 1 << bit_index;
40        if val {
41            *byte |= mask;
42        } else {
43            *byte &= !mask;
44        }
45    }
46    #[inline]
47    pub fn get(&self, bit_offset: usize, bit_width: u8) -> u64 {
48        debug_assert!(bit_width <= 64);
49        debug_assert!(bit_offset / 8 < self.storage.as_ref().len());
50        debug_assert!((bit_offset + (bit_width as usize)) / 8 <= self.storage.as_ref().len());
51        let mut val = 0;
52        for i in 0..(bit_width as usize) {
53            if self.get_bit(i + bit_offset) {
54                let index = if cfg!(target_endian = "big") {
55                    bit_width as usize - 1 - i
56                } else {
57                    i
58                };
59                val |= 1 << index;
60            }
61        }
62        val
63    }
64    #[inline]
65    pub fn set(&mut self, bit_offset: usize, bit_width: u8, val: u64) {
66        debug_assert!(bit_width <= 64);
67        debug_assert!(bit_offset / 8 < self.storage.as_ref().len());
68        debug_assert!((bit_offset + (bit_width as usize)) / 8 <= self.storage.as_ref().len());
69        for i in 0..(bit_width as usize) {
70            let mask = 1 << i;
71            let val_bit_is_set = val & mask == mask;
72            let index = if cfg!(target_endian = "big") {
73                bit_width as usize - 1 - i
74            } else {
75                i
76            };
77            self.set_bit(index + bit_offset, val_bit_is_set);
78        }
79    }
80}
81pub const __SAL_H_VERSION: u32 = 180000000;
82pub const __bool_true_false_are_defined: u32 = 1;
83pub const TM_TT_TYPE__GRAPH_COMPONENT: &'static [u8; 19usize] = b"tm_graph_component\0";
84pub const TM_TT_TYPE__ENTITY_GRAPH: &'static [u8; 16usize] = b"tm_entity_graph\0";
85pub const TM_TT_TYPE__KEYBOARD_ITEM: &'static [u8; 17usize] = b"tm_keyboard_item\0";
86pub const TM_TT_TYPE__MOUSE_BUTTON: &'static [u8; 16usize] = b"tm_mouse_button\0";
87pub const TM_TT_TYPE__ENTITY_ASSET_REFERENCE: &'static [u8; 26usize] =
88    b"tm_entity_asset_reference\0";
89pub const TM_TT_TYPE__LOCAL_ENTITY_ASSET_REFERENCE: &'static [u8; 32usize] =
90    b"tm_local_entity_asset_reference\0";
91pub const TM_TT_TYPE__TAG_REFERENCE: &'static [u8; 17usize] = b"tm_tag_reference\0";
92pub const TM_TT_TYPE__CREATION_GRAPH_ASSET_REFERENCE: &'static [u8; 34usize] =
93    b"tm_creation_graph_asset_reference\0";
94extern "C" {
95    pub fn __va_start(arg1: *mut *mut ::std::os::raw::c_char, ...);
96}
97pub type __vcrt_bool = bool;
98extern "C" {
99    pub fn __security_init_cookie();
100}
101extern "C" {
102    pub fn __security_check_cookie(_StackCookie: usize);
103}
104extern "C" {
105    pub fn __report_gsfailure(_StackCookie: usize);
106}
107extern "C" {
108    pub static mut __security_cookie: usize;
109}
110#[repr(C)]
111#[derive(Copy, Clone)]
112pub union TtIdTBindgenTy1 {
113    pub u64_: u64,
114    pub __bindgen_anon_1: TtIdTBindgenTy1BindgenTy1,
115}
116#[repr(C)]
117#[repr(align(8))]
118#[derive(Default, Copy, Clone)]
119pub struct TtIdTBindgenTy1BindgenTy1 {
120    pub _bitfield_align_1: [u32; 0],
121    pub _bitfield_1: __BindgenBitfieldUnit<[u8; 8usize]>,
122}
123impl TtIdTBindgenTy1BindgenTy1 {
124    #[inline]
125    pub fn type_(&self) -> u64 {
126        unsafe { ::std::mem::transmute(self._bitfield_1.get(0usize, 10u8) as u64) }
127    }
128    #[inline]
129    pub fn set_type(&mut self, val: u64) {
130        unsafe {
131            let val: u64 = ::std::mem::transmute(val);
132            self._bitfield_1.set(0usize, 10u8, val as u64)
133        }
134    }
135    #[inline]
136    pub fn generation(&self) -> u64 {
137        unsafe { ::std::mem::transmute(self._bitfield_1.get(10usize, 22u8) as u64) }
138    }
139    #[inline]
140    pub fn set_generation(&mut self, val: u64) {
141        unsafe {
142            let val: u64 = ::std::mem::transmute(val);
143            self._bitfield_1.set(10usize, 22u8, val as u64)
144        }
145    }
146    #[inline]
147    pub fn index(&self) -> u64 {
148        unsafe { ::std::mem::transmute(self._bitfield_1.get(32usize, 32u8) as u64) }
149    }
150    #[inline]
151    pub fn set_index(&mut self, val: u64) {
152        unsafe {
153            let val: u64 = ::std::mem::transmute(val);
154            self._bitfield_1.set(32usize, 32u8, val as u64)
155        }
156    }
157    #[inline]
158    pub fn new_bitfield_1(
159        type_: u64,
160        generation: u64,
161        index: u64,
162    ) -> __BindgenBitfieldUnit<[u8; 8usize]> {
163        let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 8usize]> = Default::default();
164        __bindgen_bitfield_unit.set(0usize, 10u8, {
165            let type_: u64 = unsafe { ::std::mem::transmute(type_) };
166            type_ as u64
167        });
168        __bindgen_bitfield_unit.set(10usize, 22u8, {
169            let generation: u64 = unsafe { ::std::mem::transmute(generation) };
170            generation as u64
171        });
172        __bindgen_bitfield_unit.set(32usize, 32u8, {
173            let index: u64 = unsafe { ::std::mem::transmute(index) };
174            index as u64
175        });
176        __bindgen_bitfield_unit
177    }
178}
179impl Default for TtIdTBindgenTy1 {
180    fn default() -> Self {
181        let mut s = ::std::mem::MaybeUninit::<Self>::uninit();
182        unsafe {
183            ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
184            s.assume_init()
185        }
186    }
187}
188pub const TM_TT_PROP__GRAPH__NODES: ::std::os::raw::c_int = 0;
189pub const TM_TT_PROP__GRAPH__CONNECTIONS: ::std::os::raw::c_int = 1;
190pub const TM_TT_PROP__GRAPH__DATA: ::std::os::raw::c_int = 2;
191pub const TM_TT_PROP__GRAPH__COMMENTS: ::std::os::raw::c_int = 3;
192pub const TM_TT_PROP__GRAPH__INTERFACE: ::std::os::raw::c_int = 4;
193pub type _bindgen_ty_1 = ::std::os::raw::c_int;
194pub const TM_TT_PROP__GRAPH_NODE__TYPE: ::std::os::raw::c_int = 0;
195pub const TM_TT_PROP__GRAPH_NODE__LABEL: ::std::os::raw::c_int = 1;
196pub const TM_TT_PROP__GRAPH_NODE__POSITION_X: ::std::os::raw::c_int = 2;
197pub const TM_TT_PROP__GRAPH_NODE__POSITION_Y: ::std::os::raw::c_int = 3;
198pub const TM_TT_PROP__GRAPH_NODE__WIDTH: ::std::os::raw::c_int = 4;
199pub const TM_TT_PROP__GRAPH_NODE__SETTINGS: ::std::os::raw::c_int = 5;
200pub type _bindgen_ty_2 = ::std::os::raw::c_int;
201pub const TM_TT_PROP__GRAPH_CONNECTION__FROM_NODE: ::std::os::raw::c_int = 0;
202pub const TM_TT_PROP__GRAPH_CONNECTION__TO_NODE: ::std::os::raw::c_int = 1;
203pub const TM_TT_PROP__GRAPH_CONNECTION__FROM_CONNECTOR_HASH: ::std::os::raw::c_int = 2;
204pub const TM_TT_PROP__GRAPH_CONNECTION__TO_CONNECTOR_HASH: ::std::os::raw::c_int = 3;
205pub type _bindgen_ty_3 = ::std::os::raw::c_int;
206pub const TM_TT_PROP__GRAPH_DATA__TO_NODE: ::std::os::raw::c_int = 0;
207pub const TM_TT_PROP__GRAPH_DATA__TO_CONNECTOR_HASH: ::std::os::raw::c_int = 1;
208pub const TM_TT_PROP__GRAPH_DATA__DATA: ::std::os::raw::c_int = 2;
209pub type _bindgen_ty_4 = ::std::os::raw::c_int;
210pub const TM_TT_PROP__GRAPH_COMMENT__TEXT: ::std::os::raw::c_int = 0;
211pub const TM_TT_PROP__GRAPH_COMMENT__POSITION_X: ::std::os::raw::c_int = 1;
212pub const TM_TT_PROP__GRAPH_COMMENT__POSITION_Y: ::std::os::raw::c_int = 2;
213pub const TM_TT_PROP__GRAPH_COMMENT__FONT_SCALE: ::std::os::raw::c_int = 3;
214pub const TM_TT_PROP__GRAPH_COMMENT__COLOR: ::std::os::raw::c_int = 4;
215pub type _bindgen_ty_5 = ::std::os::raw::c_int;
216pub const TM_TT_PROP__GRAPH_INTERFACE__INPUTS: ::std::os::raw::c_int = 0;
217pub const TM_TT_PROP__GRAPH_INTERFACE__OUTPUTS: ::std::os::raw::c_int = 1;
218pub const TM_TT_PROP__GRAPH_INTERFACE__LAST_ID: ::std::os::raw::c_int = 2;
219pub const TM_TT_PROP__GRAPH_INTERFACE__CACHED_NODE_RESULT: ::std::os::raw::c_int = 3;
220pub type _bindgen_ty_6 = ::std::os::raw::c_int;
221pub const TM_TT_PROP__GRAPH_INPUT__NAME: ::std::os::raw::c_int = 0;
222pub const TM_TT_PROP__GRAPH_INPUT__DISPLAY_NAME: ::std::os::raw::c_int = 1;
223pub const TM_TT_PROP__GRAPH_INPUT__ID: ::std::os::raw::c_int = 2;
224pub const TM_TT_PROP__GRAPH_INPUT__TYPE_HASH: ::std::os::raw::c_int = 3;
225pub const TM_TT_PROP__GRAPH_INPUT__VALUE_SET_BY_USER: ::std::os::raw::c_int = 4;
226pub const TM_TT_PROP__GRAPH_INPUT__VALUE: ::std::os::raw::c_int = 5;
227pub const TM_TT_PROP__GRAPH_INPUT__TOOLTIP: ::std::os::raw::c_int = 6;
228pub const TM_TT_PROP__GRAPH_INPUT__PUBLIC: ::std::os::raw::c_int = 7;
229pub const TM_TT_PROP__GRAPH_INPUT__ORDER: ::std::os::raw::c_int = 8;
230pub type _bindgen_ty_7 = ::std::os::raw::c_int;
231pub const TM_TT_PROP__GRAPH_OUTPUT__NAME: ::std::os::raw::c_int = 0;
232pub const TM_TT_PROP__GRAPH_OUTPUT__DISPLAY_NAME: ::std::os::raw::c_int = 1;
233pub const TM_TT_PROP__GRAPH_OUTPUT__ID: ::std::os::raw::c_int = 2;
234pub const TM_TT_PROP__GRAPH_OUTPUT__TYPE_HASH: ::std::os::raw::c_int = 3;
235pub const TM_TT_PROP__GRAPH_OUTPUT__ORDER: ::std::os::raw::c_int = 4;
236pub type _bindgen_ty_8 = ::std::os::raw::c_int;
237pub const TM_TT_PROP__GRAPH_CACHED_NODE_RESULT__NODE: ::std::os::raw::c_int = 0;
238pub const TM_TT_PROP__GRAPH_CACHED_NODE_RESULT__VALIDITY_HASH: ::std::os::raw::c_int = 1;
239pub const TM_TT_PROP__GRAPH_CACHED_NODE_RESULT__OBJECT: ::std::os::raw::c_int = 2;
240pub type _bindgen_ty_9 = ::std::os::raw::c_int;
241pub const TM_TT_PROP__GRAPH_SETTINGS__GRAPH_UUID_A: ::std::os::raw::c_int = 0;
242pub const TM_TT_PROP__GRAPH_SETTINGS__VIEW_POSITION: ::std::os::raw::c_int = 1;
243pub const TM_TT_PROP__GRAPH_SETTINGS__VIEW_SCALE: ::std::os::raw::c_int = 2;
244pub const TM_TT_PROP__GRAPH_SETTINGS__GRID_SNAPPING: ::std::os::raw::c_int = 3;
245pub const TM_TT_PROP__GRAPH_SETTINGS__GRID_SIZE: ::std::os::raw::c_int = 4;
246pub const TM_TT_PROP__GRAPH_SETTINGS__DEBUG_WATCH_WIRE_OVERLAY_TABLE_MODE: ::std::os::raw::c_int =
247    5;
248pub const TM_TT_PROP__GRAPH_SETTINGS__SHOW_REMOVED_INHERITED: ::std::os::raw::c_int = 6;
249pub const TM_TT_PROP__GRAPH_SETTINGS__DEBUG_WATCHED_WIRES: ::std::os::raw::c_int = 7;
250pub const TM_TT_PROP__GRAPH_SETTINGS__DEBUG_PERSISTENT_SETTINGS: ::std::os::raw::c_int = 8;
251pub type _bindgen_ty_10 = ::std::os::raw::c_int;
252pub const TM_TT_PROP__GRAPH_SETTINGS__BREAKPOINTS: ::std::os::raw::c_int = 0;
253pub const TM_TT_PROP__GRAPH_SETTINGS__OVERLAY_OPENED: ::std::os::raw::c_int = 1;
254pub type _bindgen_ty_11 = ::std::os::raw::c_int;
255pub const TM_TT_PROP__GRAPH_SETTINGS_BREAKPOINT__NODE_UNIQUE_ID: ::std::os::raw::c_int = 0;
256pub const TM_TT_PROP__GRAPH_SETTINGS_BREAKPOINT__NODE_UUID_A: ::std::os::raw::c_int = 1;
257pub const TM_TT_PROP__GRAPH_SETTINGS_BREAKPOINT__NODE_UUID_B: ::std::os::raw::c_int = 2;
258pub const TM_TT_PROP__GRAPH_SETTINGS_BREAKPOINT__SUBGRAPH_NODE_UNIQUE_ID: ::std::os::raw::c_int = 3;
259pub const TM_TT_PROP__GRAPH_SETTINGS_BREAKPOINT__SUBGRAPH_NODE_UUID_A: ::std::os::raw::c_int = 4;
260pub const TM_TT_PROP__GRAPH_SETTINGS_BREAKPOINT__SUBGRAPH_NODE_UUID_B: ::std::os::raw::c_int = 5;
261pub const TM_TT_PROP__GRAPH_SETTINGS_BREAKPOINT__DISABLED: ::std::os::raw::c_int = 6;
262pub const TM_TT_PROP__GRAPH_SETTINGS_BREAKPOINT__GRAPH_UUID_A: ::std::os::raw::c_int = 7;
263pub const TM_TT_PROP__GRAPH_SETTINGS_BREAKPOINT__GRAPH_UUID_B: ::std::os::raw::c_int = 8;
264pub type _bindgen_ty_12 = ::std::os::raw::c_int;
265pub const TM_GRAPH_MAX_CONNECTORS: ::std::os::raw::c_int = 24;
266pub type _bindgen_ty_13 = ::std::os::raw::c_int;
267#[repr(C)]
268#[derive(Copy, Clone)]
269pub union GraphGenericValueTBindgenTy1 {
270    pub data: *const ::std::os::raw::c_void,
271    pub str_: *const ::std::os::raw::c_char,
272    pub f: *const f32,
273    pub uint64: *const u64,
274    pub uint32: *const u32,
275    pub vec2: *const Vec2T,
276    pub vec3: *const Vec3T,
277    pub vec4: *const Vec4T,
278    pub rect: *const RectT,
279    pub srgb: *const ColorSrgbT,
280    pub boolean: *const bool,
281}
282impl Default for GraphGenericValueTBindgenTy1 {
283    fn default() -> Self {
284        let mut s = ::std::mem::MaybeUninit::<Self>::uninit();
285        unsafe {
286            ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
287            s.assume_init()
288        }
289    }
290}
291#[repr(C)]
292#[derive(Copy, Clone)]
293pub struct GraphInterpreterO {
294    _unused: [u8; 0],
295}
296pub const TM_TT_PROP__GRAPH_COMPONENT__GRAPH: ::std::os::raw::c_int = 0;
297pub type _bindgen_ty_14 = ::std::os::raw::c_int;
298#[repr(C)]
299#[derive(Copy, Clone)]
300pub struct GraphComponentT {
301    pub gr: *mut GraphInterpreterO,
302}
303impl Default for GraphComponentT {
304    fn default() -> Self {
305        let mut s = ::std::mem::MaybeUninit::<Self>::uninit();
306        unsafe {
307            ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
308            s.assume_init()
309        }
310    }
311}
312pub const TM_TT_PROP__ENTITY_GRAPH__GRAPH: ::std::os::raw::c_int = 0;
313pub type _bindgen_ty_15 = ::std::os::raw::c_int;
314pub type GraphComponentCompileDataI = ::std::option::Option<
315    unsafe extern "C" fn(
316        gr: *mut GraphInterpreterO,
317        wire: u32,
318        tt: *const TheTruthO,
319        data_id: TtIdT,
320        to_type_hash: StrhashT,
321    ) -> bool,
322>;
323#[repr(C)]
324#[derive(Default, Copy, Clone)]
325pub struct GraphComponentApi {
326    pub create_truth_types: ::std::option::Option<unsafe extern "C" fn(tt: *mut TheTruthO)>,
327    pub create: ::std::option::Option<unsafe extern "C" fn(ctx: *mut EntityContextO)>,
328    pub run_event:
329        ::std::option::Option<unsafe extern "C" fn(ctx: *mut EntityContextO, event: StrhashT)>,
330    pub queue_event:
331        ::std::option::Option<unsafe extern "C" fn(ctx: *mut EntityContextO, event: StrhashT)>,
332    pub tick_queues: ::std::option::Option<unsafe extern "C" fn(ctx: *mut EntityContextO)>,
333}
334#[repr(C)]
335pub struct GraphComponentCompileContextT {
336    pub tt: *const TheTruthO,
337    pub graph_id: TtIdT,
338    pub settings_id: TtIdT,
339    pub node_id: TtIdT,
340    pub node_unique_id: u64,
341    pub connectors: *mut GraphNodeConnectorsT,
342}
343impl Default for GraphComponentCompileContextT {
344    fn default() -> Self {
345        let mut s = ::std::mem::MaybeUninit::<Self>::uninit();
346        unsafe {
347            ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
348            s.assume_init()
349        }
350    }
351}
352#[repr(C)]
353pub struct GraphComponentNodeTypeI {
354    pub super_: GraphNodeTypeI,
355    pub run: ::std::option::Option<unsafe extern "C" fn(ctx: *mut GraphInterpreterContextT)>,
356    pub compile: ::std::option::Option<
357        unsafe extern "C" fn(
358            ctx: *mut GraphInterpreterContextT,
359            compile_ctx: *mut GraphComponentCompileContextT,
360        ),
361    >,
362}
363impl Default for GraphComponentNodeTypeI {
364    fn default() -> Self {
365        let mut s = ::std::mem::MaybeUninit::<Self>::uninit();
366        unsafe {
367            ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
368            s.assume_init()
369        }
370    }
371}
372pub const TM_GRAPH_COMPONENT__STATIC_WIRE__SINK: ::std::os::raw::c_int = 0;
373pub const TM_GRAPH_COMPONENT__STATIC_WIRE__ENTITY_CONTEXT: ::std::os::raw::c_int = 1;
374pub const TM_GRAPH_COMPONENT__STATIC_WIRE__ENTITY: ::std::os::raw::c_int = 2;
375pub const TM_GRAPH_COMPONENT__STATIC_WIRE__EVENT_DATA: ::std::os::raw::c_int = 3;
376pub const TM_GRAPH_COMPONENT__STATIC_WIRE__USER_DATA: ::std::os::raw::c_int = 4;
377pub const TM_GRAPH_COMPONENT__STATIC_WIRE__ENTITY_COMMANDS: ::std::os::raw::c_int = 5;
378pub const TM_GRAPH_COMPONENT__STATIC_WIRE__COUNT: ::std::os::raw::c_int = 6;
379pub type _bindgen_ty_16 = ::std::os::raw::c_int;
380#[repr(C)]
381#[derive(Copy, Clone)]
382pub struct GraphInterpreterWireContentT {
383    pub n: u32,
384    pub size: u32,
385    pub data: *mut ::std::os::raw::c_void,
386}
387impl Default for GraphInterpreterWireContentT {
388    fn default() -> Self {
389        let mut s = ::std::mem::MaybeUninit::<Self>::uninit();
390        unsafe {
391            ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
392            s.assume_init()
393        }
394    }
395}
396#[repr(C)]
397#[derive(Copy, Clone)]
398pub struct GraphInterpreterContextT {
399    pub interpreter: *mut GraphInterpreterO,
400    pub node: u32,
401    pub _padding_55: [::std::os::raw::c_char; 4usize],
402    pub node_type: *const GraphNodeTypeI,
403    pub wires: *const u32,
404}
405impl Default for GraphInterpreterContextT {
406    fn default() -> Self {
407        let mut s = ::std::mem::MaybeUninit::<Self>::uninit();
408        unsafe {
409            ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
410            s.assume_init()
411        }
412    }
413}
414pub type GraphInterpreterRunNodeF =
415    ::std::option::Option<unsafe extern "C" fn(ctx: *mut GraphInterpreterContextT)>;
416#[repr(C)]
417pub struct GraphInterpreterNodeT {
418    pub source: TtIdT,
419    pub unique_id: u64,
420    pub f: GraphInterpreterRunNodeF,
421    pub node_type: *const GraphNodeTypeI,
422    pub dependencies_index: u32,
423    pub wires_index: u32,
424    pub is_pure: bool,
425    pub _padding_106: [::std::os::raw::c_char; 7usize],
426}
427impl Default for GraphInterpreterNodeT {
428    fn default() -> Self {
429        let mut s = ::std::mem::MaybeUninit::<Self>::uninit();
430        unsafe {
431            ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
432            s.assume_init()
433        }
434    }
435}
436#[repr(C)]
437#[derive(Default, Copy, Clone)]
438pub struct GraphInterpreterApi {
439    pub create_graph_interpreter: ::std::option::Option<
440        unsafe extern "C" fn(allocator: *mut AllocatorI) -> *mut GraphInterpreterO,
441    >,
442    pub destroy_graph_interpreter:
443        ::std::option::Option<unsafe extern "C" fn(gr: *mut GraphInterpreterO)>,
444    pub set_graph: ::std::option::Option<
445        unsafe extern "C" fn(
446            gr: *mut GraphInterpreterO,
447            graph_id: TtIdT,
448            nodes: *const GraphInterpreterNodeT,
449            num_nodes: u32,
450            num_wires: u32,
451            node_wires: *mut u32,
452            num_node_wires: u32,
453            dependencies: *mut u32,
454            num_dependencies: u32,
455        ),
456    >,
457    pub get_graph: ::std::option::Option<unsafe extern "C" fn(gr: *mut GraphInterpreterO) -> TtIdT>,
458    pub run_node_at_index:
459        ::std::option::Option<unsafe extern "C" fn(gr: *mut GraphInterpreterO, node: u32)>,
460    pub add_event_node: ::std::option::Option<
461        unsafe extern "C" fn(gr: *mut GraphInterpreterO, unique_id: u64, e: StrhashT, node: u32),
462    >,
463    pub trigger_event:
464        ::std::option::Option<unsafe extern "C" fn(gr: *mut GraphInterpreterO, e: StrhashT)>,
465    pub trigger_wire:
466        ::std::option::Option<unsafe extern "C" fn(gr: *mut GraphInterpreterO, wire: u32)>,
467    pub queue_event:
468        ::std::option::Option<unsafe extern "C" fn(gr: *mut GraphInterpreterO, e: StrhashT)>,
469    pub queue_wire: ::std::option::Option<
470        unsafe extern "C" fn(gr: *mut GraphInterpreterO, wire: u32, delay: f32),
471    >,
472    pub tick_queue:
473        ::std::option::Option<unsafe extern "C" fn(gr: *mut GraphInterpreterO, dt: f32)>,
474    pub get_node_run_context: ::std::option::Option<
475        unsafe extern "C" fn(gr: *mut GraphInterpreterO, node: u32) -> GraphInterpreterContextT,
476    >,
477    pub read_wire: ::std::option::Option<
478        unsafe extern "C" fn(gr: *mut GraphInterpreterO, wire: u32) -> GraphInterpreterWireContentT,
479    >,
480    pub read_wires: ::std::option::Option<
481        unsafe extern "C" fn(
482            gr: *mut GraphInterpreterO,
483            content: *mut GraphInterpreterWireContentT,
484            wires: *const u32,
485            n: u32,
486        ),
487    >,
488    pub read_wires_indirect: ::std::option::Option<
489        unsafe extern "C" fn(
490            gr: *mut GraphInterpreterO,
491            content: *mut *mut GraphInterpreterWireContentT,
492            wires: *const u32,
493            n: u32,
494        ),
495    >,
496    pub write_wire: ::std::option::Option<
497        unsafe extern "C" fn(
498            gr: *mut GraphInterpreterO,
499            wire: u32,
500            n: u32,
501            size: u32,
502        ) -> *mut ::std::os::raw::c_void,
503    >,
504    pub read_variable: ::std::option::Option<
505        unsafe extern "C" fn(
506            gr: *mut GraphInterpreterO,
507            variable: u64,
508        ) -> GraphInterpreterWireContentT,
509    >,
510    pub write_variable: ::std::option::Option<
511        unsafe extern "C" fn(
512            gr: *mut GraphInterpreterO,
513            variable: u64,
514            n: u32,
515            size: u32,
516        ) -> *mut ::std::os::raw::c_void,
517    >,
518    pub all_variables: ::std::option::Option<
519        unsafe extern "C" fn(gr: *mut GraphInterpreterO, allocator: *mut AllocatorI) -> *mut u64,
520    >,
521}
522#[repr(C)]
523#[derive(Copy, Clone)]
524pub struct GraphImportedRewiredConnectionT {
525    _unused: [u8; 0],
526}
527#[repr(C)]
528#[derive(Copy, Clone)]
529pub struct GraphImportedRewiredNodeT {
530    _unused: [u8; 0],
531}
532pub const TM_GRAPH_INTERPRETER_DEBUGGER_MAX_DATA_BYTES: ::std::os::raw::c_int = 64;
533pub type _bindgen_ty_17 = ::std::os::raw::c_int;
534#[repr(C)]
535pub struct GraphInterpreterDebuggerWireT {
536    pub activity: ClockO,
537    pub n: u32,
538    pub size: u32,
539    pub data: [::std::os::raw::c_char; 64usize],
540}
541impl Default for GraphInterpreterDebuggerWireT {
542    fn default() -> Self {
543        let mut s = ::std::mem::MaybeUninit::<Self>::uninit();
544        unsafe {
545            ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
546            s.assume_init()
547        }
548    }
549}
550#[repr(C)]
551pub struct GraphInterpreterDebuggerWireToIdxT {
552    pub wire_id: TtIdT,
553    pub wire_index: u32,
554    pub _padding_38: [::std::os::raw::c_char; 4usize],
555}
556impl Default for GraphInterpreterDebuggerWireToIdxT {
557    fn default() -> Self {
558        let mut s = ::std::mem::MaybeUninit::<Self>::uninit();
559        unsafe {
560            ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
561            s.assume_init()
562        }
563    }
564}
565#[repr(C)]
566pub struct GraphInterpreterDebuggerBreakpointT {
567    pub breakpoint: TtIdT,
568    pub subgraph_node: TtIdT,
569    pub graph_id: TtIdT,
570    pub subgraph_id: TtIdT,
571    pub step_node_id: TtIdT,
572    pub breakpoint_unique_id: u64,
573    pub subgraph_node_unique_id: u64,
574}
575impl Default for GraphInterpreterDebuggerBreakpointT {
576    fn default() -> Self {
577        let mut s = ::std::mem::MaybeUninit::<Self>::uninit();
578        unsafe {
579            ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
580            s.assume_init()
581        }
582    }
583}
584#[repr(C)]
585#[derive(Copy, Clone)]
586pub struct GraphInterpreterDebuggerStatePointersT {
587    pub enabled: *mut bool,
588    pub breakpoints_enabled: *mut bool,
589    pub connected: *mut bool,
590    pub at_breakpoint: *mut bool,
591    pub stepping: *mut bool,
592}
593impl Default for GraphInterpreterDebuggerStatePointersT {
594    fn default() -> Self {
595        let mut s = ::std::mem::MaybeUninit::<Self>::uninit();
596        unsafe {
597            ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
598            s.assume_init()
599        }
600    }
601}
602#[repr(C)]
603pub struct GraphInterpreterDebuggerBrokenNodeQueueItemT {
604    pub interpreter: *mut GraphInterpreterO,
605    pub graph_id: TtIdT,
606    pub node_id: TtIdT,
607    pub idx: u32,
608    pub _padding_131: [::std::os::raw::c_char; 4usize],
609}
610impl Default for GraphInterpreterDebuggerBrokenNodeQueueItemT {
611    fn default() -> Self {
612        let mut s = ::std::mem::MaybeUninit::<Self>::uninit();
613        unsafe {
614            ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
615            s.assume_init()
616        }
617    }
618}
619pub const TM_GRAPH_INTERPRETER_DEBUGGER_KNOWN_GRAPH__INSTANCE: GraphInterpreterDebuggerKnownType =
620    0;
621pub const TM_GRAPH_INTERPRETER_DEBUGGER_KNOWN_GRAPH__SUBGRAPH: GraphInterpreterDebuggerKnownType =
622    1;
623pub const TM_GRAPH_INTERPRETER_DEBUGGER_KNOWN_GRAPH__PROTOTYPE: GraphInterpreterDebuggerKnownType =
624    2;
625pub type GraphInterpreterDebuggerKnownType = ::std::os::raw::c_int;
626#[repr(C)]
627pub struct GraphInterpreterDebuggerKnownGraphT {
628    pub graph_id: TtIdT,
629    pub instance_id: u64,
630    pub instance_graph: TtIdT,
631    pub associated_type: GraphInterpreterDebuggerKnownType,
632    pub _padding_156: [::std::os::raw::c_char; 4usize],
633}
634impl Default for GraphInterpreterDebuggerKnownGraphT {
635    fn default() -> Self {
636        let mut s = ::std::mem::MaybeUninit::<Self>::uninit();
637        unsafe {
638            ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
639            s.assume_init()
640        }
641    }
642}
643#[repr(C)]
644#[derive(Default, Copy, Clone)]
645pub struct GraphInterpreterDebuggerApi {
646    pub enable_debugger: ::std::option::Option<unsafe extern "C" fn()>,
647    pub enable_breakpoints: ::std::option::Option<unsafe extern "C" fn()>,
648    pub disable_debugger: ::std::option::Option<unsafe extern "C" fn()>,
649    pub disable_breakpoints: ::std::option::Option<unsafe extern "C" fn()>,
650    pub is_debugger_enabled: ::std::option::Option<unsafe extern "C" fn() -> bool>,
651    pub are_breakpoints_enabled: ::std::option::Option<unsafe extern "C" fn() -> bool>,
652    pub is_connected: ::std::option::Option<unsafe extern "C" fn() -> bool>,
653    pub is_graph_instances_known:
654        ::std::option::Option<unsafe extern "C" fn(instance_id: u64) -> bool>,
655    pub known_graphs: ::std::option::Option<
656        unsafe extern "C" fn(ta: *mut TempAllocatorI) -> *const GraphInterpreterDebuggerKnownGraphT,
657    >,
658    pub instances: ::std::option::Option<
659        unsafe extern "C" fn(
660            graph_id: TtIdT,
661            ta: *mut TempAllocatorI,
662        ) -> *const GraphInterpreterDebuggerKnownGraphT,
663    >,
664    pub state_pointers:
665        ::std::option::Option<unsafe extern "C" fn() -> GraphInterpreterDebuggerStatePointersT>,
666    pub add_graph_information: ::std::option::Option<
667        unsafe extern "C" fn(
668            instance_id: u64,
669            graph: TtIdT,
670            prototype: TtIdT,
671            graph_version: u32,
672            nodes: *const GraphInterpreterNodeT,
673            subgraphs: *mut TtIdT,
674            graph_prototypes: *mut TtIdT,
675            wires_mapping: *mut GraphInterpreterDebuggerWireToIdxT,
676            rewired_connection: *const GraphImportedRewiredConnectionT,
677            rewired_nodes: *const GraphImportedRewiredNodeT,
678            num_nodes: u32,
679            num_graph_prototypes: u32,
680            num_rewired_connection: u32,
681            num_rewired_nodes: u32,
682            num_wires_mapping: u32,
683            num_wires: u32,
684        ),
685    >,
686    pub node_activity: ::std::option::Option<
687        unsafe extern "C" fn(instance_id: u64, node_unique_id: u64) -> ClockO,
688    >,
689    pub set_node_active:
690        ::std::option::Option<unsafe extern "C" fn(instance_id: u64, node_unique_id: u64)>,
691    pub write_wire: ::std::option::Option<
692        unsafe extern "C" fn(
693            instance_id: u64,
694            wire_index: u32,
695            n: u32,
696            data: *const ::std::os::raw::c_void,
697            size: u32,
698        ),
699    >,
700    pub read_wire: ::std::option::Option<
701        unsafe extern "C" fn(instance_id: u64, wire_id: TtIdT) -> GraphInterpreterDebuggerWireT,
702    >,
703    pub add_breakpoint:
704        ::std::option::Option<unsafe extern "C" fn(graph: TtIdT, node_unique_id: u64)>,
705    pub remove_breakpoint:
706        ::std::option::Option<unsafe extern "C" fn(graph: TtIdT, node_unique_id: u64)>,
707    pub has_breakpoint:
708        ::std::option::Option<unsafe extern "C" fn(graph: TtIdT, node_unique_id: u64) -> bool>,
709    pub break_here: ::std::option::Option<unsafe extern "C" fn(graph: TtIdT, node_unique_id: u64)>,
710    pub breakpoint:
711        ::std::option::Option<unsafe extern "C" fn() -> GraphInterpreterDebuggerBreakpointT>,
712    pub at_breakpoint: ::std::option::Option<unsafe extern "C" fn() -> bool>,
713    pub continue_execution: ::std::option::Option<unsafe extern "C" fn()>,
714    pub breakpoints: ::std::option::Option<
715        unsafe extern "C" fn(
716            graph: TtIdT,
717            ta: *mut TempAllocatorI,
718        ) -> *const GraphInterpreterDebuggerBreakpointT,
719    >,
720    pub add_node_to_broken_queue: ::std::option::Option<
721        unsafe extern "C" fn(gr: *mut GraphInterpreterO, graph: TtIdT, unique_id: u64, idx: u32),
722    >,
723    pub broken_node_queue: ::std::option::Option<
724        unsafe extern "C" fn(
725            ta: *mut TempAllocatorI,
726        ) -> *const GraphInterpreterDebuggerBrokenNodeQueueItemT,
727    >,
728    pub broken_node_queue_size: ::std::option::Option<unsafe extern "C" fn() -> u64>,
729    pub reset_broken_node_queue: ::std::option::Option<unsafe extern "C" fn()>,
730    pub step: ::std::option::Option<unsafe extern "C" fn()>,
731    pub internal__remove_instance: ::std::option::Option<unsafe extern "C" fn(instance_id: u64)>,
732}
733
734// Extensions generated by machinery-generator
735
736use const_cstr::{const_cstr, ConstCStr};
737
738use crate::foundation::VersionT;
739
740use crate::foundation::*;
741use crate::plugins::editor_views::*;
742use crate::plugins::entity::*;
743
744impl GraphComponentApi {
745    pub unsafe fn create_truth_types(&self, tt: *mut TheTruthO) {
746        self.create_truth_types.unwrap()(tt)
747    }
748
749    pub unsafe fn create(&self, ctx: *mut EntityContextO) {
750        self.create.unwrap()(ctx)
751    }
752
753    pub unsafe fn run_event(&self, ctx: *mut EntityContextO, event: StrhashT) {
754        self.run_event.unwrap()(ctx, event)
755    }
756
757    pub unsafe fn queue_event(&self, ctx: *mut EntityContextO, event: StrhashT) {
758        self.queue_event.unwrap()(ctx, event)
759    }
760
761    pub unsafe fn tick_queues(&self, ctx: *mut EntityContextO) {
762        self.tick_queues.unwrap()(ctx)
763    }
764}
765
766impl crate::Api for GraphComponentApi {
767    const NAME: ConstCStr = const_cstr!("tm_graph_component_api");
768    const VERSION: VersionT = VersionT {
769        major: 1u32,
770        minor: 0u32,
771        patch: 0u32,
772    };
773}
774
775impl GraphInterpreterApi {
776    pub unsafe fn create_graph_interpreter(
777        &self,
778        allocator: *mut AllocatorI,
779    ) -> *mut GraphInterpreterO {
780        self.create_graph_interpreter.unwrap()(allocator)
781    }
782
783    pub unsafe fn destroy_graph_interpreter(&self, gr: *mut GraphInterpreterO) {
784        self.destroy_graph_interpreter.unwrap()(gr)
785    }
786
787    pub unsafe fn set_graph(
788        &self,
789        gr: *mut GraphInterpreterO,
790        graph_id: TtIdT,
791        nodes: *const GraphInterpreterNodeT,
792        num_nodes: u32,
793        num_wires: u32,
794        node_wires: *mut u32,
795        num_node_wires: u32,
796        dependencies: *mut u32,
797        num_dependencies: u32,
798    ) {
799        self.set_graph.unwrap()(
800            gr,
801            graph_id,
802            nodes,
803            num_nodes,
804            num_wires,
805            node_wires,
806            num_node_wires,
807            dependencies,
808            num_dependencies,
809        )
810    }
811
812    pub unsafe fn get_graph(&self, gr: *mut GraphInterpreterO) -> TtIdT {
813        self.get_graph.unwrap()(gr)
814    }
815
816    pub unsafe fn run_node_at_index(&self, gr: *mut GraphInterpreterO, node: u32) {
817        self.run_node_at_index.unwrap()(gr, node)
818    }
819
820    pub unsafe fn add_event_node(
821        &self,
822        gr: *mut GraphInterpreterO,
823        unique_id: u64,
824        e: StrhashT,
825        node: u32,
826    ) {
827        self.add_event_node.unwrap()(gr, unique_id, e, node)
828    }
829
830    pub unsafe fn trigger_event(&self, gr: *mut GraphInterpreterO, e: StrhashT) {
831        self.trigger_event.unwrap()(gr, e)
832    }
833
834    pub unsafe fn trigger_wire(&self, gr: *mut GraphInterpreterO, wire: u32) {
835        self.trigger_wire.unwrap()(gr, wire)
836    }
837
838    pub unsafe fn queue_event(&self, gr: *mut GraphInterpreterO, e: StrhashT) {
839        self.queue_event.unwrap()(gr, e)
840    }
841
842    pub unsafe fn queue_wire(&self, gr: *mut GraphInterpreterO, wire: u32, delay: f32) {
843        self.queue_wire.unwrap()(gr, wire, delay)
844    }
845
846    pub unsafe fn tick_queue(&self, gr: *mut GraphInterpreterO, dt: f32) {
847        self.tick_queue.unwrap()(gr, dt)
848    }
849
850    pub unsafe fn get_node_run_context(
851        &self,
852        gr: *mut GraphInterpreterO,
853        node: u32,
854    ) -> GraphInterpreterContextT {
855        self.get_node_run_context.unwrap()(gr, node)
856    }
857
858    pub unsafe fn read_wire(
859        &self,
860        gr: *mut GraphInterpreterO,
861        wire: u32,
862    ) -> GraphInterpreterWireContentT {
863        self.read_wire.unwrap()(gr, wire)
864    }
865
866    pub unsafe fn read_wires(
867        &self,
868        gr: *mut GraphInterpreterO,
869        content: *mut GraphInterpreterWireContentT,
870        wires: *const u32,
871        n: u32,
872    ) {
873        self.read_wires.unwrap()(gr, content, wires, n)
874    }
875
876    pub unsafe fn read_wires_indirect(
877        &self,
878        gr: *mut GraphInterpreterO,
879        content: *mut *mut GraphInterpreterWireContentT,
880        wires: *const u32,
881        n: u32,
882    ) {
883        self.read_wires_indirect.unwrap()(gr, content, wires, n)
884    }
885
886    pub unsafe fn write_wire(
887        &self,
888        gr: *mut GraphInterpreterO,
889        wire: u32,
890        n: u32,
891        size: u32,
892    ) -> *mut ::std::os::raw::c_void {
893        self.write_wire.unwrap()(gr, wire, n, size)
894    }
895
896    pub unsafe fn read_variable(
897        &self,
898        gr: *mut GraphInterpreterO,
899        variable: u64,
900    ) -> GraphInterpreterWireContentT {
901        self.read_variable.unwrap()(gr, variable)
902    }
903
904    pub unsafe fn write_variable(
905        &self,
906        gr: *mut GraphInterpreterO,
907        variable: u64,
908        n: u32,
909        size: u32,
910    ) -> *mut ::std::os::raw::c_void {
911        self.write_variable.unwrap()(gr, variable, n, size)
912    }
913
914    pub unsafe fn all_variables(
915        &self,
916        gr: *mut GraphInterpreterO,
917        allocator: *mut AllocatorI,
918    ) -> *mut u64 {
919        self.all_variables.unwrap()(gr, allocator)
920    }
921}
922
923impl crate::Api for GraphInterpreterApi {
924    const NAME: ConstCStr = const_cstr!("tm_graph_interpreter_api");
925    const VERSION: VersionT = VersionT {
926        major: 1u32,
927        minor: 0u32,
928        patch: 0u32,
929    };
930}
931
932impl GraphInterpreterDebuggerApi {
933    pub unsafe fn enable_debugger(&self) {
934        self.enable_debugger.unwrap()()
935    }
936
937    pub unsafe fn enable_breakpoints(&self) {
938        self.enable_breakpoints.unwrap()()
939    }
940
941    pub unsafe fn disable_debugger(&self) {
942        self.disable_debugger.unwrap()()
943    }
944
945    pub unsafe fn disable_breakpoints(&self) {
946        self.disable_breakpoints.unwrap()()
947    }
948
949    pub unsafe fn is_debugger_enabled(&self) -> bool {
950        self.is_debugger_enabled.unwrap()()
951    }
952
953    pub unsafe fn are_breakpoints_enabled(&self) -> bool {
954        self.are_breakpoints_enabled.unwrap()()
955    }
956
957    pub unsafe fn is_connected(&self) -> bool {
958        self.is_connected.unwrap()()
959    }
960
961    pub unsafe fn is_graph_instances_known(&self, instance_id: u64) -> bool {
962        self.is_graph_instances_known.unwrap()(instance_id)
963    }
964
965    pub unsafe fn known_graphs(
966        &self,
967        ta: *mut TempAllocatorI,
968    ) -> *const GraphInterpreterDebuggerKnownGraphT {
969        self.known_graphs.unwrap()(ta)
970    }
971
972    pub unsafe fn instances(
973        &self,
974        graph_id: TtIdT,
975        ta: *mut TempAllocatorI,
976    ) -> *const GraphInterpreterDebuggerKnownGraphT {
977        self.instances.unwrap()(graph_id, ta)
978    }
979
980    pub unsafe fn state_pointers(&self) -> GraphInterpreterDebuggerStatePointersT {
981        self.state_pointers.unwrap()()
982    }
983
984    pub unsafe fn add_graph_information(
985        &self,
986        instance_id: u64,
987        graph: TtIdT,
988        prototype: TtIdT,
989        graph_version: u32,
990        nodes: *const GraphInterpreterNodeT,
991        subgraphs: *mut TtIdT,
992        graph_prototypes: *mut TtIdT,
993        wires_mapping: *mut GraphInterpreterDebuggerWireToIdxT,
994        rewired_connection: *const GraphImportedRewiredConnectionT,
995        rewired_nodes: *const GraphImportedRewiredNodeT,
996        num_nodes: u32,
997        num_graph_prototypes: u32,
998        num_rewired_connection: u32,
999        num_rewired_nodes: u32,
1000        num_wires_mapping: u32,
1001        num_wires: u32,
1002    ) {
1003        self.add_graph_information.unwrap()(
1004            instance_id,
1005            graph,
1006            prototype,
1007            graph_version,
1008            nodes,
1009            subgraphs,
1010            graph_prototypes,
1011            wires_mapping,
1012            rewired_connection,
1013            rewired_nodes,
1014            num_nodes,
1015            num_graph_prototypes,
1016            num_rewired_connection,
1017            num_rewired_nodes,
1018            num_wires_mapping,
1019            num_wires,
1020        )
1021    }
1022
1023    pub unsafe fn node_activity(&self, instance_id: u64, node_unique_id: u64) -> ClockO {
1024        self.node_activity.unwrap()(instance_id, node_unique_id)
1025    }
1026
1027    pub unsafe fn set_node_active(&self, instance_id: u64, node_unique_id: u64) {
1028        self.set_node_active.unwrap()(instance_id, node_unique_id)
1029    }
1030
1031    pub unsafe fn write_wire(
1032        &self,
1033        instance_id: u64,
1034        wire_index: u32,
1035        n: u32,
1036        data: *const ::std::os::raw::c_void,
1037        size: u32,
1038    ) {
1039        self.write_wire.unwrap()(instance_id, wire_index, n, data, size)
1040    }
1041
1042    pub unsafe fn read_wire(
1043        &self,
1044        instance_id: u64,
1045        wire_id: TtIdT,
1046    ) -> GraphInterpreterDebuggerWireT {
1047        self.read_wire.unwrap()(instance_id, wire_id)
1048    }
1049
1050    pub unsafe fn add_breakpoint(&self, graph: TtIdT, node_unique_id: u64) {
1051        self.add_breakpoint.unwrap()(graph, node_unique_id)
1052    }
1053
1054    pub unsafe fn remove_breakpoint(&self, graph: TtIdT, node_unique_id: u64) {
1055        self.remove_breakpoint.unwrap()(graph, node_unique_id)
1056    }
1057
1058    pub unsafe fn has_breakpoint(&self, graph: TtIdT, node_unique_id: u64) -> bool {
1059        self.has_breakpoint.unwrap()(graph, node_unique_id)
1060    }
1061
1062    pub unsafe fn break_here(&self, graph: TtIdT, node_unique_id: u64) {
1063        self.break_here.unwrap()(graph, node_unique_id)
1064    }
1065
1066    pub unsafe fn breakpoint(&self) -> GraphInterpreterDebuggerBreakpointT {
1067        self.breakpoint.unwrap()()
1068    }
1069
1070    pub unsafe fn at_breakpoint(&self) -> bool {
1071        self.at_breakpoint.unwrap()()
1072    }
1073
1074    pub unsafe fn continue_execution(&self) {
1075        self.continue_execution.unwrap()()
1076    }
1077
1078    pub unsafe fn breakpoints(
1079        &self,
1080        graph: TtIdT,
1081        ta: *mut TempAllocatorI,
1082    ) -> *const GraphInterpreterDebuggerBreakpointT {
1083        self.breakpoints.unwrap()(graph, ta)
1084    }
1085
1086    pub unsafe fn add_node_to_broken_queue(
1087        &self,
1088        gr: *mut GraphInterpreterO,
1089        graph: TtIdT,
1090        unique_id: u64,
1091        idx: u32,
1092    ) {
1093        self.add_node_to_broken_queue.unwrap()(gr, graph, unique_id, idx)
1094    }
1095
1096    pub unsafe fn broken_node_queue(
1097        &self,
1098        ta: *mut TempAllocatorI,
1099    ) -> *const GraphInterpreterDebuggerBrokenNodeQueueItemT {
1100        self.broken_node_queue.unwrap()(ta)
1101    }
1102
1103    pub unsafe fn broken_node_queue_size(&self) -> u64 {
1104        self.broken_node_queue_size.unwrap()()
1105    }
1106
1107    pub unsafe fn reset_broken_node_queue(&self) {
1108        self.reset_broken_node_queue.unwrap()()
1109    }
1110
1111    pub unsafe fn step(&self) {
1112        self.step.unwrap()()
1113    }
1114}
1115
1116impl crate::Api for GraphInterpreterDebuggerApi {
1117    const NAME: ConstCStr = const_cstr!("tm_graph_interpreter_debugger_api");
1118    const VERSION: VersionT = VersionT {
1119        major: 1u32,
1120        minor: 0u32,
1121        patch: 0u32,
1122    };
1123}
1124
1125pub const TM_TT_TYPE_HASH__GRAPH_COMPONENT: StrhashT = StrhashT {
1126    u64_: 11077266511707467055u64,
1127};
1128pub const TM_ENTITY_SYSTEM__GRAPH: StrhashT = StrhashT {
1129    u64_: 4740580164780661651u64,
1130};
1131pub const TM_TT_TYPE_HASH__ENTITY_GRAPH: StrhashT = StrhashT {
1132    u64_: 7834953514833573731u64,
1133};
1134pub const TM_ENTITY_GRAPH_EVENT_INIT: StrhashT = StrhashT {
1135    u64_: 4906703793241200758u64,
1136};
1137pub const TM_ENTITY_GRAPH_EVENT_TICK: StrhashT = StrhashT {
1138    u64_: 15852286598673457824u64,
1139};
1140pub const TM_ENTITY_GRAPH_EVENT_RELOAD: StrhashT = StrhashT {
1141    u64_: 17410914052309711187u64,
1142};
1143pub const TM_ENTITY_GRAPH_EVENT_TERMINATE: StrhashT = StrhashT {
1144    u64_: 8446025307795536291u64,
1145};
1146pub const TM_TT_TYPE_HASH__STRING_HASH: StrhashT = StrhashT {
1147    u64_: 17092832035897777594u64,
1148};
1149pub const TM_TT_TYPE_HASH__KEYBOARD_ITEM: StrhashT = StrhashT {
1150    u64_: 15822893916688273071u64,
1151};
1152pub const TM_TT_TYPE_HASH__MOUSE_BUTTON: StrhashT = StrhashT {
1153    u64_: 17997745604684857831u64,
1154};
1155pub const TM_TT_TYPE_HASH__ENTITY_T: StrhashT = StrhashT {
1156    u64_: 8449892293430067154u64,
1157};
1158pub const TM_TT_TYPE_HASH__ENTITY_ASSET_REFERENCE: StrhashT = StrhashT {
1159    u64_: 3972629628147668976u64,
1160};
1161pub const TM_TT_TYPE_HASH__LOCAL_ENTITY_ASSET_REFERENCE: StrhashT = StrhashT {
1162    u64_: 17314817880627982338u64,
1163};
1164pub const TM_TT_TYPE_HASH__TAG_REFERENCE: StrhashT = StrhashT {
1165    u64_: 917265911594846130u64,
1166};
1167pub const TM_TT_TYPE_HASH__CREATION_GRAPH_ASSET_REFERENCE: StrhashT = StrhashT {
1168    u64_: 16770856107365122312u64,
1169};
1170pub const TM_GRAPH_COMPONENT_COMPILE_DATA_I_VERSION: VersionT = VersionT {
1171    major: 1u32,
1172    minor: 0u32,
1173    patch: 0u32,
1174};
1175pub const TM_GRAPH_COMPONENT_API_VERSION: VersionT = VersionT {
1176    major: 1u32,
1177    minor: 0u32,
1178    patch: 0u32,
1179};
1180pub const TM_GRAPH_INTERPRETER_DEBUGGER_API_VERSION: VersionT = VersionT {
1181    major: 1u32,
1182    minor: 0u32,
1183    patch: 0u32,
1184};
1185pub const TM_GRAPH_INTERPRETER_API_VERSION: VersionT = VersionT {
1186    major: 1u32,
1187    minor: 0u32,
1188    patch: 0u32,
1189};
1190pub const TM_GRAPH_COMPONENT_NODE_TYPE_I_VERSION: VersionT = VersionT {
1191    major: 1u32,
1192    minor: 0u32,
1193    patch: 0u32,
1194};