rigProject 0.1.1
RigKit pack API - rigProject
Loading...
Searching...
No Matches
rigkit::project::ComponentSerializerRegistry Class Reference

Named component codecs for .rigdoc entity dumps. More...

#include <rigProject/src/ComponentSerializerRegistry.h>

Public Member Functions

std::vector< entt::entity > collectEntities (entt::registry &reg) const
 Union of entities that carry any registered serializable component.
int applyDeserializers (entt::registry &reg, entt::entity entity, const ordered_json &components, const std::vector< std::string > &skipSchemaIds={}) const
 Run every registered deserialize whose schemaId is a key in components.

Detailed Description

Named component codecs for .rigdoc entity dumps.

Packs register serializers here; ProjectSerializer walks them on save/load. Plot packs add codecs without changing the host.

Member Function Documentation

◆ applyDeserializers()

int rigkit::project::ComponentSerializerRegistry::applyDeserializers ( entt::registry & reg,
entt::entity entity,
const ordered_json & components,
const std::vector< std::string > & skipSchemaIds = {} ) const

Run every registered deserialize whose schemaId is a key in components.

Used by Contract import and any other path that already has a components object. Returns how many codecs applied. Skips schema ids in skipSchemaIds (Contract-specific handling, e.g. relationship by doc id).


The documentation for this class was generated from the following file:
  • packs/rigProject/src/ComponentSerializerRegistry.h