#include "scanner.h" #include "protocols/iprotocol.h" Scanner::Scanner(std::shared_ptr camera, std::vector> protocols) : IScanner{camera, protocols} { // m_protocols.push_back() } bool Scanner::startAllProtocols() { for (const auto& protocol : m_protocols) { if (!protocol->start()) { stopAllProtocols(); return false; } } return true; } void Scanner::stopAllProtocols() { for (const auto& protocol : m_protocols) { protocol->stop(); } }