Expand description
Xvc Entity-Component System is the basic storage mechanism behind Xvc. It defines an integer-based entity type (XvcEntity), a trait to be implemented by components (structs) and stores to save, load and operate on these components.
It’s an alternative to an object-oriented design where the relations between classes should be known beforehand. It allows to implement new components for entities at any point in the evolution of software. These components can have 1-1, 1-N or M-N relationships.
In a sense components are analogous to database tables, and entities are primary keys. XvcStore can be considered akin to a table, and R11Store, R1NStore and RMNStore can be considered as relations.
Re-exports§
pub use ecs::hstore::HStore;
pub use ecs::init_generator;
pub use ecs::load_generator;
pub use ecs::r11store::R11Store;
pub use ecs::r1nstore::ChildEntity;
pub use ecs::r1nstore::R1NStore;
pub use ecs::rmnstore::RMNStore;
pub use ecs::storable::Storable;
pub use ecs::vstore::VStore;
pub use ecs::xvcstore::XvcStore;
pub use ecs::XvcEntity;
pub use ecs::XvcEntityGenerator;
pub use error::Error;
pub use error::Result;
Modules§
- Xvc Entity Component System allows arbitrary [serializable][Storable] components associated with [entities][XvcEntities] of integers. It’s used instead of object-oriented architecture for flexible and maintainable features.
- Error codes and messages for Xvc ECS
Macros§
- Specifies the store name a type is stored. Usually it’s the string representation of a type. These strings are used to generate store locations for types. They must be unique across the project.