1515
1616namespace power_grid_model {
1717
18- template <class MainModel , typename ... ComponentType> class JobDispatchAdapter ;
18+ template <class MainModel , typename ... ComponentType> class JobAdapter ;
1919
2020template <class MainModel , class ... ComponentType>
21- class JobDispatchAdapter <MainModel, ComponentList<ComponentType...>>
22- : public JobDispatchInterface<JobDispatchAdapter <MainModel, ComponentList<ComponentType...>>> {
21+ class JobAdapter <MainModel, ComponentList<ComponentType...>>
22+ : public JobInterface<JobAdapter <MainModel, ComponentList<ComponentType...>>> {
2323 public:
24- JobDispatchAdapter (std::reference_wrapper<MainModel> model_reference,
25- std::reference_wrapper<MainModelOptions const > options)
24+ JobAdapter (std::reference_wrapper<MainModel> model_reference,
25+ std::reference_wrapper<MainModelOptions const > options)
2626 : model_reference_{model_reference}, options_{options} {}
27- JobDispatchAdapter (JobDispatchAdapter const & other)
27+ JobAdapter (JobAdapter const & other)
2828 : model_copy_{std::make_unique<MainModel>(other.model_reference_ .get ())},
2929 model_reference_{std::ref (*model_copy_)},
3030 options_{std::ref (other.options_ )},
3131 components_to_update_{other.components_to_update_ },
3232 update_independence_{other.update_independence_ },
3333 independence_flags_{other.independence_flags_ },
3434 all_scenarios_sequence_{other.all_scenarios_sequence_ } {}
35- JobDispatchAdapter & operator =(JobDispatchAdapter const & other) {
35+ JobAdapter & operator =(JobAdapter const & other) {
3636 if (this != &other) {
3737 model_copy_ = std::make_unique<MainModel>(other.model_reference_ .get ());
3838 model_reference_ = std::ref (*model_copy_);
@@ -44,15 +44,15 @@ class JobDispatchAdapter<MainModel, ComponentList<ComponentType...>>
4444 }
4545 return *this ;
4646 }
47- JobDispatchAdapter (JobDispatchAdapter && other) noexcept
47+ JobAdapter (JobAdapter && other) noexcept
4848 : model_copy_{std::move (other.model_copy_ )},
4949 model_reference_{model_copy_ ? std::ref (*model_copy_) : std::move (other.model_reference_ )},
5050 options_{other.options_ },
5151 components_to_update_{std::move (other.components_to_update_ )},
5252 update_independence_{std::move (other.update_independence_ )},
5353 independence_flags_{std::move (other.independence_flags_ )},
5454 all_scenarios_sequence_{std::move (other.all_scenarios_sequence_ )} {}
55- JobDispatchAdapter & operator =(JobDispatchAdapter && other) noexcept {
55+ JobAdapter & operator =(JobAdapter && other) noexcept {
5656 if (this != &other) {
5757 model_copy_ = std::move (other.model_copy_ );
5858 model_reference_ = model_copy_ ? std::ref (*model_copy_) : std::move (other.model_reference_ );
@@ -64,13 +64,13 @@ class JobDispatchAdapter<MainModel, ComponentList<ComponentType...>>
6464 }
6565 return *this ;
6666 }
67- ~JobDispatchAdapter () { model_copy_.reset (); }
67+ ~JobAdapter () { model_copy_.reset (); }
6868
6969 private:
70- // Grant the CRTP base (JobDispatchInterface<JobDispatchAdapter >) access to
71- // JobDispatchAdapter 's private members. This allows the base class template
70+ // Grant the CRTP base (JobInterface<JobAdapter >) access to
71+ // JobAdapter 's private members. This allows the base class template
7272 // to call derived-class implementation details as part of the CRTP pattern.
73- friend class JobDispatchInterface <JobDispatchAdapter >;
73+ friend class JobInterface <JobAdapter >;
7474
7575 std::unique_ptr<MainModel> model_copy_;
7676 std::reference_wrapper<MainModel> model_reference_;
0 commit comments