CatapultServer
v0.5.0.1 (Elephant)
ValidatorUtils.h
Go to the documentation of this file.
1
21
#pragma once
22
#include "
ValidationResult.h
"
23
24
namespace
catapult
{
namespace
validators {
25
27
template
<
typename
TValue>
28
constexpr
ValidationResult
ValidateLessThanOrEqual
(TValue value, TValue maxValue,
ValidationResult
failureResult) {
29
return
value <= maxValue ?
ValidationResult::Success
: failureResult;
30
}
31
}}
catapult::validators::ValidationResult
ValidationResult
Enumeration of all possible validation results.
Definition:
ValidationResult.h:51
catapult::validators::ValidateLessThanOrEqual
constexpr ValidationResult ValidateLessThanOrEqual(TValue value, TValue maxValue, ValidationResult failureResult)
Validates that value is less than or equal to maxValue and returns failureResult on failure.
Definition:
ValidatorUtils.h:28
ValidationResult.h
catapult::validators::ValidationResult::Success
Validation succeeded.
catapult
Definition:
AddressExtractionExtension.cpp:28
catapult-server
src
catapult
validators
ValidatorUtils.h
Generated by
1.8.16