scriptable_catalog_names.h 1.3 KB

12345678910111213141516171819202122232425262728293031323334
  1. #pragma once
  2. #include <cstdint>
  3. #include <span>
  4. #include <string>
  5. #include <vector>
  6. #include "../../../state/build_data/hash_names/definition.h"
  7. #include "../../../state/build_data/scriptables/definition.h"
  8. #include "../../../state/content/content_catalog.h"
  9. namespace sunrise::client::content::activity::scriptables::internal {
  10. /** One bounded inline package string retained with its exact source definition. */
  11. struct InlineName final {
  12. std::uint32_t hash{};
  13. std::uint32_t sourceTag{};
  14. std::string value{};
  15. };
  16. using NameCancelCheck = bool (*)() noexcept;
  17. /**
  18. * Resolves authored hashes and exact installed-package definition tags in one snapshot.
  19. * @param installed Named package definitions, or null for the catalog State publishes.
  20. * @param hashNames Identifier names sorted by hash, or null for the table State publishes.
  21. */
  22. [[nodiscard]] bool resolve_names(state::build_data::scriptables::Snapshot& output,
  23. std::span<const InlineName> inlineNames,
  24. const std::vector<state::content::Definition>* installed,
  25. const std::vector<state::build_data::hash_names::Name>* hashNames,
  26. NameCancelCheck cancel) noexcept;
  27. } // namespace sunrise::client::content::activity::scriptables::internal