OpenWalnut  1.5.0dev
Public Member Functions | Protected Attributes | List of all members
WWriter Class Reference

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

#include <WWriter.h>

+ Inheritance diagram for WWriter:
+ Collaboration diagram for WWriter:

Public Member Functions

 WWriter (std::string fname, bool overwrite=false)
 Creates a writer object for writing something to a file. More...
 
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. More...
 
void setFilename (std::string fname)
 Reset file name and checks if the file already exists in case of non overwriting is specified. More...
 

Protected Attributes

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

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::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().

+ Here is the call graph for this function:

Member Function Documentation

◆ 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
Deprecated:
use setFilename instead

Definition at line 39 of file WWriter.cpp.

References setFilename().

+ Here is the call graph for this function:

◆ 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().

+ Here is the caller graph for this function:

Member Data Documentation

◆ m_fname

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().

◆ m_overwrite

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: