CatapultServer  v0.5.0.1 (Elephant)
ValidationResult.cpp File Reference
Include dependency graph for ValidationResult.cpp:

Namespaces

 catapult
 
 catapult::validators
 

Macros

#define DEFINE_CASE(RESULT)   case utils::to_underlying_type(RESULT)
 
#define CASE_WELL_KNOWN_RESULT(CODE)   DEFINE_CASE(ValidationResult::CODE): return #CODE
 
#define CUSTOM_RESULT_DEFINITION   1
 
#define STR(SYMBOL)   #SYMBOL
 
#define DEFINE_VALIDATION_RESULT(SEVERITY, FACILITY, DESCRIPTION, CODE, FLAGS)
 

Functions

std::ostream & catapult::validators::operator<< (std::ostream &out, ValidationResult result)
 Insertion operator for outputting result to out. More...
 

Macro Definition Documentation

◆ CASE_WELL_KNOWN_RESULT

#define CASE_WELL_KNOWN_RESULT (   CODE)    DEFINE_CASE(ValidationResult::CODE): return #CODE

◆ CUSTOM_RESULT_DEFINITION

#define CUSTOM_RESULT_DEFINITION   1

◆ DEFINE_CASE

#define DEFINE_CASE (   RESULT)    case utils::to_underlying_type(RESULT)

◆ DEFINE_VALIDATION_RESULT

#define DEFINE_VALIDATION_RESULT (   SEVERITY,
  FACILITY,
  DESCRIPTION,
  CODE,
  FLAGS 
)
Value:
DEFINE_CASE(MakeValidationResult((ResultSeverity::SEVERITY), (FacilityCode::FACILITY), CODE, (ResultFlags::FLAGS))): \
return STR(SEVERITY##_##FACILITY##_##DESCRIPTION)

◆ STR

#define STR (   SYMBOL)    #SYMBOL
STR
#define STR(SYMBOL)
Definition: ValidationResult.cpp:34
DEFINE_CASE
#define DEFINE_CASE(RESULT)
Definition: ValidationResult.cpp:27
catapult::validators::MakeValidationResult
constexpr ValidationResult MakeValidationResult(ResultSeverity severity, FacilityCode facility, uint16_t code, ResultFlags flags)
Makes a validation result given severity, facility, code and flags.
Definition: ValidationResult.h:63