reactive_graph_flow_model/reactive_graph/flow/
flow_3_d.rs

1//! ---------------------------------------------
2//! This file was generated automatically.
3//! ---------------------------------------------
4#![allow(dead_code, unused)]
5#![cfg_attr(rustfmt, rustfmt_skip)]
6
7/// Namespace `reactive_graph::flow::Flow3D`
8#[cfg_attr(rustfmt, rustfmt_skip)]
9pub const FLOW_3_D_NAMESPACE: &str = "reactive_graph::flow::Flow3D";
10
11/// The [type identifier]() of Component `Flow3D`.
12///
13/// ### Namespace
14///
15/// The fully qualified namespace is
16/// `reactive_graph::flow::Flow3D`
17pub static FLOW_3_D: std::sync::LazyLock<reactive_graph_graph::ComponentTypeId> = std::sync::LazyLock::new(||
18std::str::FromStr::from_str(FLOW_3_D_NAMESPACE).unwrap());
19
20/// The properties of Component `Flow3D`.
21#[allow(non_camel_case_types)]
22#[derive(Debug, PartialEq, PartialOrd, Eq, Hash, Clone)]
23pub enum Flow3DProperties {
24    
25    /// ### Property `f3dd`
26    ///
27    /// The depth (z-axis) in a 3D flow
28    ///
29    /// Data Type: `Number`
30    ///
31    /// Socket Type: `None`
32    ///
33    /// Mutability: `Mutable`
34    ///
35    F_3_DD,
36    
37    /// ### Property `f3dh`
38    ///
39    /// The height (y-axis) in a 3D flow
40    ///
41    /// Data Type: `Number`
42    ///
43    /// Socket Type: `None`
44    ///
45    /// Mutability: `Mutable`
46    ///
47    F_3_DH,
48    
49    /// ### Property `f3dw`
50    ///
51    /// The width (x-axis) in a 3D flow
52    ///
53    /// Data Type: `Number`
54    ///
55    /// Socket Type: `None`
56    ///
57    /// Mutability: `Mutable`
58    ///
59    F_3_DW,
60    
61    /// ### Property `f3dx`
62    ///
63    /// The X position in a 3D flow
64    ///
65    /// Data Type: `Number`
66    ///
67    /// Socket Type: `None`
68    ///
69    /// Mutability: `Mutable`
70    ///
71    F_3_DX,
72    
73    /// ### Property `f3dy`
74    ///
75    /// The Y position in a 3D flow
76    ///
77    /// Data Type: `Number`
78    ///
79    /// Socket Type: `None`
80    ///
81    /// Mutability: `Mutable`
82    ///
83    F_3_DY,
84    
85    /// ### Property `f3dz`
86    ///
87    /// The Z position in a 3D flow
88    ///
89    /// Data Type: `Number`
90    ///
91    /// Socket Type: `None`
92    ///
93    /// Mutability: `Mutable`
94    ///
95    F_3_DZ,
96}
97impl Flow3DProperties {
98    pub fn len() -> usize {
99        6usize
100    }
101    
102    pub fn property_types() -> reactive_graph_graph::PropertyTypes {
103        let property_types = reactive_graph_graph::PropertyTypes::new();
104        property_types.push(Flow3DProperties::F_3_DD);
105        property_types.push(Flow3DProperties::F_3_DH);
106        property_types.push(Flow3DProperties::F_3_DW);
107        property_types.push(Flow3DProperties::F_3_DX);
108        property_types.push(Flow3DProperties::F_3_DY);
109        property_types.push(Flow3DProperties::F_3_DZ);
110        property_types
111    }
112}
113
114impl AsRef<str> for Flow3DProperties {
115    #[inline]
116    fn as_ref(&self) -> &str {
117        match *self {
118            Flow3DProperties::F_3_DD => "f3dd",
119            Flow3DProperties::F_3_DH => "f3dh",
120            Flow3DProperties::F_3_DW => "f3dw",
121            Flow3DProperties::F_3_DX => "f3dx",
122            Flow3DProperties::F_3_DY => "f3dy",
123            Flow3DProperties::F_3_DZ => "f3dz",
124        }
125    }
126}
127
128impl From<Flow3DProperties> for &'static str {
129    #[inline]
130    fn from(properties: Flow3DProperties) -> &'static str {
131        match properties {
132            Flow3DProperties::F_3_DD => "f3dd",
133            Flow3DProperties::F_3_DH => "f3dh",
134            Flow3DProperties::F_3_DW => "f3dw",
135            Flow3DProperties::F_3_DX => "f3dx",
136            Flow3DProperties::F_3_DY => "f3dy",
137            Flow3DProperties::F_3_DZ => "f3dz",
138        }
139    }
140}
141
142impl From<Flow3DProperties> for String {
143    #[inline]
144    fn from(properties: Flow3DProperties) -> String {
145        match properties {
146            Flow3DProperties::F_3_DD => "f3dd".to_owned(),
147            Flow3DProperties::F_3_DH => "f3dh".to_owned(),
148            Flow3DProperties::F_3_DW => "f3dw".to_owned(),
149            Flow3DProperties::F_3_DX => "f3dx".to_owned(),
150            Flow3DProperties::F_3_DY => "f3dy".to_owned(),
151            Flow3DProperties::F_3_DZ => "f3dz".to_owned(),
152        }
153    }
154}
155
156impl From<Flow3DProperties> for reactive_graph_graph::PropertyType {
157    #[inline]
158    fn from(properties: Flow3DProperties) -> reactive_graph_graph::PropertyType {
159        match properties {
160            Flow3DProperties::F_3_DD => {
161                reactive_graph_graph::PropertyType::new_with_all(
162                    "f3dd",
163                    "The depth (z-axis) in a 3D flow",
164                    reactive_graph_graph::DataType::Number,
165                    reactive_graph_graph::SocketType::None,
166                    reactive_graph_graph::Mutability::Mutable,
167                    reactive_graph_graph::Extensions::new(),
168                )
169            }
170            Flow3DProperties::F_3_DH => {
171                reactive_graph_graph::PropertyType::new_with_all(
172                    "f3dh",
173                    "The height (y-axis) in a 3D flow",
174                    reactive_graph_graph::DataType::Number,
175                    reactive_graph_graph::SocketType::None,
176                    reactive_graph_graph::Mutability::Mutable,
177                    reactive_graph_graph::Extensions::new(),
178                )
179            }
180            Flow3DProperties::F_3_DW => {
181                reactive_graph_graph::PropertyType::new_with_all(
182                    "f3dw",
183                    "The width (x-axis) in a 3D flow",
184                    reactive_graph_graph::DataType::Number,
185                    reactive_graph_graph::SocketType::None,
186                    reactive_graph_graph::Mutability::Mutable,
187                    reactive_graph_graph::Extensions::new(),
188                )
189            }
190            Flow3DProperties::F_3_DX => {
191                reactive_graph_graph::PropertyType::new_with_all(
192                    "f3dx",
193                    "The X position in a 3D flow",
194                    reactive_graph_graph::DataType::Number,
195                    reactive_graph_graph::SocketType::None,
196                    reactive_graph_graph::Mutability::Mutable,
197                    reactive_graph_graph::Extensions::new(),
198                )
199            }
200            Flow3DProperties::F_3_DY => {
201                reactive_graph_graph::PropertyType::new_with_all(
202                    "f3dy",
203                    "The Y position in a 3D flow",
204                    reactive_graph_graph::DataType::Number,
205                    reactive_graph_graph::SocketType::None,
206                    reactive_graph_graph::Mutability::Mutable,
207                    reactive_graph_graph::Extensions::new(),
208                )
209            }
210            Flow3DProperties::F_3_DZ => {
211                reactive_graph_graph::PropertyType::new_with_all(
212                    "f3dz",
213                    "The Z position in a 3D flow",
214                    reactive_graph_graph::DataType::Number,
215                    reactive_graph_graph::SocketType::None,
216                    reactive_graph_graph::Mutability::Mutable,
217                    reactive_graph_graph::Extensions::new(),
218                )
219            }
220        }
221    }
222}
223
224pub struct Flow3DPropertiesIterator(Option<Flow3DProperties>);
225
226impl Flow3DProperties {
227    pub fn into_iter() -> Flow3DPropertiesIterator {
228        Flow3DPropertiesIterator(None)
229    }
230}
231
232impl Iterator for Flow3DPropertiesIterator {
233    type Item = Flow3DProperties;
234    fn next(&mut self) -> Option<Self::Item> {
235        self.0 = match self.0 {
236            None => Some(Flow3DProperties::F_3_DD),
237            Some(Flow3DProperties::F_3_DD) => Some(Flow3DProperties::F_3_DH),
238            Some(Flow3DProperties::F_3_DH) => Some(Flow3DProperties::F_3_DW),
239            Some(Flow3DProperties::F_3_DW) => Some(Flow3DProperties::F_3_DX),
240            Some(Flow3DProperties::F_3_DX) => Some(Flow3DProperties::F_3_DY),
241            Some(Flow3DProperties::F_3_DY) => Some(Flow3DProperties::F_3_DZ),
242            Some(Flow3DProperties::F_3_DZ) => None,
243        };
244        self.0.clone()
245    }
246}
247
248impl IntoIterator for Flow3DProperties {
249    type Item = Flow3DProperties;
250    type IntoIter = Flow3DPropertiesIterator;
251    fn into_iter(self) -> Self::IntoIter {
252        Flow3DPropertiesIterator(None)
253    }
254}
255
256impl core::fmt::Display for Flow3DProperties {
257    fn fmt(&self, f: &mut core::fmt::Formatter) -> Result<(), core::fmt::Error> {
258        match *self {
259            Flow3DProperties::F_3_DD => core::fmt::Display::fmt("f3dd", f),
260            Flow3DProperties::F_3_DH => core::fmt::Display::fmt("f3dh", f),
261            Flow3DProperties::F_3_DW => core::fmt::Display::fmt("f3dw", f),
262            Flow3DProperties::F_3_DX => core::fmt::Display::fmt("f3dx", f),
263            Flow3DProperties::F_3_DY => core::fmt::Display::fmt("f3dy", f),
264            Flow3DProperties::F_3_DZ => core::fmt::Display::fmt("f3dz", f),
265        }
266    }
267}
268
269///
270pub static FLOW_3_D_EXTENSIONS: std::sync::LazyLock<reactive_graph_graph::Extensions> = std::sync::LazyLock::new(||
271{ reactive_graph_graph::Extensions::new() });
272
273pub static FLOW_3_D_TYPE: std::sync::LazyLock<reactive_graph_graph::Component> = std::sync::LazyLock::new(||
274{
275    reactive_graph_graph::Component::builder()
276        .ty(core::ops::Deref::deref(&FLOW_3_D))
277        .description(
278            "The position (x,y,z) of the entity or relation on a three dimensional flow (in-game visual scripting).",
279        )
280        .properties(Flow3DProperties::property_types())
281        .build()
282});
283
284/// # Component `Flow3D`
285///
286/// ## Fully Qualified Namespace
287///
288/// `reactive_graph::flow::Flow3D`
289///
290/// ## Description
291///
292/// The position (x,y,z) of the entity or relation on a three dimensional flow (in-game visual
293/// scripting).
294///
295/// ### Properties
296///
297/// - f3dd
298/// - f3dh
299/// - f3dw
300/// - f3dx
301/// - f3dy
302/// - f3dz
303///
304/// ## JSON Schema
305///
306/// [https://schema.reactive-graph.io/schema/json/dynamic_graph/types/component/reactive_graph/flow/Flow3D.schema.json]()
307///
308pub trait Flow3D {
309    
310    /// ### Property `f3dd`
311    ///
312    /// The depth (z-axis) in a 3D flow
313    ///
314    /// Data Type: `Number`
315    ///
316    /// Socket Type: `None`
317    ///
318    /// Mutability: `Mutable`
319    ///
320    fn f3dd(&self) -> u64;
321    
322    /// ### Property `f3dd`
323    ///
324    /// The depth (z-axis) in a 3D flow
325    ///
326    /// Data Type: `Number`
327    ///
328    /// Socket Type: `None`
329    ///
330    /// Mutability: `Mutable`
331    ///
332    fn set_f3dd(&mut self, f3dd: u64);
333    
334    /// ### Property `f3dh`
335    ///
336    /// The height (y-axis) in a 3D flow
337    ///
338    /// Data Type: `Number`
339    ///
340    /// Socket Type: `None`
341    ///
342    /// Mutability: `Mutable`
343    ///
344    fn f3dh(&self) -> u64;
345    
346    /// ### Property `f3dh`
347    ///
348    /// The height (y-axis) in a 3D flow
349    ///
350    /// Data Type: `Number`
351    ///
352    /// Socket Type: `None`
353    ///
354    /// Mutability: `Mutable`
355    ///
356    fn set_f3dh(&mut self, f3dh: u64);
357    
358    /// ### Property `f3dw`
359    ///
360    /// The width (x-axis) in a 3D flow
361    ///
362    /// Data Type: `Number`
363    ///
364    /// Socket Type: `None`
365    ///
366    /// Mutability: `Mutable`
367    ///
368    fn f3dw(&self) -> u64;
369    
370    /// ### Property `f3dw`
371    ///
372    /// The width (x-axis) in a 3D flow
373    ///
374    /// Data Type: `Number`
375    ///
376    /// Socket Type: `None`
377    ///
378    /// Mutability: `Mutable`
379    ///
380    fn set_f3dw(&mut self, f3dw: u64);
381    
382    /// ### Property `f3dx`
383    ///
384    /// The X position in a 3D flow
385    ///
386    /// Data Type: `Number`
387    ///
388    /// Socket Type: `None`
389    ///
390    /// Mutability: `Mutable`
391    ///
392    fn f3dx(&self) -> u64;
393    
394    /// ### Property `f3dx`
395    ///
396    /// The X position in a 3D flow
397    ///
398    /// Data Type: `Number`
399    ///
400    /// Socket Type: `None`
401    ///
402    /// Mutability: `Mutable`
403    ///
404    fn set_f3dx(&mut self, f3dx: u64);
405    
406    /// ### Property `f3dy`
407    ///
408    /// The Y position in a 3D flow
409    ///
410    /// Data Type: `Number`
411    ///
412    /// Socket Type: `None`
413    ///
414    /// Mutability: `Mutable`
415    ///
416    fn f3dy(&self) -> u64;
417    
418    /// ### Property `f3dy`
419    ///
420    /// The Y position in a 3D flow
421    ///
422    /// Data Type: `Number`
423    ///
424    /// Socket Type: `None`
425    ///
426    /// Mutability: `Mutable`
427    ///
428    fn set_f3dy(&mut self, f3dy: u64);
429    
430    /// ### Property `f3dz`
431    ///
432    /// The Z position in a 3D flow
433    ///
434    /// Data Type: `Number`
435    ///
436    /// Socket Type: `None`
437    ///
438    /// Mutability: `Mutable`
439    ///
440    fn f3dz(&self) -> u64;
441    
442    /// ### Property `f3dz`
443    ///
444    /// The Z position in a 3D flow
445    ///
446    /// Data Type: `Number`
447    ///
448    /// Socket Type: `None`
449    ///
450    /// Mutability: `Mutable`
451    ///
452    fn set_f3dz(&mut self, f3dz: u64);
453}