Developer documentation
Version 3.0.3-105-gd3941f44
MR::File::OFStream Class Reference

open output files for writing, checking for pre-existing file if necessary More...

#include "file/ofstream.h"

Inheritance diagram for MR::File::OFStream:

Public Member Functions

 OFStream ()
 
 OFStream (const std::string &path, const std::ios_base::openmode mode=std::ios_base::out|std::ios_base::binary)
 
void open (const std::string &path, const std::ios_base::openmode mode=std::ios_base::out|std::ios_base::binary)
 

Detailed Description

open output files for writing, checking for pre-existing file if necessary

This class is intended to be used as a substitute for std::ofstream. It ensures that if the user has not given the command permission to overwrite output files, the presence of an existing file is first checked. It also removes the necessity to explicitly convert a path expressed as a std::string to a c-style string.

Definition at line 39 of file ofstream.h.

Constructor & Destructor Documentation

◆ OFStream() [1/2]

MR::File::OFStream::OFStream ( )
inline

Definition at line 41 of file ofstream.h.

◆ OFStream() [2/2]

MR::File::OFStream::OFStream ( const std::string &  path,
const std::ios_base::openmode  mode = std::ios_base::out | std::ios_base::binary 
)
inline

Definition at line 42 of file ofstream.h.

Member Function Documentation

◆ open()

void MR::File::OFStream::open ( const std::string &  path,
const std::ios_base::openmode  mode = std::ios_base::out|std::ios_base::binary 
)

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