Zen
A cross-platform functional programming language

VariableRefList Class Reference

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

#include <Ast.hpp>

Inheritance diagram for VariableRefList:
Node

List of all members.

Public Types

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

Public Member Functions

 VariableRefList ()
 Default constructor.
const ListgetList () const
 Returns a reference to the VariableRef list.
const Ast::VariableRefaddRef (const Ast::VariableRef &vref)
 Adds a VariableDef to the list.
bool hasRef (const Ast::VariableRef &vref) const
 Checks if a VariableRef exists in the list.
void appendList (const VariableRefList &src)
 Appends a VariableRef list to the current list.

Private Attributes

List _list
 The VariableRef list managed by this class.

Detailed Description

Base node class for list and map of variable references.

At various places in the AST, it is necessary to store list of variable references. This is a convenience class node for such lists.


Member Function Documentation

const Ast::VariableRef& addRef ( const Ast::VariableRef vref) [inline]

Adds a VariableDef to the list.

Parameters:
vrefVariableDef to add
Returns:
A reference to the item just added.
void appendList ( const VariableRefList src) [inline]

Appends a VariableRef list to the current list.

Parameters:
srcThe list to be appended
const List& getList ( ) const [inline]

Returns a reference to the VariableRef list.

Returns:
Reference to the VariableRef list.
bool hasRef ( const Ast::VariableRef vref) const [inline]

Checks if a VariableRef exists in the list.

Parameters:
vrefThe item to be checked
Returns:
true if the specified item exists in the list

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