#pragma once #include "Processor/file_processor.hpp" #include "cd_file_types.hpp" namespace JabyEngine { namespace FileProcessor { namespace Helper { template static void simple_read(T& dst, State::Configuration& config) { static constexpr size_t T_SIZE = sizeof(T); dst = *reinterpret_cast(config.data_adr); config.processed(T_SIZE); } template static Progress exchange_and_execute_process_function(State::GenericProcessRoutine process_routine, State::Configuration& config, T& state) { config.process_routine = reinterpret_cast(process_routine); return process_routine(config, state); } } } }