![]() |
Zen
A cross-platform functional programming language
|
Class that generates the code for registration for types. More...
Public Member Functions | |
| TypeSpecMetaTypeDeclarator (Indenter &ind, z::stream &hdr, z::stream &src) | |
| Default constructor. | |
| void | run (const Ast::TypeSpec &typeSpec) |
| Visits the specified type. | |
Private Member Functions | |
| z::stream & | os (const Ast::TypeSpec &typeSpec) |
| Returns either header or source stream depending on whether type is public or private. | |
| void | visitChildList (const Ast::TypeSpec &typeSpec) |
| Visits each child of the specified type. | |
| void | enterNamespace (const Ast::TypeSpec &typeSpec) |
| Enter namespace of type. | |
| void | leaveNamespace (const Ast::TypeSpec &typeSpec) |
| Leave namespace of type. | |
| void | writeType (const Ast::TypeSpec &typeSpec) |
| Write the registration code for the type. | |
| 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. | |
| virtual void | visit (const Ast::TypeDecl &type) |
| Abstract visitor function. | |
| virtual void | visit (const Ast::TypeDef &type) |
| Abstract visitor function. | |
| 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 | |
| Indenter & | _ind |
| Current indentation level. | |
| z::stream & | _hdr |
| Header stream. | |
| z::stream & | _src |
| Source stream. | |
| z::stack< z::string > | _ns |
| Source stream. | |
Class that generates the code for registration for types.
| TypeSpecMetaTypeDeclarator | ( | Indenter & | ind, |
| z::stream & | hdr, | ||
| z::stream & | src | ||
| ) | [inline] |
Default constructor.
| ind | The indentation level |
| hdr | The header output stream |
| src | The source output stream |
| void enterNamespace | ( | const Ast::TypeSpec & | typeSpec | ) | [inline, private] |
Enter namespace of type.
| typeSpec | Type to visit |
| void leaveNamespace | ( | const Ast::TypeSpec & | typeSpec | ) | [inline, private] |
Leave namespace of type.
| typeSpec | Type to visit |
| z::stream& os | ( | const Ast::TypeSpec & | typeSpec | ) | [inline, private] |
Returns either header or source stream depending on whether type is public or private.
| typeSpec | Type to check |
| void run | ( | const Ast::TypeSpec & | typeSpec | ) | [inline] |
Visits the specified type.
| typeSpec | Type to visit |
| virtual void visit | ( | const Ast::OwnerTemplate & | type | ) | [inline, private, virtual] |
Abstract visitor function.
| type | The type reference to handle |
Implements TypeSpec::Visitor.
| virtual void visit | ( | const Ast::TypeDef & | type | ) | [inline, private, virtual] |
Abstract visitor function.
| type | The type reference to handle |
Implements TypeSpec::Visitor.
| virtual void visit | ( | const Ast::ListTemplate & | type | ) | [inline, private, virtual] |
Abstract visitor function.
| type | The type reference to handle |
Implements TypeSpec::Visitor.
| virtual void visit | ( | const Ast::SharedDef & | type | ) | [inline, private, virtual] |
Abstract visitor function.
| type | The type reference to handle |
Implements TypeSpec::Visitor.
| virtual void visit | ( | const Ast::DictTemplate & | type | ) | [inline, private, virtual] |
Abstract visitor function.
| type | The type reference to handle |
Implements TypeSpec::Visitor.
| virtual void visit | ( | const Ast::EnumMemberDef & | type | ) | [inline, private, virtual] |
Abstract visitor function.
| type | The type reference to handle |
Implements TypeSpec::Visitor.
| virtual void visit | ( | const Ast::EnumDef & | type | ) | [inline, private, virtual] |
Abstract visitor function.
| type | The type reference to handle |
Implements TypeSpec::Visitor.
| virtual void visit | ( | const Ast::Namespace & | type | ) | [inline, private, virtual] |
Abstract visitor function.
| type | The type reference to handle |
Implements TypeSpec::Visitor.
| virtual void visit | ( | const Ast::StructDef & | type | ) | [inline, private, virtual] |
Abstract visitor function.
| type | The type reference to handle |
Implements TypeSpec::Visitor.
| virtual void visit | ( | const Ast::TypeDecl & | type | ) | [inline, private, virtual] |
Abstract visitor function.
| type | The type reference to handle |
Implements TypeSpec::Visitor.
| virtual void visit | ( | const Ast::OutParam & | type | ) | [inline, private, virtual] |
Abstract visitor function.
| type | The type reference to handle |
Implements TypeSpec::Visitor.
| virtual void visit | ( | const Ast::FunctionDef & | type | ) | [inline, private, virtual] |
Abstract visitor function.
| type | The type reference to handle |
Implements TypeSpec::Visitor.
| virtual void visit | ( | const Ast::Unit & | type | ) | [inline, private, virtual] |
Abstract visitor function.
| type | The type reference to handle |
Implements TypeSpec::Visitor.
| void visitChildList | ( | const Ast::TypeSpec & | typeSpec | ) | [inline, private] |
Visits each child of the specified type.
| typeSpec | Type to visit |
| void writeType | ( | const Ast::TypeSpec & | typeSpec | ) | [inline, private] |
Write the registration code for the type.
| typeSpec | Type to visit |