Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Namespace Members | Class Members | File Members

celx::Function Class Reference

#include <function.h>

Collaboration diagram for celx::Function:

Collaboration graph
List of all members.

Public Member Functions

Value call (ExecutionContext &)
 Function (const Function &)
 Function (std::vector< std::string > *, Statement *)
 ~Function ()

Private Attributes

std::vector< std::string > * arguments
Statementbody

Constructor & Destructor Documentation

Function::Function std::vector< std::string > *  ,
Statement
 

Definition at line 18 of file function.cpp.

00018                                                           :
00019     arguments(_args), body(_body)
00020 {
00021 }

Function::Function const Function  ) 
 

Definition at line 23 of file function.cpp.

00023                                     :
00024     arguments(f.arguments), body(f.body)
00025 {
00026 }

Function::~Function  ) 
 

Definition at line 28 of file function.cpp.

00029 {
00030     // delete arguments;
00031     // delete body;
00032 }


Member Function Documentation

Value Function::call ExecutionContext  ) 
 

Definition at line 35 of file function.cpp.

References body, and celx::Statement::execute().

Referenced by celx::FunctionCallExpression::eval().

00036 {
00037     Statement::Control control = body->execute(context);
00038     if (control == Statement::ControlReturn)
00039     {
00040         return context.popReturnValue();
00041     }
00042     else
00043     {
00044         return Value();
00045     }
00046 }


Member Data Documentation

std::vector<std::string>* celx::Function::arguments [private]
 

Definition at line 34 of file function.h.

Statement* celx::Function::body [private]
 

Definition at line 35 of file function.h.

Referenced by call().


The documentation for this class was generated from the following files:
Generated on Sat Jan 14 22:33:45 2006 for Celestia by  doxygen 1.4.1