Zen
A cross-platform functional programming language
Classes | Public Member Functions | Private Attributes

TypeSpecRefWriter Class Reference

Convenience class that wraps around the TypeSpecRefGenerator class. More...

List of all members.

Classes

struct  Format
 Defines the output format for types. More...

Public Member Functions

 TypeSpecRefWriter (const Ast::TypeSpec &ptype, const z::string &psep, const Format::T &format=Format::None, const bool &inExpr=false)
 Default constructor.
z::streamwrite (z::stream &os) const
 Writes the type reference to the output stream.

Private Attributes

const Ast::TypeSpectype
 The type to write.
const z::string sep
 The separator.
const Format::T _format
 The output format.
const bool _inExpr
 True if called from within an expression.

Detailed Description

Convenience class that wraps around the TypeSpecRefGenerator class.


Constructor & Destructor Documentation

TypeSpecRefWriter ( const Ast::TypeSpec ptype,
const z::string psep,
const Format::T format = Format::None,
const bool &  inExpr = false 
) [inline]

Default constructor.

Parameters:
ptypeThe TypeSpec to generate code for.
psepThe separator to use between type names
formatThe format of the output
inExprTrue if type reference is generated from within an expression
Todo:

Remove TypeSpecRefWriter::sep member variable

Remove TypeSpecRefWriter::_inExpr


Member Function Documentation

z::stream & write ( z::stream os) const

Writes the type reference to the output stream.

Parameters:
osThe output stream
Returns:
The output stream

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