hyperledger/iroha
Iroha - A simple, decentralized ledger http://iroha.tech
shared_model::validation::Answer Class Reference

#include "answer.hpp"

Collaboration diagram for shared_model::validation::Answer:
Collaboration graph

Public Member Functions

 operator bool () const
 
std::string reason () const
 
bool hasErrors ()
 
void addReason (ReasonsGroupType &&reasons)
 
std::map< ReasonsGroupName, GroupedReasonsgetReasonsMap ()
 

Detailed Description

Class which represents the answer to stateless validation: whether validation is done right and if not it explains the reason

Member Function Documentation

◆ addReason()

void shared_model::validation::Answer::addReason ( ReasonsGroupType &&  reasons)
inline

Adds error to map

Parameters
reasons
Here is the caller graph for this function:

◆ getReasonsMap()

std::map<ReasonsGroupName, GroupedReasons> shared_model::validation::Answer::getReasonsMap ( )
inline

◆ hasErrors()

bool shared_model::validation::Answer::hasErrors ( )
inline

Check if any error has been recorded to the answer

Returns
true if there are any errors, false otherwise
Here is the caller graph for this function:

◆ operator bool()

shared_model::validation::Answer::operator bool ( ) const
inline

◆ reason()

std::string shared_model::validation::Answer::reason ( ) const
inline
Returns
string representation of errors
Here is the call graph for this function:
Here is the caller graph for this function:

The documentation for this class was generated from the following file: