OpenWalnut  1.4.0
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.
OW_API_DEPRECATED void setFileName (std::string fname)
 Reset file name and checks if the file already exists in case of non overwriting is specified.
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 33 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
Deprecated:
use setFilename instead

Definition at line 39 of file WWriter.cpp.

References setFilename().

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 44 of file WWriter.cpp.

References m_fname, and m_overwrite.

Referenced by setFileName(), and WWriter().


Member Data Documentation

std::string WWriter::m_fname [protected]

Absolute path of the file to write to.

Definition at line 67 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 68 of file WWriter.h.

Referenced by setFilename().


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