Porytiles
Loading...
Searching...
No Matches
porytiles::CompileSecondaryTileset Class Reference

Use case for compiling a secondary Tileset. More...

#include <compile_secondary_tileset.hpp>

Public Member Functions

 CompileSecondaryTileset (gsl::not_null< const TilesetRepo * > tileset_repo, gsl::not_null< const TilesetCompiler * > compiler, gsl::not_null< const TilesetMetadataProvider * > metadata_provider, gsl::not_null< const LayoutMetadataProvider * > layout_metadata_provider, gsl::not_null< const PorytilesTilesetManager * > tileset_manager, gsl::not_null< const DomainConfig * > domain_config, gsl::not_null< const AppConfig * > app_config, gsl::not_null< const UserDiagnostics * > diag)
 Constructs a CompileSecondaryTileset use case with the given repositories and services.
 
ChainableResult< void > compile (const std::string &tileset_name) const
 Compiles the secondary Tileset with the given tileset name.
 

Detailed Description

Use case for compiling a secondary Tileset.

Orchestrates secondary tileset compilation by resolving the paired primary tileset (via automatic layout scanning, manual configuration, or standalone mode), loading the necessary data, invoking the compiler, and persisting the result. The pairing mode is controlled by the primary_pairing_mode configuration value.

Definition at line 27 of file compile_secondary_tileset.hpp.

Constructor & Destructor Documentation

◆ CompileSecondaryTileset()

porytiles::CompileSecondaryTileset::CompileSecondaryTileset ( gsl::not_null< const TilesetRepo * >  tileset_repo,
gsl::not_null< const TilesetCompiler * >  compiler,
gsl::not_null< const TilesetMetadataProvider * >  metadata_provider,
gsl::not_null< const LayoutMetadataProvider * >  layout_metadata_provider,
gsl::not_null< const PorytilesTilesetManager * >  tileset_manager,
gsl::not_null< const DomainConfig * >  domain_config,
gsl::not_null< const AppConfig * >  app_config,
gsl::not_null< const UserDiagnostics * >  diag 
)
inline

Constructs a CompileSecondaryTileset use case with the given repositories and services.

Parameters
tileset_repoA pointer to the TilesetRepo for this use case.
compilerA pointer to the TilesetCompiler for this use case.
metadata_providerA pointer to the TilesetMetadataProvider for this use case.
layout_metadata_providerA pointer to the LayoutMetadataProvider for automatic primary resolution.
tileset_managerA pointer to the PorytilesTilesetManager for this use case.
domain_configA pointer to the DomainConfig for this use case.
app_configA pointer to the AppConfig for this use case.
diagA pointer to the UserDiagnostics for this use case.

Definition at line 41 of file compile_secondary_tileset.hpp.

Member Function Documentation

◆ compile()

ChainableResult< void > porytiles::CompileSecondaryTileset::compile ( const std::string &  tileset_name) const

Compiles the secondary Tileset with the given tileset name.

Given a secondary tileset by name, resolves the paired primary tileset according to the configured pairing mode, then compiles the PorytilesTileset assets into PorymapTileset assets. Uses the use case's configured repos to load and save the tileset assets.

Parameters
tileset_nameThe name of the secondary Tileset to compile.
Precondition
tileset_name must refer to an existing tileset in the project metadata.
Returns
An empty Result on success, otherwise an error description.

Definition at line 16 of file compile_secondary_tileset.cpp.


The documentation for this class was generated from the following files: