escript  Revision_
Public Member Functions | Private Attributes | List of all members
escript::FileWriter Class Reference

#include <FileWriter.h>

Public Member Functions

 FileWriter (MPI_Comm comm=MPI_COMM_NULL)
 
 ~FileWriter ()
 
bool openFile (std::string filename, size_t initialSize=0, bool binary=false, bool append=false)
 
bool writeOrdered (std::ostringstream &oss)
 
bool writeShared (std::ostringstream &oss)
 
bool writeAt (std::ostringstream &oss, long offset)
 
void close ()
 

Private Attributes

MPI_Comm mpiComm
 
int mpiRank
 
int mpiSize
 
bool m_open
 
std::ofstream ofs
 

Constructor & Destructor Documentation

◆ FileWriter()

escript::FileWriter::FileWriter ( MPI_Comm  comm = MPI_COMM_NULL)
inline

References MPI_COMM_NULL, mpiComm, mpiRank, and mpiSize.

◆ ~FileWriter()

escript::FileWriter::~FileWriter ( )
inline

References close(), and m_open.

Member Function Documentation

◆ close()

void escript::FileWriter::close ( )
inline

◆ openFile()

bool escript::FileWriter::openFile ( std::string  filename,
size_t  initialSize = 0,
bool  binary = false,
bool  append = false 
)
inline

◆ writeAt()

bool escript::FileWriter::writeAt ( std::ostringstream &  oss,
long  offset 
)
inline

◆ writeOrdered()

bool escript::FileWriter::writeOrdered ( std::ostringstream &  oss)
inline

References m_open, mpiSize, and ofs.

Referenced by escript::saveDataCSV().

◆ writeShared()

bool escript::FileWriter::writeShared ( std::ostringstream &  oss)
inline

References m_open, mpiSize, and ofs.

Member Data Documentation

◆ m_open

bool escript::FileWriter::m_open
private

◆ mpiComm

MPI_Comm escript::FileWriter::mpiComm
private

Referenced by FileWriter(), and openFile().

◆ mpiRank

int escript::FileWriter::mpiRank
private

Referenced by FileWriter(), and openFile().

◆ mpiSize

int escript::FileWriter::mpiSize
private

◆ ofs

std::ofstream escript::FileWriter::ofs
private

The documentation for this class was generated from the following file: