#pragma once #include #include #include "../../../state/activity_sdk/generation/pack_writer.h" namespace sunrise::client::content::activity::sdk_generation::activity_enrichment_inventory { struct Snapshot; } namespace sunrise::client::content::activity::sdk_generation::activity_inventory { struct Snapshot; } namespace sunrise::client::content::activity::sdk_generation::actor_rsat_inventory { struct Snapshot; } namespace sunrise::client::content::activity::sdk_generation::authored_scene_inventory { struct Snapshot; } namespace sunrise::client::content::activity::sdk_generation::behavior_inventory { struct Snapshot; } namespace sunrise::client::content::activity::sdk_generation::policy_inventory { struct Snapshot; } namespace sunrise::client::content::activity::sdk_generation::squad_inventory { struct Facts; struct Snapshot; } // namespace sunrise::client::content::activity::sdk_generation::squad_inventory namespace sunrise::client::content::activity::sdk_generation::topology_enrichment { struct Snapshot; } namespace sunrise::client::content::activity::sdk_generation::topology_inventory { struct Snapshot; } namespace sunrise::client::content::activity::sdk_generation::pack_composer { namespace format = state::activity_sdk::format; namespace pack = state::activity_sdk::generation::pack; /** Accepted native inventories needed to close every runtime-pack section. */ struct Inputs final { const activity_inventory::Snapshot* activityInventory{}; const activity_enrichment_inventory::Snapshot* activityEnrichment{}; const topology_inventory::Snapshot* topology{}; const topology_enrichment::Snapshot* topologyEnrichment{}; const policy_inventory::Snapshot* policy{}; const actor_rsat_inventory::Snapshot* actorRsat{}; const squad_inventory::Facts* squadFacts{}; const squad_inventory::Snapshot* squads{}; const authored_scene_inventory::Snapshot* authoredScenes{}; const behavior_inventory::Snapshot* behaviors{}; }; /** Owned final rows whose borrowed view remains valid until this object changes. */ struct Storage final { std::vector strings{}; std::vector activities{}; std::vector scenarios{}; std::vector bubbles{}; std::vector states{}; std::vector objects{}; std::vector occurrences{}; std::vector slots{}; std::vector texts{}; std::vector capabilities{}; std::vector gates{}; std::vector refusals{}; std::vector actorClasses{}; std::vector rsatDescriptors{}; std::vector rsatSchemas{}; std::vector rsatFields{}; std::vector squads{}; std::vector squadMembers{}; std::vector squadAnchors{}; std::vector authoredSceneResources{}; std::vector authoredSceneSquadEdges{}; std::vector taskTargets{}; std::vector dialogueCueTexts{}; std::vector directiveElements{}; std::vector activityBindingTags{}; std::vector activityBindingLocators{}; std::vector behaviorPrograms{}; std::vector behaviorInputs{}; std::vector behaviorChannelWrites{}; std::vector behaviorOwners{}; std::vector behaviorActivityBindings{}; std::vector actorMessageSchemas{}; std::vector actorCommandDefinitions{}; std::vector actorBehaviorProfiles{}; std::vector simulationEventDefinitions{}; std::vector runtimeSchemas{}; std::vector runtimeFields{}; std::vector runtimeTypeDefinitions{}; std::vector sobjectRsats{}; std::vector sobjectRsatDescriptors{}; std::vector entityTypeDefinitions{}; std::vector sobjectRsatFieldBindings{}; std::vector actorStateNames{}; std::vector actorSequenceTables{}; std::vector actorSequenceEntries{}; std::vector actorSequenceBindings{}; std::vector dialogueCues{}; std::vector combatObjectiveGroups{}; std::vector actorAbilities{}; std::vector actorAbilityTargets{}; std::vector authoredSceneEventKeys{}; /** @return Borrowed sections in exact current format order. */ [[nodiscard]] pack::Tables tables() const noexcept; }; /** Links accepted native inventories without building or publishing a file. */ [[nodiscard]] bool compose(const Inputs& inputs, Storage& output) noexcept; /** Links generation-owned inventories without rerunning their validation passes. */ [[nodiscard]] bool compose_generated(const Inputs& inputs, Storage& output) noexcept; /** Links all rows and calls the in-memory runtime-pack writer transactionally. */ [[nodiscard]] pack::Status build(const pack::Identity& identity, const Inputs& inputs, Storage& tables, std::vector& image, pack::Digest& payloadSha256) noexcept; } // namespace sunrise::client::content::activity::sdk_generation::pack_composer