OpenStudio:utilities
Loading...
Searching...
No Matches
openstudio::ValidityReport Class Reference

#include <ValidityReport.hpp>

Public Member Functions

Construction
 ValidityReport (StrictnessLevel level)
 Collection-level constructor.
 
 ValidityReport (StrictnessLevel level, const IdfObject &object)
 Object-level constructor.
 
 ValidityReport (const ValidityReport &other)
 Copy constructor.
 
void insertError (const DataError &error)
 Insert error into the report.
 

Related Symbols

(Note that these are not member symbols.)

std::ostream & operator<< (std::ostream &os, const ValidityReport &report)
 Ostream operator for ValidityReport.
 

Inspection

StrictnessLevel level () const
 The strictness level of the report.
 
Scope scope () const
 Scope of the report.
 
std::string objectName () const
 Returns the name of the object being reported on, or an empty string.
 
boost::optional< IddObjectTypeobjectType () const
 Returns the type of the object being reported on if this is a report on an individual object; if the report is for an entire collection, the return value will evaluate to false.
 
unsigned numErrors () const
 Returns the number of errors listed in the report.
 
boost::optional< DataErrornextError ()
 Get the next DataError in the report.
 

Constructor & Destructor Documentation

◆ ValidityReport() [1/3]

openstudio::ValidityReport::ValidityReport ( StrictnessLevel level)

Collection-level constructor.

◆ ValidityReport() [2/3]

openstudio::ValidityReport::ValidityReport ( StrictnessLevel level,
const IdfObject & object )

Object-level constructor.

◆ ValidityReport() [3/3]

openstudio::ValidityReport::ValidityReport ( const ValidityReport & other)

Copy constructor.

Resets .nextError() in the cloned report.

Member Function Documentation

◆ insertError()

void openstudio::ValidityReport::insertError ( const DataError & error)

Insert error into the report.

Should only be called by a class that is constructing the report.

◆ level()

StrictnessLevel openstudio::ValidityReport::level ( ) const

The strictness level of the report.

StrictnessLevel::Minimal is for opening files, StricnessLevel::Draft is for active modeling, and StrictnessLevel::Final is for models ready to simulate.

◆ nextError()

boost::optional< DataError > openstudio::ValidityReport::nextError ( )

Get the next DataError in the report.

To be used in data clean-up/debugging. Return value of false indicates that the last error has already been reported. (If the report is non-empty, then the next call to nextError() will start cycling back through the errors.)

◆ numErrors()

unsigned openstudio::ValidityReport::numErrors ( ) const

Returns the number of errors listed in the report.

◆ objectName()

std::string openstudio::ValidityReport::objectName ( ) const

Returns the name of the object being reported on, or an empty string.

◆ objectType()

boost::optional< IddObjectType > openstudio::ValidityReport::objectType ( ) const

Returns the type of the object being reported on if this is a report on an individual object; if the report is for an entire collection, the return value will evaluate to false.

◆ scope()

Scope openstudio::ValidityReport::scope ( ) const

Scope of the report.

Will be collection or object level.

Friends And Related Symbol Documentation

◆ operator<<()

std::ostream & operator<< ( std::ostream & os,
const ValidityReport & report )
related

Ostream operator for ValidityReport.