toycalc::define Class Reference

An function definition. More...

#include <expression.hh>

Inheritance diagram for toycalc::define:

Inheritance graph
[legend]
Collaboration diagram for toycalc::define:

Collaboration graph
[legend]
List of all members.

Public Methods

 define (function *f, parameter_list *l)
 Make a variable from a name an value. More...

virtual ~define ()
 The function own the body. More...

double evaluate () const
 Evaluate the assignment. More...

void show (std::ostream &o) const
 Show the assignment. More...

void add_body (expression *e)
 Add a body to the definition. More...

functionfunc ()
 Get the function. More...


Protected Attributes

parameter_list_l
 The parameter list. More...

function_func
 The function. More...


Detailed Description

An function definition.

Definition at line 375 of file expression.hh.


Constructor & Destructor Documentation

toycalc::define::define function   f,
parameter_list   l
[inline]
 

Make a variable from a name an value.

Definition at line 384 of file expression.hh.

References f.

virtual toycalc::define::~define   [inline, virtual]
 

The function own the body.

Definition at line 386 of file expression.hh.


Member Function Documentation

void toycalc::define::add_body expression   e
 

Add a body to the definition.

Definition at line 87 of file expression.cc.

References _func, and toycalc::function::body().

Referenced by toycalc::parser::func_body().

double toycalc::define::evaluate   const [inline, virtual]
 

Evaluate the assignment.

Implements toycalc::expression.

Definition at line 388 of file expression.hh.

function* toycalc::define::func   [inline]
 

Get the function.

Definition at line 394 of file expression.hh.

Referenced by toycalc::parser::func_body().

void toycalc::define::show std::ostream   o const [virtual]
 

Show the assignment.

Reimplemented from toycalc::expression.

Definition at line 94 of file expression.cc.

References _func.


Member Data Documentation

function* toycalc::define::_func [protected]
 

The function.

Definition at line 381 of file expression.hh.

Referenced by add_body(), and show().

parameter_list* toycalc::define::_l [protected]
 

The parameter list.

Definition at line 379 of file expression.hh.


The documentation for this class was generated from the following files:
Top of page
Last update Wed Feb 5 03:34:17 2003
Christian Holm
Created by DoxyGen 1.2.15