tool::datafile Struct Reference

#include <wipal/tool/datafile.hh>

Inheritance diagram for tool::datafile:

tool::mapping< Key, Value, Factory >

List of all members.


Detailed Description

Output file which creation/opening is delayed until the first output.

A datafile object represents an output file. It may be casted to std::ostream& and has an << operator for formatted outputs. The main difference with std::ofstream is the file is not opened until the corresponding stream is effectively solicited. Thus, if the file does not exist on the filesystem and no operation is performed on it, no file will be created.

Unlike std::ostream, datafile is copy-constructible.

Public Member Functions

 datafile (const std::string &)
 operator std::ostream & ()
template<class T>
std::ostream & operator<< (const T &)


Constructor & Destructor Documentation

tool::datafile::datafile ( const std::string &  filename  )  [inline]

Construct a datafile object given a filename.


Member Function Documentation

tool::datafile::operator std::ostream & (  )  [inline]

Retrieve the underlying C++ stream.

template<class T>
std::ostream & tool::datafile::operator<< ( const T &  data  )  [inline]

Formatted output.


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

Generated on Fri Jan 16 11:55:56 2009 for wipal by  doxygen 1.5.6