ldas-tools-diskcacheAPI  2.7.1
Public Types | Public Member Functions | Private Attributes | List of all members
diskCache::Streams::OFStream Class Reference

File stream. More...

#include <FStream.hh>

Inheritance diagram for diskCache::Streams::OFStream:
Inheritance graph
[legend]
Collaboration diagram for diskCache::Streams::OFStream:
Collaboration graph
[legend]

Public Types

typedef ::LDASTools::AL::ofstream stream_type
 
typedef ::LDASTools::AL::ofstream stream_type
 
typedef ::LDASTools::AL::ofstream stream_type
 

Public Member Functions

 OFStream (const std::string &Filename)
 Constructor. More...
 
 ~OFStream ()
 Destructor. More...
 
 OFStream (const std::string &Filename)
 Constructor. More...
 
 ~OFStream ()
 Destructor. More...
 
 OFStream (const std::string &Filename)
 Constructor. More...
 
 ~OFStream ()
 Destructor. More...
 

Private Attributes

std::string m_filename
 Destination filename. More...
 
std::string m_filename_tmp
 Temporary filename. More...
 

Detailed Description

File stream.

This handles a file stream. As part of handling an output file stream, this class creates a temporary file. If there is no issues with the file, then the temporary file will be renamed.

Member Typedef Documentation

◆ stream_type [1/3]

typedef ::LDASTools::AL::ofstream diskCache::Streams::OFStream::stream_type

◆ stream_type [2/3]

typedef ::LDASTools::AL::ofstream diskCache::Streams::OFStream::stream_type

◆ stream_type [3/3]

typedef ::LDASTools::AL::ofstream diskCache::Streams::OFStream::stream_type

Constructor & Destructor Documentation

◆ OFStream() [1/3]

diskCache::Streams::OFStream::OFStream ( const std::string &  Filename)

Constructor.

Parameters
[in]FilenameThe destination filename.

◆ ~OFStream() [1/3]

diskCache::Streams::OFStream::~OFStream ( )

Destructor.

◆ OFStream() [2/3]

diskCache::Streams::OFStream::OFStream ( const std::string &  Filename)

Constructor.

Parameters
[in]FilenameThe destination filename.

◆ ~OFStream() [2/3]

diskCache::Streams::OFStream::~OFStream ( )

Destructor.

◆ OFStream() [3/3]

diskCache::Streams::OFStream::OFStream ( const std::string &  Filename)

Constructor.

Parameters
[in]FilenameThe destination filename.

◆ ~OFStream() [3/3]

diskCache::Streams::OFStream::~OFStream ( )

Destructor.

Member Data Documentation

◆ m_filename

std::string diskCache::Streams::OFStream::m_filename
private

Destination filename.

This is the name of the file. It is used as the base for the temporary name of the file.

◆ m_filename_tmp

std::string diskCache::Streams::OFStream::m_filename_tmp
private

Temporary filename.

This is the name of the temporary file. This makes the file creation atomic as the file is not available till after all the data is written without encountering an error.


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