oxide_engine_api/contexts/
object_registry.rs1use std::path::PathBuf;
2use crate::Object;
3
4pub trait ObjectRegistry {
6 fn create_child(&self, object_name: String, script_path: Option<PathBuf>, parent_object: Option<&dyn Object>) -> Option<&dyn Object>;
12
13 fn remove(&self, object: &dyn Object) -> bool;
15
16 fn set_script(&self, object: &dyn Object, script_path: PathBuf) -> bool;
18
19 fn remove_script(&self, object: &dyn Object) -> bool;
21
22 fn move_to_parent(&self, child_object: &dyn Object, new_parent: &dyn Object) -> bool;
24
25 fn get(&self, object_path: &str) -> Option<&dyn Object>;
27
28 fn add_component(&self, object: &dyn Object, component: Box<dyn crate::ComponentData>);
30}