Zen
A cross-platform functional programming language

ChildTypeSpec Class Reference

Base node class typespecs that have a parent type. More...

#include <Ast.hpp>

Inheritance diagram for ChildTypeSpec:
TypeSpec Node EnumMemberDef Namespace TemplateTypeSpec UserDefinedTypeSpec DictTemplate ListTemplate OwnerTemplate EnumDef MethodTypeSpec OutParam SharedDef StructDef TypeDefTypeSpec

List of all members.

Public Member Functions

void setParent (TypeSpec &parent)
 Sets the parent type for this type.
TypeSpechasParent () const
 Checks if this TypeSpec has a parent TypeSpec.
TypeSpecgetParent () const
 Returns the parent TypeSpec.
virtual z::string getFullName (const z::string &sep) const
 Returns the full name of the type, calling it's parent recursively.

Protected Member Functions

 ChildTypeSpec (const AccessType::T &accessType, const z::string &name)
 The constructor for the type without an initial parent.
 ChildTypeSpec (const AccessType::T &accessType, TypeSpec &parent, const z::string &name)
 The constructor for the type with an initial parent.

Private Attributes

TypeSpec_parent
 Pointer to parent TypeSpec.

Detailed Description

Base node class typespecs that have a parent type.

All ChildTypeSpec-derived classes must have a parent TypeSpec.


Constructor & Destructor Documentation

ChildTypeSpec ( const AccessType::T accessType,
const z::string name 
) [inline, protected]

The constructor for the type without an initial parent.

The parent member must be set after instantion , but before use, using setParent()

Parameters:
accessTypeSpecifies the AccessType for this type, for example, whether it is a public or a private type.
nameThe name of the type.
ChildTypeSpec ( const AccessType::T accessType,
TypeSpec parent,
const z::string name 
) [inline, protected]

The constructor for the type with an initial parent.

Parameters:
accessTypeSpecifies the AccessType for this type, for example, whether it is a public or a private type.
parentThe parent type of this type.
nameThe name of the type.

Member Function Documentation

virtual z::string getFullName ( const z::string sep) const [inline, virtual]

Returns the full name of the type, calling it's parent recursively.

Parameters:
sepSeparator between name elements
Returns:
The full name.

Implements TypeSpec.

TypeSpec& getParent ( ) const [inline]

Returns the parent TypeSpec.

Returns:
The parent TypeSpec
TypeSpec* hasParent ( ) const [inline]

Checks if this TypeSpec has a parent TypeSpec.

Returns:
The parent TypeSpec
void setParent ( TypeSpec parent) [inline]

Sets the parent type for this type.

This is a one-time operation, parent cannot be set more than once.

Parameters:
parentThe parent TypeSpec

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