CatapultServer  v0.5.0.1 (Elephant)
EntityValidator.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 
30  template<typename... TArgs>
32  public:
33  virtual ~EntityValidatorT() = default;
34 
35  public:
37  virtual const std::string& name() const = 0;
38 
40  virtual ValidationResult validate(const model::WeakEntityInfo& entityInfo, TArgs&&... args) const = 0;
41  };
42 }}
catapult::validators::EntityValidatorT::validate
virtual ValidationResult validate(const model::WeakEntityInfo &entityInfo, TArgs &&... args) const =0
Validates a single entityInfo with contextual information args.
catapult::validators::ValidationResult
ValidationResult
Enumeration of all possible validation results.
Definition: ValidationResult.h:51
WeakEntityInfo.h
catapult::model::WeakEntityInfoT
Wrapper around a strongly typed entity and its associated metadata.
Definition: WeakEntityInfo.h:33
catapult::validators::EntityValidatorT
Definition: EntityValidator.h:31
ValidationResult.h
catapult::validators::EntityValidatorT::~EntityValidatorT
virtual ~EntityValidatorT()=default
catapult
Definition: AddressExtractionExtension.cpp:28
catapult::validators::EntityValidatorT::name
virtual const std::string & name() const =0
Gets the validator name.