xvc_ecs/lib.rs
1//! Xvc Entity-Component System is the basic storage mechanism behind Xvc.
2//! It defines an integer-based entity type ([XvcEntity]), a trait to be implemented by components
3//! (structs) and stores to save, load and operate on these components.
4//!
5//! It's an alternative to an object-oriented design where the relations between classes should be
6//! known beforehand.
7//! It allows to implement new components for entities at any point in the
8//! evolution of software.
9//! These components can have 1-1, 1-N or M-N relationships.
10//!
11//! In a sense components are analogous to database tables, and entities are primary keys.
12//! [XvcStore] can be considered akin to a table, and [R11Store], [R1NStore] and [RMNStore] can be
13//! considered as relations.
14#![warn(missing_docs)]
15#![forbid(unsafe_code)]
16pub mod ecs;
17pub mod error;
18
19pub use ecs::hstore::HStore;
20pub use ecs::hstore::SharedHStore;
21pub use ecs::init_generator;
22pub use ecs::load_generator;
23pub use ecs::r11store::R11Store;
24pub use ecs::r1nstore::ChildEntity;
25pub use ecs::r1nstore::R1NStore;
26pub use ecs::rmnstore::RMNStore;
27pub use ecs::storable::Storable;
28pub use ecs::vstore::VStore;
29pub use ecs::xvcstore::SharedXStore;
30pub use ecs::xvcstore::XvcStore;
31pub use ecs::XvcEntity;
32pub use ecs::XvcEntityGenerator;
33
34pub use ecs::event::Event;
35pub use ecs::event::EventLog;
36
37pub use error::Error;
38pub use error::Result;