Provide a facade for detector's controller and receivers template instance
The idea is to compile the controller and receivers to a library (instead of a header only library) and provide a facade using the PImpl idiom:
// simulator/controller.hpp
class controller
{
public:
// Public members
void start_acq();
private:
struct impl; // forward declaration of the implementation class
std::experimental::propagate_const< // const-forwarding pointer wrapper
std::unique_ptr< // unique-ownership opaque pointer
impl>> m_pimpl;
};
// simulator/controller.cpp
#include <lima/controller.hpp>
class controller::impl : lima::controller<simulator::camera>
{
using parent_t = lima::controller<simulator::camera>;
using parent_t::parent_t;
};
void controller::start_acq() { m_pimpl->start_acq(); }
The package for a camera would then consist in the header above and the library built from the cpp above. I think this would also simplify the development of downstream project such as the Python binding (reducing a lot the dependencies).