ContRap-Core
Public Member Functions | Protected Attributes

crp::InternalFunction Class Reference

Class InternalFunction represents a function defined with the ContRap language. More...

#include <function.h>

Inheritance diagram for crp::InternalFunction:
crp::AtomicFunction crp::Object

Public Member Functions

 InternalFunction (XMLDataPool *meta_info, DPtr code, SPtr< List > parameters, std::list< Option > &options, const std::string &type, const DPtr &condition=DPtr::bottom)
 Creates a function from code specifications.
DPtr execute (SPtr< List > &arguments, SPtr< List > &options, SPtr< Scope > &scope, Engine *engine) const
 Executes the function.
const DPtrget_code () const
 Returns the code.

Protected Attributes

DPtr code
 Function code.

Detailed Description

Class InternalFunction represents a function defined with the ContRap language.


Constructor & Destructor Documentation

crp::InternalFunction::InternalFunction ( XMLDataPool meta_info,
DPtr  code,
SPtr< List parameters,
std::list< Option > &  options,
const std::string &  type,
const DPtr condition = DPtr::bottom 
)

Creates a function from code specifications.

Parameters:
meta_infoMeta info of the function
codeFunction code
parametersFunction parameters
optionsFunction options
typeOutput type
conditionFunction execution condition

Member Function Documentation

DPtr crp::InternalFunction::execute ( SPtr< List > &  arguments,
SPtr< List > &  options,
SPtr< Scope > &  scope,
Engine engine 
) const [virtual]

Executes the function.

Parameters:
argumentsArguments list
scopeEvaluation scope
engineEvaluation engine
Returns:
Result of the evaluation

Implements crp::AtomicFunction.

const DPtr& crp::InternalFunction::get_code ( ) const [inline]

Returns the code.

Returns:
Function code

Field Documentation

Function code.


The documentation for this class was generated from the following file: