Flip Reference

 

ValidationReportWriter Class Reference

Namespace

ohm::flip

Declared in

ohm/flip/ValidationReportWriter.h

Overview

The ValidationReportWriter class implements a class for the model validator to reports errors in a human readable format.

The following sections will only document the public API.

Partial Class Diagram

Methods Overview

Manipulating

Formatting

format_0 as in the following function is a formatted string that will get expanded with the chained call of arg .

For example :

print_logical_error ("Error %1% : `%2%'").arg (2).arg ("Out of Bound")

will produce the string :

"Error 2 : `Out of Bound'"

The number surrounded by % is the argument number as pushed after, and starts from 1 .

The supported types to push in arg are :

The value will be formatted in its “natural” format.

Note:std::string is not supported and you must use its c_str () member.

Methods

print_logical_error

Adds a new error with formatted string format_0 . The error is considered as “normal” in the sense that this error might occur and is not malicious.

The format of format_0 is explained above.

ValidationReportWriter &
               print_logical_error (const char * format_0);

print_severe_error

Adds a new error with formatted string format_0 . The error is considered as “severe” in the sense that this error might never occur and the transaction that produced it might be malicious.

The format of format_0 is explained above.

ValidationReportWriter &
               print_severe_error (const char * format_0);

arg

Push an argument to the formatted string.

The format of format_0 is explained above.

template <class T>
ValidationReportWriter &
               arg (T val);