Program Listing for File crw.hpp
↰ Return to documentation for file (cosm/spatial/strategy/explore/crw.hpp
)
#pragma once
/*******************************************************************************
* Includes
******************************************************************************/
#include <memory>
#include "rcppsw/er/client.hpp"
#include "rcppsw/math/rng.hpp"
#include "cosm/spatial/strategy/explore/base_explore.hpp"
#include "cosm/cosm.hpp"
/*******************************************************************************
* Namespaces
******************************************************************************/
namespace cosm::spatial::strategy::explore {
/*******************************************************************************
* Class Definitions
******************************************************************************/
class crw : public cssexplore::base_explore,
public rer::client<crw> {
public:
crw(const csfsm::fsm_params* params,
const cssexplore::config::explore_config* config,
rmath::rng* rng);
~crw(void) override = default;
crw(const crw&) = delete;
crw& operator=(const crw&) = delete;
/* taskable overrides */
void task_start(cta::taskable_argument*) override final {
m_task_running = true;
}
bool task_running(void) const override final { return m_task_running; }
bool task_finished(void) const override final { return false; }
void task_execute(void) override final;
void task_reset(void) override final;
/* prototype overrides */
std::unique_ptr<base_explore> clone(void) const override {
csfsm::fsm_params params {
saa(),
inta_tracker(),
nz_tracker()
};
return std::make_unique<crw>(¶ms, config(), rng());
}
private:
/* clang-format off */
bool m_task_running{false};
/* clang-format on */
};
} /* namespace cosm::spatial::strategy::explore */