MCPcopy Create free account
hub / github.com/city-super/Octree-GS / saveToFile

Method saveToFile

SIBR_viewers/src/core/system/ByteStream.cpp:131–145  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

129 }
130
131 void ByteStream::saveToFile( const std::string& filename )
132 {
133 if (bufferSize() == 0)
134 return;
135
136 std::ofstream file(filename.c_str(), std::ios::out | std::ios::binary | std::ios::trunc);
137
138 if (file)
139 {
140 file.write((char*)&_buffer[0], _buffer.size() * sizeof(_buffer[0]));
141 file.close();
142 }
143 else
144 SIBR_LOG << "ERROR: cannot write to the file '" << filename << "'" << std::endl;
145 }
146
147 void ByteStream::push(const void* data, uint size)
148 {

Callers 5

saveMethod · 0.80
saveMethod · 0.80
saveToBinaryMethod · 0.80
saveByteStreamMethod · 0.80
saveFunction · 0.80

Calls 3

writeMethod · 0.80
sizeMethod · 0.45
closeMethod · 0.45

Tested by

no test coverage detected