OpenStudioCore:utilities
 AllClasses Namespaces Functions Variables Typedefs Enumerations Enumerator Friends Pages

#include "DataError.hpp"

Public Member Functions

 DataError (unsigned fieldIndex, const IdfObject &object, DataErrorType errorType)
 DataError (const IdfObject &object, DataErrorType errorType)
 DataError (DataErrorType errorType)
 DataError (DataErrorType errorType, IddObjectType objectType)
Scope scope () const
DataErrorType type () const
unsigned fieldIdentifier () const
Handle objectIdentifier () const
std::string objectName () const
boost::optional< IddObjectTypeobjectType () const
bool operator== (const DataError &otherError) const
bool operator!= (const DataError &otherError) const

Related Functions

typedef std::set< DataError,
DataErrorLess
DataErrorSet
typedef std::vector< DataErrorDataErrorVector
std::ostream & operator<< (std::ostream &os, const DataError &error)
typedef boost::optional
< DataError
OptionalDataError

Constructor & Destructor Documentation

openstudio::DataError::DataError ( unsigned  fieldIndex,
const IdfObject object,
DataErrorType  errorType 
)

Constructor for field-level error.

openstudio::DataError::DataError ( const IdfObject object,
DataErrorType  errorType 
)

Constructor for object-level error.

openstudio::DataError::DataError ( DataErrorType  errorType)

Constructor for collection-level error without a related IddObjectType.

openstudio::DataError::DataError ( DataErrorType  errorType,
IddObjectType  objectType 
)

Constructor for collection-level error with a related IddObjectType.

Member Function Documentation

unsigned openstudio::DataError::fieldIdentifier ( ) const

Returns the index of the erroneous field, if scope() == Scope::Field, otherwise throws.

Handle openstudio::DataError::objectIdentifier ( ) const

Returns the handle of the erroneous object, if applicable.

Otherwise, returned Handle.isNull().

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

Returns the name of the object identified by objectIdentifier(), or an empty string.

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

Returns the type of the object identified by objectIdentifier() if the error is field- or object-level; if the error is collection level, the return value will either evaluate to false or be related to a cardinality constraint.

bool openstudio::DataError::operator!= ( const DataError otherError) const

Negation of operator==.

bool openstudio::DataError::operator== ( const DataError otherError) const

Returns true if all data exactly equal.

Scope openstudio::DataError::scope ( ) const

Returns the scope of the error.

DataErrorType openstudio::DataError::type ( ) const

Returns the enum that describes the error.

The .valueDescription() contains a brief description.

Friends And Related Function Documentation

typedef std::set<DataError,DataErrorLess> DataErrorSet
related

Set container for DataError.

typedef std::vector<DataError> DataErrorVector
related
std::ostream & operator<< ( std::ostream &  os,
const DataError error 
)
related

Ostream operator for DataError.

typedef boost::optional<DataError> OptionalDataError
related