OpenStudio:utilities
 All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Friends Pages
Related Functions | List of all members
openstudio::ValidityReport Class Reference

#include <ValidityReport.hpp>

Public Member Functions

Construction
 ValidityReport (StrictnessLevel level)
 Collection-level constructor. More...
 
 ValidityReport (StrictnessLevel level, const IdfObject &object)
 Object-level constructor. More...
 
 ValidityReport (const ValidityReport &other)
 Copy constructor. More...
 
void insertError (const DataError &error)
 Insert error into the report. More...
 
Inspection
StrictnessLevel level () const
 The strictness level of the report. More...
 
Scope scope () const
 Scope of the report. More...
 
std::string objectName () const
 Returns the name of the object being reported on, or an empty string. More...
 
boost::optional< IddObjectType > 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. More...
 
unsigned numErrors () const
 Returns the number of errors listed in the report. More...
 
boost::optional< DataErrornextError ()
 Get the next DataError in the report. More...
 

Related Functions

(Note that these are not member functions.)

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

Constructor & Destructor Documentation

openstudio::ValidityReport::ValidityReport ( StrictnessLevel  level)

Collection-level constructor.

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

Object-level constructor.

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

Copy constructor.

Resets .nextError() in the cloned report.

Member Function Documentation

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

Insert error into the report.

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

StrictnessLevel openstudio::ValidityReport::level ( ) const

The strictness level of the report.

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

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.)

unsigned openstudio::ValidityReport::numErrors ( ) const

Returns the number of errors listed in the report.

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

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

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 openstudio::ValidityReport::scope ( ) const

Scope of the report.

Will be collection or object level.

Friends And Related Function Documentation

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

Ostream operator for ValidityReport.