ContRap-Core
Public Member Functions | Protected Attributes

crp::ExternalFunction Class Reference

Class ExternalFunction encapsulates the external function type as an object. More...

#include <function.h>

Inheritance diagram for crp::ExternalFunction:
crp::AtomicFunction crp::Object

Public Member Functions

 ExternalFunction (XMLDataPool *meta_info, MetaFunction function, const SPtr< List > &parameters, std::list< Option > &options, const std::string &type, const std::string &condition="")
 Creates an atomic function from a raw function pointer.
virtual void destroy ()
 Destroys the current instance.
virtual const std::string get_type_name ()
 Returns the type of the object.
DPtr execute (SPtr< List > &arguments, SPtr< List > &options, SPtr< Scope > &scope, Engine *engine) const
 Executes the function.

Protected Attributes

MetaFunction function
 Function address.

Detailed Description

Class ExternalFunction encapsulates the external function type as an object.


Constructor & Destructor Documentation

crp::ExternalFunction::ExternalFunction ( XMLDataPool meta_info,
MetaFunction  function,
const SPtr< List > &  parameters,
std::list< Option > &  options,
const std::string &  type,
const std::string &  condition = "" 
)

Creates an atomic function from a raw function pointer.

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

Member Function Documentation

virtual void crp::ExternalFunction::destroy ( ) [inline, virtual]

Destroys the current instance.

DPtr crp::ExternalFunction::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.

virtual const std::string crp::ExternalFunction::get_type_name ( ) [inline, virtual]

Returns the type of the object.

Returns:
Type of the object

Field Documentation

Function address.


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