MCPcopy Create free account
hub / github.com/NatLabRockies/OpenStudio / populateValidityReport

Method populateValidityReport

src/utilities/idf/WorkspaceObject.cpp:1204–1226  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1202 // QUERY HELPERS
1203
1204 void WorkspaceObject_Impl::populateValidityReport(ValidityReport& report, bool checkNames) const {
1205 // StrictnessLevel::Minimal
1206 if (report.level() > StrictnessLevel::None) {
1207 // DataErrorType::NotInitialized
1208 // object-level
1209 if (!initialized()) {
1210 report.insertError(DataError(getObject<WorkspaceObject>(), DataErrorType(DataErrorType::NotInitialized)));
1211 return;
1212 }
1213 }
1214
1215 // NOW INHERIT FROM IDFOBJECT
1216 IdfObject_Impl::populateValidityReport(report, checkNames);
1217
1218 // StrictnessLevel::Draft
1219 if (report.level() > StrictnessLevel::Minimal) {
1220 // DataErrorType::NameConflict
1221 // object-level
1222 if (checkNames && !uniquelyIdentifiableByName()) {
1223 report.insertError(DataError(getObject<WorkspaceObject>(), DataErrorType(DataErrorType::NameConflict)));
1224 }
1225 } // StrictnessLevel::Draft
1226 }
1227
1228 bool WorkspaceObject_Impl::uniquelyIdentifiableByName() const {
1229 OptionalString oName = name();

Callers

nothing calls this directly

Calls 3

insertErrorMethod · 0.80
DataErrorClass · 0.70
levelMethod · 0.45

Tested by

no test coverage detected