summaryrefslogtreecommitdiff
path: root/src/checker/registrator_settings.hpp
diff options
context:
space:
mode:
authorclaiff <claiff@mail.ru>2022-09-21 15:50:34 +0300
committerclaiff <claiff@mail.ru>2022-09-21 15:50:34 +0300
commit641c95dcf8c6585caaa6e79d4bec9b53fd666369 (patch)
tree3c7e38f17738c181437f482d05c66dde94f7c28a /src/checker/registrator_settings.hpp
parent629929ebbe386277c25740bc0f4971aac38444d0 (diff)
parent6cfc7076808138be2ad5a2b05edd635b5948bf31 (diff)
downloadobmc-sila-smtp-641c95dcf8c6585caaa6e79d4bec9b53fd666369.tar.xz
Merge branch 'feature/checking'
Diffstat (limited to 'src/checker/registrator_settings.hpp')
-rw-r--r--src/checker/registrator_settings.hpp35
1 files changed, 35 insertions, 0 deletions
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 <list>
+
+namespace smtp::checker
+{
+ class RegistratorSettings
+ {
+ public:
+ RegistratorSettings() = default;
+ ~RegistratorSettings() = default;
+
+ void Add( errors::types::IErrorSettingsPtr const& error )
+ {
+ mErrors.push_back( error );
+ }
+
+ template<typename T>
+ 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;
+ };
+}