From 7a446d48b9270dbe2628b462a54a7a23ff43c572 Mon Sep 17 00:00:00 2001 From: claiff Date: Mon, 19 Sep 2022 14:03:14 +0300 Subject: temp --- src/checker/registrator_settings.hpp | 35 +++++++++++++++++++++++++++++++++++ 1 file changed, 35 insertions(+) create mode 100644 src/checker/registrator_settings.hpp (limited to 'src/checker/registrator_settings.hpp') diff --git a/src/checker/registrator_settings.hpp b/src/checker/registrator_settings.hpp new file mode 100644 index 0000000..fbd12f5 --- /dev/null +++ b/src/checker/registrator_settings.hpp @@ -0,0 +1,35 @@ +#pragma once + +#include "errors/types/isettings_error.hpp" +#include + +namespace smtp::checker +{ + class RegistratorSettings + { + public: + RegistratorSettings() = default; + ~RegistratorSettings() = default; + + void Add( errors::types::IErrorSettingsPtr const& error ) + { + mErrors.push_back( error ); + } + + template + bool Check( T const& line ) const + { + for( const auto& error: mErrors ) + { + if( !error->Check( line )) + { + return false; + } + } + return true; + } + + private: + std::list < errors::types::IErrorSettingsPtr > mErrors; + }; +} -- cgit v1.2.3