Zen
A cross-platform functional programming language
|
Class that writes out reference strings for all the different types. More...
Public Member Functions | |
TypeSpecRefGenerator (z::stream &os, const TypeSpecRefWriter::Format::T &format, const bool &inExpr) | |
Default constructor. | |
Private Member Functions | |
virtual void | visit (const Ast::Unit &type) |
Abstract visitor function. | |
virtual void | visit (const Ast::Namespace &type) |
Abstract visitor function. | |
virtual void | visit (const Ast::StructDef &type) |
Abstract visitor function. | |
virtual void | visit (const Ast::EnumDef &type) |
Abstract visitor function. | |
virtual void | visit (const Ast::EnumMemberDef &type) |
Abstract visitor function. | |
virtual void | visit (const Ast::OutParam &type) |
Abstract visitor function. | |
virtual void | visit (const Ast::SharedDef &type) |
Abstract visitor function. | |
z::string | getUdfName (const Ast::UserDefinedTypeSpec &type) |
Returns name of UDT. | |
virtual void | visit (const Ast::TypeDecl &type) |
Abstract visitor function. | |
virtual void | visit (const Ast::TypeDef &type) |
Abstract visitor function. | |
TypeSpecRefWriter::Format::T | getTemplateFormat (const TypeSpecRefWriter::Format::T &format) const |
Change template format temporarily. | |
virtual void | visit (const Ast::OwnerTemplate &type) |
Abstract visitor function. | |
virtual void | visit (const Ast::ListTemplate &type) |
Abstract visitor function. | |
virtual void | visit (const Ast::DictTemplate &type) |
Abstract visitor function. | |
virtual void | visit (const Ast::FunctionDef &type) |
Abstract visitor function. | |
Private Attributes | |
z::stream & | _os |
The output stream. | |
const TypeSpecRefWriter::Format::T & | _format |
The output format. | |
const bool | _inExpr |
True if called from within an expression. |
Class that writes out reference strings for all the different types.
TypeSpecRefGenerator | ( | z::stream & | os, |
const TypeSpecRefWriter::Format::T & | format, | ||
const bool & | inExpr | ||
) | [inline] |
Default constructor.
os | The output stream to write to |
format | The format of the output |
inExpr | True if type reference is generated from within an expression |
TypeSpecRefWriter::Format::T getTemplateFormat | ( | const TypeSpecRefWriter::Format::T & | format | ) | const [inline, private] |
Change template format temporarily.
format | The output format |
z::string getUdfName | ( | const Ast::UserDefinedTypeSpec & | type | ) | [inline, private] |
Returns name of UDT.
type | The type reference |
virtual void visit | ( | const Ast::DictTemplate & | type | ) | [inline, private, virtual] |
Abstract visitor function.
type | The type reference to write out |
Implements TypeSpec::Visitor.
virtual void visit | ( | const Ast::ListTemplate & | type | ) | [inline, private, virtual] |
Abstract visitor function.
type | The type reference to write out |
Implements TypeSpec::Visitor.
virtual void visit | ( | const Ast::OwnerTemplate & | type | ) | [inline, private, virtual] |
Abstract visitor function.
type | The type reference to write out |
Implements TypeSpec::Visitor.
virtual void visit | ( | const Ast::EnumMemberDef & | type | ) | [inline, private, virtual] |
Abstract visitor function.
type | The type reference to write out |
Implements TypeSpec::Visitor.
virtual void visit | ( | const Ast::TypeDef & | type | ) | [inline, private, virtual] |
Abstract visitor function.
type | The type reference to write out |
Implements TypeSpec::Visitor.
virtual void visit | ( | const Ast::TypeDecl & | type | ) | [inline, private, virtual] |
Abstract visitor function.
type | The type reference to write out |
Implements TypeSpec::Visitor.
virtual void visit | ( | const Ast::EnumDef & | type | ) | [inline, private, virtual] |
Abstract visitor function.
type | The type reference to write out |
Implements TypeSpec::Visitor.
virtual void visit | ( | const Ast::SharedDef & | type | ) | [inline, private, virtual] |
Abstract visitor function.
type | The type reference to write out |
Implements TypeSpec::Visitor.
virtual void visit | ( | const Ast::OutParam & | type | ) | [inline, private, virtual] |
Abstract visitor function.
type | The type reference to write out |
Implements TypeSpec::Visitor.
virtual void visit | ( | const Ast::Unit & | type | ) | [inline, private, virtual] |
Abstract visitor function.
type | The type reference to write out |
Implements TypeSpec::Visitor.
virtual void visit | ( | const Ast::Namespace & | type | ) | [inline, private, virtual] |
Abstract visitor function.
type | The type reference to write out |
Implements TypeSpec::Visitor.
virtual void visit | ( | const Ast::StructDef & | type | ) | [inline, private, virtual] |
Abstract visitor function.
type | The type reference to write out |
Implements TypeSpec::Visitor.
virtual void visit | ( | const Ast::FunctionDef & | type | ) | [inline, private, virtual] |
Abstract visitor function.
type | The type reference to write out |
Implements TypeSpec::Visitor.