mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
ENH: make treatment of stream allocators more uniform (issue #532)
- use allocator class to wrap the stream pointers instead of passing them into ISstream, OSstream and using a dynamic cast to delete then. This is especially important if we will have a bidirectional stream (can't delete twice!). STYLE: - file stream constructors with std::string (C++11) - for rewind, explicit about in|out direction. This is not currently important, but avoids surprises with any future bidirectional access. - combined string streams in StringStream.H header. Similar to <sstream> include that has both input and output string streams.
This commit is contained in:
@ -26,7 +26,6 @@ License
|
||||
#include <fstream>
|
||||
#include <iostream>
|
||||
|
||||
using std::ofstream;
|
||||
using std::ios;
|
||||
|
||||
#include "Time.H"
|
||||
@ -49,18 +48,16 @@ Foam::fluentFvMesh::fluentFvMesh(const IOobject& io)
|
||||
|
||||
void Foam::fluentFvMesh::writeFluentMesh() const
|
||||
{
|
||||
// make a directory called proInterface in the case
|
||||
// Make a directory called fluentInterface in the case
|
||||
mkDir(time().rootPath()/time().caseName()/"fluentInterface");
|
||||
|
||||
// open a file for the mesh
|
||||
ofstream fluentMeshFile
|
||||
// Open a file for the mesh
|
||||
std::ofstream fluentMeshFile
|
||||
(
|
||||
(
|
||||
time().rootPath()/
|
||||
time().caseName()/
|
||||
"fluentInterface"/
|
||||
time().caseName() + ".msh"
|
||||
).c_str()
|
||||
time().rootPath()
|
||||
/ time().caseName()
|
||||
/ "fluentInterface"
|
||||
/ time().caseName() + ".msh"
|
||||
);
|
||||
|
||||
Info<< "Writing Header" << endl;
|
||||
|
||||
Reference in New Issue
Block a user