#pragma once #include "FluidSim/EngineConfig.hpp" #include "FluidSim/Silencer.hpp" #include "FluidSim/TwoStrokeConfig.hpp" #include #include #include namespace fluidsim::port { struct ScenarioExample { std::string id,title,description; ScenarioKind kind{ScenarioKind::Twin}; TwoStrokeConfig two{}; ExhaustConfig exhaust{}; JunctionConfig junctions{}; EngineConfig engine{}; std::string category; int order{}; std::filesystem::path source_path; }; ScenarioExample load_engine_file(const std::filesystem::path& path); void migrate_engine_geometry(const std::filesystem::path& path,bool relayout=false); // Writes a distinct, validated engine file; never overwrites a preset. std::filesystem::path save_tuned_engine(const ScenarioExample& source,const EngineConfig& tuning, const std::filesystem::path& directory); std::vector load_engine_directory(const std::filesystem::path& directory); // FLUIDSIM_ENGINE_DIR overrides discovery. Otherwise search the working directory, // beside the executable, then the source tree for developer tools. std::filesystem::path engine_directory(); const std::vector& scenario_examples(); const ScenarioExample& scenario_example(const std::string& id); const ScenarioExample& preset_engine_definition(FourStrokePreset preset); }