-
- Downloads
ENH: provide string-streams that can use arbitrary memory (fixes #115)
- This can also be used in combination with the count-stream for the following type of use: DynamicList<char> buffer(4096); // allocate some large buffer OBufStream os(buffer); os << "content1" << " and more content"; buffer.setSize(os.size()); // synchronize sizes something.write(buffer, buffer.size()); os.rewind(); os << "content2"; buffer.setSize(os.size()); // synchronize sizes something.write(buffer, buffer.size()); // or simply using the output size directly (without sync) os.rewind(); os << "content3"; something.write(buffer, os.size());
parent
1f795c7a
Branches
Tags
Showing
- applications/test/bufstream/Make/files 3 additions, 0 deletionsapplications/test/bufstream/Make/files
- applications/test/bufstream/Make/options 2 additions, 0 deletionsapplications/test/bufstream/Make/options
- applications/test/bufstream/Test-bufstream.C 154 additions, 0 deletionsapplications/test/bufstream/Test-bufstream.C
- src/OpenFOAM/db/IOstreams/memory/IBufStream.H 264 additions, 0 deletionssrc/OpenFOAM/db/IOstreams/memory/IBufStream.H
- src/OpenFOAM/db/IOstreams/memory/OBufStream.H 542 additions, 0 deletionssrc/OpenFOAM/db/IOstreams/memory/OBufStream.H
- src/OpenFOAM/db/IOstreams/memory/OCompactBufStream.H 240 additions, 0 deletionssrc/OpenFOAM/db/IOstreams/memory/OCompactBufStream.H
Loading
Please register or sign in to comment