1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
//===================================================================================================================================================================================//
//
// /$$ /$$ /$$ /$$$$$$$$ /$$$$$$$$ /$$ /$$
// | $$$ | $$ | $$ |__ $$__/ |__ $$__/ |__/ | $$
// | $$$$| $$ /$$$$$$ /$$$$$$$ /$$$$$$ | $$ /$$$$$$ /$$$$$$ /$$$$$$ | $$ /$$$$$$ /$$$$$$ /$$ /$$$$$$ /$$$$$$$
// | $$ $$ $$ /$$__ $$ /$$__ $$ /$$__ $$ | $$ /$$__ $$ /$$__ $$ /$$__ $$ | $$ /$$__ $$|____ $$| $$|_ $$_/ /$$_____/
// | $$ $$$$| $$ \ $$| $$ | $$| $$$$$$$$ | $$| $$ \__/| $$$$$$$$| $$$$$$$$ | $$| $$ \__/ /$$$$$$$| $$ | $$ | $$$$$$
// | $$\ $$$| $$ | $$| $$ | $$| $$_____/ | $$| $$ | $$_____/| $$_____/ | $$| $$ /$$__ $$| $$ | $$ /$$\____ $$
// | $$ \ $$| $$$$$$/| $$$$$$$| $$$$$$$ | $$| $$ | $$$$$$$| $$$$$$$ | $$| $$ | $$$$$$$| $$ | $$$$//$$$$$$$/
// |__/ \__/ \______/ \_______/ \_______/ |__/|__/ \_______/ \_______/ |__/|__/ \_______/|__/ \___/ |_______/
//
//===================================================================================================================================================================================//
//?
//? Created by LunaticWyrm467 and others.
//?
//? All code is licensed under the MIT license.
//? Feel free to reproduce, modify, and do whatever.
//?
//!
//! Stores important traits required to create a fully-fledged `NodeTree` inherited type.
//!
use Any;
use ;
use crateNodeTreeBase;
/*
* Node
* Tree
*/
/// Every application that wishes to take advantage of the `NodeTree` system must have its root
/// struct inherit from this.
///
/// # Example
/// Here is an example implementation:
/// ```rust
/// use node_tree::prelude::*;
///
/// #[derive(Debug, Tree)]
/// pub struct TreeSimple {
/// base: Option<NodeTreeBase>
/// }
///
/// impl TreeSimple {
/// pub fn new<I: Instanceable>(scene: I, verbosity: LoggerVerbosity) -> Box<Self> {
/// let mut tree: Box<TreeSimple> = Box::new(TreeSimple {
/// base: None
/// });
///
/// initialize_base(&mut tree, scene, verbosity); // Not running this will cause undefined behaviour!
/// tree
/// }
/// }
/// ```
/// Note that the `Tree` should be initialized on the heap, preferably with a Box<T> pointer.