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

Method getSources

src/utilities/idf/WorkspaceObject.cpp:286–304  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

284 }
285
286 WorkspaceObjectVector WorkspaceObject_Impl::getSources(IddObjectType type) const {
287 WorkspaceObjectVector result;
288 if (!initialized()) {
289 return result;
290 }
291 if (m_targetData) {
292 for (const ReversePointer& ptr : m_targetData->reversePointers) {
293 OS_ASSERT(!ptr.sourceHandle.isNull());
294 OptionalWorkspaceObject owo = this->workspace().getObject(ptr.sourceHandle);
295 OS_ASSERT(owo);
296 if (owo->iddObject().type() == type) {
297 result.push_back(*owo);
298 }
299 }
300 std::sort(result.begin(), result.end());
301 result.erase(std::unique(result.begin(), result.end()), result.end());
302 }
303 return result;
304 }
305
306 ReversePointerSet WorkspaceObject_Impl::getReversePointers() const {
307 ReversePointerSet result;

Callers 12

subSurfacesMethod · 0.80
setAdjacentSurfaceMethod · 0.80
resetAdjacentSurfaceMethod · 0.80
translateConstructionMethod · 0.80
restorePointersMethod · 0.80
TEST_FFunction · 0.80
TEST_FFunction · 0.80

Calls 9

workspaceMethod · 0.95
isNullMethod · 0.80
iddObjectMethod · 0.80
beginMethod · 0.80
getObjectMethod · 0.45
typeMethod · 0.45
push_backMethod · 0.45
endMethod · 0.45
eraseMethod · 0.45

Tested by 2

TEST_FFunction · 0.64
TEST_FFunction · 0.64