CatapultServer  v0.5.0.1 (Elephant)
NotificationValidator.h
Go to the documentation of this file.
1 
21 #pragma once
22 #include "ValidationResult.h"
24 #include <string>
25 
26 namespace catapult { namespace validators {
27 
29  template<typename TNotification, typename... TArgs>
31  public:
33  using NotificationType = TNotification;
34 
35  public:
36  virtual ~NotificationValidatorT() = default;
37 
38  public:
40  virtual const std::string& name() const = 0;
41 
43  virtual ValidationResult validate(const TNotification& notification, TArgs&&... args) const = 0;
44  };
45 }}
catapult::validators::NotificationValidatorT::name
virtual const std::string & name() const =0
Gets the validator name.
catapult::validators::NotificationValidatorT
A strongly typed notification validator.
Definition: NotificationValidator.h:30
catapult::validators::ValidationResult
ValidationResult
Enumeration of all possible validation results.
Definition: ValidationResult.h:51
catapult::validators::NotificationValidatorT< TNotification, TArgs... >::NotificationType
TNotification NotificationType
Notification type.
Definition: NotificationValidator.h:33
Notifications.h
ValidationResult.h
catapult
Definition: AddressExtractionExtension.cpp:28
catapult::validators::NotificationValidatorT::validate
virtual ValidationResult validate(const TNotification &notification, TArgs &&... args) const =0
Validates a single notification with contextual information args.
catapult::validators::NotificationValidatorT::~NotificationValidatorT
virtual ~NotificationValidatorT()=default