activity_sdk_topology_enrichment.h 1.7 KB

1234567891011121314151617181920212223242526272829303132333435363738394041
  1. #pragma once
  2. #include <cstdint>
  3. #include <vector>
  4. #include "activity_sdk_topology_inventory.h"
  5. namespace sunrise::client::content::activity::sdk_generation::topology_enrichment {
  6. /** One final slot row before string offsets and capability ranges are linked. */
  7. struct Slot final {
  8. topology_inventory::Text name{};
  9. topology_inventory::Text senseSchemaId{};
  10. topology_inventory::Text authSchemaId{};
  11. std::uint32_t componentClass{state::activity_sdk::format::kAbsentIndex};
  12. std::uint32_t senseSchema{state::activity_sdk::format::kAbsentIndex};
  13. std::uint32_t authSchema{state::activity_sdk::format::kAbsentIndex};
  14. std::uint32_t flags{};
  15. std::uint32_t dialogueCueCount{};
  16. state::activity_sdk::format::Range aliases{};
  17. };
  18. /** Resolved package-inline names and descriptor/reflection joins in topology row order. */
  19. struct Snapshot final {
  20. std::vector<topology_inventory::Text> bubbleNames{};
  21. std::vector<Slot> slots{};
  22. std::vector<topology_inventory::Text> slotAliases{};
  23. };
  24. /** Recomputes every name and schema join and rejects output drift. */
  25. [[nodiscard]] bool validate(const topology_inventory::Snapshot& topology,
  26. const Snapshot& enrichment) noexcept;
  27. /** Resolves exact inline names and package descriptor candidates transactionally. */
  28. [[nodiscard]] bool build(const topology_inventory::Snapshot& topology, Snapshot& output) noexcept;
  29. /** Resolves generated names and package identities without a second output validation pass. */
  30. [[nodiscard]] bool build_generated(const topology_inventory::Snapshot& topology,
  31. Snapshot& output) noexcept;
  32. } // namespace sunrise::client::content::activity::sdk_generation::topology_enrichment