OpenWalnut  1.2.5
 All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
Public Member Functions | Protected Attributes
WWriter Class Reference

Write some data to the given file. More...

#include <WWriter.h>

+ Inheritance diagram for WWriter:

List of all members.

Public Member Functions

 WWriter (std::string fname, bool overwrite=false)
 Creates a writer object for writing something to a file.
void setFileName (std::string fname)
 Reset file name and checks if the file already exists in case of non overwriting is specified.

Protected Attributes

std::string m_fname
 Absolute path of the file to write to.
bool m_overwrite
 flag indicating if the file may be overwritten (true) or not (false)

Detailed Description

Write some data to the given file.

This base class is just for file management (file exists, etc.) Subclasses may use those mechanisms and specify their file format which is not the purpose of this base class.

Definition at line 37 of file WWriter.h.


Constructor & Destructor Documentation

WWriter::WWriter ( std::string  fname,
bool  overwrite = false 
)

Creates a writer object for writing something to a file.

Use the flags to specify the behaviour.

Parameters:
fnamepath to the target file where stuff will be written to
overwriteIf true existing files will be overwritten

Definition at line 37 of file WWriter.cpp.

References setFileName().


Member Function Documentation

void WWriter::setFileName ( std::string  fname)

Reset file name and checks if the file already exists in case of non overwriting is specified.

Parameters:
fnamefile name

Definition at line 43 of file WWriter.cpp.

References m_fname, and m_overwrite.

Referenced by WWriter().


Member Data Documentation

std::string WWriter::m_fname
protected

Absolute path of the file to write to.

Definition at line 58 of file WWriter.h.

Referenced by setFileName(), WWriterDendrogram::write(), WWriterFiberVTK::writeFibs(), and WWriterMatrixSymVTK::writeTable().

bool WWriter::m_overwrite
protected

flag indicating if the file may be overwritten (true) or not (false)

Definition at line 59 of file WWriter.h.

Referenced by setFileName().


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