Zen
A cross-platform functional programming language

StructDefList Class Reference

Concrete AST Node representing a list of struct's. Used in experimental feature implementing subtypes. More...

#include <Ast.hpp>

Inheritance diagram for StructDefList:
Node

List of all members.

Public Types

typedef z::list< const
StructDef * > 
List
 Default list of StructDef nodes.

Public Member Functions

 StructDefList ()
 Default constructor.
const ListgetList () const
 Returns a reference to the struct list.
const Ast::StructDefaddSubType (const Ast::StructDef &subType)
 Adds a subtype struct to the list.
const StructDefhasSubType (const z::string &name) const
 Checks if struct subtype exists.

Private Attributes

List _list
 struct subtype list

Detailed Description

Concrete AST Node representing a list of struct's. Used in experimental feature implementing subtypes.


Member Function Documentation

const Ast::StructDef& addSubType ( const Ast::StructDef subType) [inline]

Adds a subtype struct to the list.

Parameters:
subTypeThe subtype to add
Returns:
A reference to the struct just added.
const List& getList ( ) const [inline]

Returns a reference to the struct list.

Returns:
Reference to the struct list.
const StructDef* hasSubType ( const z::string name) const [inline]

Checks if struct subtype exists.

Parameters:
nameName of subtype to be checked
Returns:
Pointer to struct subtype if it exists, else 0

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