| 1226 | } |
| 1227 | |
| 1228 | bool WorkspaceObject_Impl::uniquelyIdentifiableByName() const { |
| 1229 | OptionalString oName = name(); |
| 1230 | if (!oName) { |
| 1231 | return true; |
| 1232 | } |
| 1233 | WorkspaceObjectVector candidates = m_workspace->getObjectsByReference(iddObject().references()); |
| 1234 | for (const WorkspaceObject& candidate : candidates) { |
| 1235 | if ((candidate.iddObject().type() == openstudio::IddObjectType::OS_Connection) |
| 1236 | || (candidate.iddObject().type() == openstudio::IddObjectType::OS_PortList)) { |
| 1237 | continue; |
| 1238 | } |
| 1239 | OptionalString candidateName = candidate.name(); |
| 1240 | OS_ASSERT(candidateName); |
| 1241 | if ((istringEqual(*oName, *candidateName) && (!initialized() || (getObject<WorkspaceObject>() != candidate)))) { |
| 1242 | return false; |
| 1243 | } |
| 1244 | } |
| 1245 | return true; |
| 1246 | } |
| 1247 | |
| 1248 | bool WorkspaceObject_Impl::fieldDataIsCorrectType(unsigned index) const { |
| 1249 | OptionalIddField oIddField = iddObject().getField(index); |
nothing calls this directly
no test coverage detected