#include "generators/terminator_generator.h" #include "generators/geometry_generator.h" namespace generator { std::shared_ptr buildTerminator( Parameter& parameter, const json_path& path_to_terminator) { DEBUG_LEVEL_2("Creating terminator."); long int max_interactions = static_cast(parameter.doubleValue( json_path_append(path_to_terminator, {"MaximumInteractions"}))); double max_time_alive = parameter.doubleValue( json_path_append(path_to_terminator, {"MaxTimeAlive", "value"})); DEBUG_LEVEL_3("with max interactions: " + std::to_string(max_interactions)); DEBUG_LEVEL_3("with max time alive: " + std::to_string(max_time_alive)); std::shared_ptr geometry = buildGeometry( parameter, json_path_append(path_to_terminator, {"BoundaryGeometry"})); return std::shared_ptr( new Terminator(max_interactions, max_time_alive, geometry)); } }; // namespace generator