MCPcopy Create free account
hub / github.com/OpenSees/OpenSees / ~BinaryFileStream

Method ~BinaryFileStream

SRC/runtime/commands/utilities/BinaryFileStream.cpp:73–109  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

71}
72
73BinaryFileStream::~BinaryFileStream()
74{
75 if (fileOpen == 1)
76 theFile.close();
77
78 if (theChannels != 0) {
79
80 static ID lastMsg(1);
81 if (sendSelfCount > 0) {
82 for (int i = 0; i < sendSelfCount; ++i)
83 theChannels[i]->sendID(0, 0, lastMsg);
84 } else
85 theChannels[0]->recvID(0, 0, lastMsg);
86 delete[] theChannels;
87 }
88
89 if (fileName != 0)
90 delete[] fileName;
91
92 if (sendSelfCount > 0) {
93
94 for (int i = 0; i <= sendSelfCount; ++i) {
95 if (theColumns[i] != 0)
96 delete theColumns[i];
97
98 if (theData[i] != 0)
99 delete[] theData[i];
100
101 if (theRemoteData[i] != 0)
102 delete theRemoteData[i];
103 }
104 delete[] theData;
105 delete[] theRemoteData;
106 delete[] theColumns;
107 delete sizeColumns;
108 }
109}
110
111int
112BinaryFileStream::setFile(const char* name, openMode mode)

Callers

nothing calls this directly

Calls 3

closeMethod · 0.45
sendIDMethod · 0.45
recvIDMethod · 0.45

Tested by

no test coverage detected