Zen
A cross-platform functional programming language

VariableDefListBase Class Reference

Base node class for list and map of variable definitions. More...

#include <Ast.hpp>

Inheritance diagram for VariableDefListBase:
Node VariableDefMap VariableRef

List of all members.

Public Types

typedef z::list< const
VariableDef * > 
List
 Default list of VariableDef nodes This is different from Ast::VariableDef::List in that it stores const pointers whereas those are non-const pointers.

Public Member Functions

const ListgetList () const
 Returns a reference to the VariableDef list.
const VariableDefgetFirst () const
 Returns the first VariableDef in the list.
const VariableDefgetLast () const
 Returns the last VariableDef in the list.
const Ast::VariableDefaddDef (const Ast::VariableDef &child)
 Adds a VariableDef to the list.

Protected Member Functions

 VariableDefListBase ()
 Default constructor.

Private Attributes

List _list
 The VariableDef list managed by this class.

Detailed Description

Base node class for list and map of variable definitions.

It is necessary to store lists of VariableDef instances at various places in the AST. This is a convenience class node for such lists.


Member Function Documentation

const Ast::VariableDef& addDef ( const Ast::VariableDef child) [inline]

Adds a VariableDef to the list.

Parameters:
childVariableDef to add
Returns:
A reference to the item just added.

Reimplemented in VariableDefMap.

const VariableDef& getFirst ( ) const [inline]

Returns the first VariableDef in the list.

Returns:
Head item in the VariableDef list.
const VariableDef& getLast ( ) const [inline]

Returns the last VariableDef in the list.

Returns:
Tail item in the VariableDef list.
const List& getList ( ) const [inline]

Returns a reference to the VariableDef list.

Returns:
Reference to the VariableDef list.

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