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
//===================================================================================================================================================================================//
//
//  /$$$$$$$                        /$$    
// | $$__  $$                      | $$    
// | $$  \ $$  /$$$$$$   /$$$$$$  /$$$$$$  
// | $$$$$$$/ /$$__  $$ /$$__  $$|_  $$_/  
// | $$__  $$| $$  \ $$| $$  \ $$  | $$    
// | $$  \ $$| $$  | $$| $$  | $$  | $$ /$$
// | $$  | $$|  $$$$$$/|  $$$$$$/  |  $$$$/
// |__/  |__/ \______/  \______/    \___/
//
//===================================================================================================================================================================================//

//?
//? Created by LunaticWyrm467 and others.
//? 
//? All code is licensed under the MIT license.
//? Feel free to reproduce, modify, and do whatever.
//?

//!
//! The root file of the library.
//! Contains the `prelude` module which you will probably want to import from.
//!
//! A simple node implementation will look like the following:
//! ```rust
//! use node_tree::prelude::*;
//!
//!
//! #[derive(Debug, Clone, Abstract)] // Nodes require `Debug` and `Clone`.
//! pub struct NodeA {
//!     base: NodeBase   // Required for Nodes.
//! }
//! 
//! impl NodeA {
//!     fn new(name: String) -> Self {
//!         NodeA { base: NodeBase::new(name) }
//!     }
//! }
//!
//! impl Node for NodeA {
//!     // feel free to implement `ready()`, `process()`, `terminal()` and/or `process_mode()`
//!     // here.
//! }
//! ```

pub mod structs;
pub mod traits;
pub mod utils;
pub mod trees;
pub mod prelude {
    //! Contains everything you'll need to create and handle Nodes and NodeTrees.
    //! You'll probably want to import all from this module.

    pub use std::rc::Rc;
    pub use node_tree_derive::{ Abstract, Tree, scene };
    pub use crate::structs::{
        cloneable_types::{ Doc, Eoc, Voc },
        logger::{ LoggerVerbosity, Log },
        node_base::NodeBase,
        node_path::NodePath,
        node_tree_base::{ NodeTreeBase, TreeStatus, TreeProcess, ProcessMode, initialize_base },
        tree_pointer::{ Tp, TpDyn },
        node_scene::NodeScene,
        rid::RID,
    };
    pub use crate::traits::{
        node::{ Node, NodeAbstract },
        node_tree::NodeTree,
        instanceable::Instanceable
    };
}