Zen
A cross-platform functional programming language

VariableDefMap Class Reference

This node stores a mapping between a variable and the variable itself. More...

#include <Ast.hpp>

Inheritance diagram for VariableDefMap:
VariableDefListBase Node

List of all members.

Public Member Functions

 VariableDefMap ()
 Default constructor.
const Ast::VariableDefhasDef (const z::string &name) const
 Checks if a VariableDef exists in the map.
const Ast::VariableDefaddDef (const Ast::VariableDef &child)
 Adds a VariableDef to the map.
void appendList (const VariableDefMap &src)
 Appends a VariableDef map to the current list.

Private Types

typedef z::dict< z::string,
const VariableDef * > 
DefMap
 The map type.

Private Attributes

DefMap _defMap
 The VariableDef map managed by this class.

Detailed Description

This node stores a mapping between a variable and the variable itself.

The base class stores the list itself.


Member Function Documentation

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

Adds a VariableDef to the map.

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

Reimplemented from VariableDefListBase.

void appendList ( const VariableDefMap src) [inline]

Appends a VariableDef map to the current list.

Parameters:
srcThe list to be appended
const Ast::VariableDef* hasDef ( const z::string name) const [inline]

Checks if a VariableDef exists in the map.

Parameters:
nameThe item to be checked
Returns:
pointer to VariableDef if it exists in the list, 0 otherwise.

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