Zen
A cross-platform functional programming language

Namespace Class Reference

Concrete class for namespaces. More...

#include <Ast.hpp>

Inheritance diagram for Namespace:
ChildTypeSpec TypeSpec Node

List of all members.

Public Member Functions

 Namespace (const AccessType::T &accessType, TypeSpec &parent, const z::string &name)
 Default constructor.
NamespacehasNamespace (const z::string &name)
 Checks whether namespace has a child namespace (Wrapper function around hasChild() )
NamespaceaddNamespace (Namespace &child)
 Adds a child namespace.

Private Member Functions

virtual void visit (TypeSpec::Visitor &visitor) const
 Visitor pattern implementation.

Detailed Description

Concrete class for namespaces.


Constructor & Destructor Documentation

Namespace ( const AccessType::T accessType,
TypeSpec parent,
const z::string name 
) [inline]

Default constructor.

Parameters:
accessTypeThe AccessType for this function.
parentThe parent typefor this namespace
nameName of the namespace

Member Function Documentation

Namespace& addNamespace ( Namespace child) [inline]

Adds a child namespace.

Parameters:
childA reference to the child namespace AST node
Returns:
A reference to the child just added.
Namespace* hasNamespace ( const z::string name) [inline]

Checks whether namespace has a child namespace (Wrapper function around hasChild() )

Parameters:
nameThe namespace to check
Returns:
True if it has a child namespace, false otherwise.
void visit ( TypeSpec::Visitor visitor) const [private, virtual]

Visitor pattern implementation.

Parameters:
visitorThe visitor object.

Implements TypeSpec.


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