Chaste Commit::1fd4e48e3990e67db148bc1bc4cf6991a0049d0c
AbstractCellBasedWriter< ELEMENT_DIM, SPACE_DIM > Class Template Reference

#include <AbstractCellBasedWriter.hpp>

+ Inheritance diagram for AbstractCellBasedWriter< ELEMENT_DIM, SPACE_DIM >:
+ Collaboration diagram for AbstractCellBasedWriter< ELEMENT_DIM, SPACE_DIM >:

Public Member Functions

 AbstractCellBasedWriter (const std::string &rFileName)
 
virtual ~AbstractCellBasedWriter ()
 
void CloseFile ()
 
virtual void OpenOutputFile (OutputFileHandler &rOutputFileHandler)
 
void OpenOutputFileForAppend (OutputFileHandler &rOutputFileHandler)
 
virtual void WriteTimeStamp ()
 
virtual void WriteNewline ()
 
void SetFileName (std::string fileName)
 
std::string GetFileName ()
 
- Public Member Functions inherited from Identifiable
virtual ~Identifiable ()
 
std::string GetIdentifier () const
 

Protected Attributes

std::string mFileName
 
out_stream mpOutStream
 

Private Member Functions

template<class Archive >
void serialize (Archive &archive, const unsigned int version)
 

Friends

class boost::serialization::access
 

Detailed Description

template<unsigned ELEMENT_DIM, unsigned SPACE_DIM>
class AbstractCellBasedWriter< ELEMENT_DIM, SPACE_DIM >

Abstract class for a writer that takes data from an AbstractCellPopulation and writes it to file.

Definition at line 48 of file AbstractCellBasedWriter.hpp.

Constructor & Destructor Documentation

◆ AbstractCellBasedWriter()

template<unsigned ELEMENT_DIM, unsigned SPACE_DIM>
AbstractCellBasedWriter< ELEMENT_DIM, SPACE_DIM >::AbstractCellBasedWriter ( const std::string &  rFileName)

Constructor.

Parameters
rFileNamethe name of the file to write to.

Definition at line 39 of file AbstractCellBasedWriter.cpp.

◆ ~AbstractCellBasedWriter()

template<unsigned ELEMENT_DIM, unsigned SPACE_DIM>
AbstractCellBasedWriter< ELEMENT_DIM, SPACE_DIM >::~AbstractCellBasedWriter ( )
virtual

Virtual destructor.

Definition at line 45 of file AbstractCellBasedWriter.cpp.

Member Function Documentation

◆ CloseFile()

◆ GetFileName()

template<unsigned ELEMENT_DIM, unsigned SPACE_DIM>
std::string AbstractCellBasedWriter< ELEMENT_DIM, SPACE_DIM >::GetFileName ( )
Returns
the output file name.

Definition at line 86 of file AbstractCellBasedWriter.cpp.

◆ OpenOutputFile()

template<unsigned ELEMENT_DIM, unsigned SPACE_DIM>
void AbstractCellBasedWriter< ELEMENT_DIM, SPACE_DIM >::OpenOutputFile ( OutputFileHandler rOutputFileHandler)
virtual

Open mpOutStream for writing.

Parameters
rOutputFileHandlerhandler for the directory in which to open this file.

Definition at line 56 of file AbstractCellBasedWriter.cpp.

References OutputFileHandler::OpenOutputFile().

Referenced by AbstractCellPopulation< DIM >::SetDefaultCellMutationStateAndProliferativeTypeOrdering().

◆ OpenOutputFileForAppend()

template<unsigned ELEMENT_DIM, unsigned SPACE_DIM>
void AbstractCellBasedWriter< ELEMENT_DIM, SPACE_DIM >::OpenOutputFileForAppend ( OutputFileHandler rOutputFileHandler)

Open mpOutStream for appending.

Parameters
rOutputFileHandlerhandler for the directory in which to open this file.

Definition at line 62 of file AbstractCellBasedWriter.cpp.

References OutputFileHandler::OpenOutputFile().

Referenced by AbstractCellPopulation< ELEMENT_DIM, SPACE_DIM >::OpenRoundRobinWritersFilesForAppend(), and AbstractCellPopulation< DIM >::WriteResultsToFiles().

◆ serialize()

template<unsigned ELEMENT_DIM, unsigned SPACE_DIM>
template<class Archive >
void AbstractCellBasedWriter< ELEMENT_DIM, SPACE_DIM >::serialize ( Archive &  archive,
const unsigned int  version 
)
inlineprivate

Serialize the object.

Parameters
archivethe archive
versionthe current version of this class

Definition at line 61 of file AbstractCellBasedWriter.hpp.

References AbstractCellBasedWriter< ELEMENT_DIM, SPACE_DIM >::mFileName.

◆ SetFileName()

template<unsigned ELEMENT_DIM, unsigned SPACE_DIM>
void AbstractCellBasedWriter< ELEMENT_DIM, SPACE_DIM >::SetFileName ( std::string  fileName)

Set the output file name. This method allows the user to change mFileName from its default value, which is set in each subclass's constructor.

Parameters
fileNamethe output file name

Definition at line 80 of file AbstractCellBasedWriter.cpp.

◆ WriteNewline()

template<unsigned ELEMENT_DIM, unsigned SPACE_DIM>
void AbstractCellBasedWriter< ELEMENT_DIM, SPACE_DIM >::WriteNewline ( )
virtual

Add a newline character to mpOutStream.

Definition at line 74 of file AbstractCellBasedWriter.cpp.

◆ WriteTimeStamp()

template<unsigned ELEMENT_DIM, unsigned SPACE_DIM>
void AbstractCellBasedWriter< ELEMENT_DIM, SPACE_DIM >::WriteTimeStamp ( )
virtual

Write the current time stamp to mpOutStream.

Definition at line 68 of file AbstractCellBasedWriter.cpp.

References SimulationTime::GetTime(), and SimulationTime::Instance().

Friends And Related Symbol Documentation

◆ boost::serialization::access

template<unsigned ELEMENT_DIM, unsigned SPACE_DIM>
friend class boost::serialization::access
friend

Needed for serialization.

Definition at line 53 of file AbstractCellBasedWriter.hpp.

Member Data Documentation

◆ mFileName

template<unsigned ELEMENT_DIM, unsigned SPACE_DIM>
std::string AbstractCellBasedWriter< ELEMENT_DIM, SPACE_DIM >::mFileName
protected

The name of the output file.

Definition at line 69 of file AbstractCellBasedWriter.hpp.

Referenced by AbstractCellBasedWriter< ELEMENT_DIM, SPACE_DIM >::serialize().

◆ mpOutStream

template<unsigned ELEMENT_DIM, unsigned SPACE_DIM>
out_stream AbstractCellBasedWriter< ELEMENT_DIM, SPACE_DIM >::mpOutStream
protected

An output stream for writing data.

Definition at line 72 of file AbstractCellBasedWriter.hpp.


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