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

#include <esysFileWriter.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

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

References MPI_COMM_NULL, mpiComm, mpiRank, and mpiSize.

esysUtils::FileWriter::~FileWriter ( )
inline

References close(), and m_open.

Member Function Documentation

void esysUtils::FileWriter::close ( )
inline
bool esysUtils::FileWriter::openFile ( std::string  filename,
size_t  initialSize = 0,
bool  binary = false,
bool  append = false 
)
inline
bool esysUtils::FileWriter::writeAt ( std::ostringstream &  oss,
long  offset 
)
inline
bool esysUtils::FileWriter::writeOrdered ( std::ostringstream &  oss)
inline

References m_open, mpiSize, and ofs.

Referenced by escript::saveDataCSV().

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

References m_open, mpiSize, and ofs.

Member Data Documentation

bool esysUtils::FileWriter::m_open
private
MPI_Comm esysUtils::FileWriter::mpiComm
private

Referenced by FileWriter(), and openFile().

int esysUtils::FileWriter::mpiRank
private

Referenced by FileWriter(), and openFile().

int esysUtils::FileWriter::mpiSize
private
std::ofstream esysUtils::FileWriter::ofs
private

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