Zen
A cross-platform functional programming language

CppGen::OutFile Class Reference

Class encapsulating output file stream. More...

#include <CppGen.hpp>

List of all members.

Public Member Functions

 OutFile ()
 Default constructor.
 ~OutFile ()
 Destructor - closes the file and the stream if open.
void open (const Build::Project &project, const z::string &dir, const z::string &filename, const z::string &ext)
 Function for opening a file and a output stream.
void close ()
 Function for closing the file and the stream.
z::string getFilename () const
 Returns the full filename of the file.
z::streamoperator() ()
 Returns a reference to the output stream.

Private Attributes

z::file _file
 Output file.
z::filestream _stream
 Output stream.

Detailed Description

Class encapsulating output file stream.

This class is responsible for opening and closing an output file and the associated stream. It is used by ProGen and by CppGen.


Member Function Documentation

z::string getFilename ( ) const [inline]

Returns the full filename of the file.

Returns:
The file name
void open ( const Build::Project project,
const z::string dir,
const z::string filename,
const z::string ext 
)

Function for opening a file and a output stream.

Parameters:
projectThe project definition
dirThe directory where the file should be located
filenameThe base name of the file
extThe file extension
z::stream& operator() ( ) [inline]

Returns a reference to the output stream.

Returns:
The output stream

The documentation for this class was generated from the following files:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Defines