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

Method toIdfFile

src/utilities/idf/Workspace.cpp:1740–1765  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1738 }
1739
1740 IdfFile Workspace_Impl::toIdfFile() {
1741
1742 IdfFile result;
1743 if (OptionalIdfObject vo = result.versionObject()) {
1744 result.removeObject(*vo);
1745 }
1746
1747 // header
1748 result.setHeader(m_header);
1749
1750 // specify IddFile
1751 result.setIddFileAndFactoryWrapper(m_iddFileAndFactoryWrapper);
1752
1753 // add version object
1754 if (OptionalWorkspaceObject vo = versionObject()) {
1755 result.addObject(vo->idfObject());
1756 }
1757
1758 // add objects and replace handle pointers with names
1759 WorkspaceObjectVector objs = objects(true); // sorted objects
1760 for (const WorkspaceObject& obj : objs) {
1761 result.addObject(obj.idfObject());
1762 }
1763
1764 return result;
1765 }
1766
1767 // PRIVATE
1768

Callers 8

toJSONFunction · 0.80
TEST_FFunction · 0.80
Workspace.cppFile · 0.80
TEST_FFunction · 0.80
TEST_FFunction · 0.80
TEST_FFunction · 0.80
mainFunction · 0.80
updateVersionMethod · 0.80

Calls 6

idfObjectMethod · 0.80
versionObjectMethod · 0.45
removeObjectMethod · 0.45
setHeaderMethod · 0.45
addObjectMethod · 0.45

Tested by 4

TEST_FFunction · 0.64
TEST_FFunction · 0.64
TEST_FFunction · 0.64
TEST_FFunction · 0.64