Colobot
Loading...
Searching...
No Matches
CBot::CBotExternalCall Class Referenceabstract

Interface for external CBot calls. More...

#include <src/CBot/CBotExternalCall.h>

Inheritance diagram for CBot::CBotExternalCall:

Public Member Functions

 CBotExternalCall ()
 Constructor.
virtual ~CBotExternalCall ()
 Destructor.
virtual CBotTypResult Compile (CBotVar *thisVar, CBotVar *args, void *user)=0
 Compile the function.
virtual bool Run (CBotVar *thisVar, CBotStack *pStack)=0
 Execute the function.

Detailed Description

Interface for external CBot calls.

See also
CBotExternalCallList
CBotExternalCallDefault

Constructor & Destructor Documentation

◆ CBotExternalCall()

CBot::CBotExternalCall::CBotExternalCall ( )

Constructor.

See also
CBotProgram::AddFunction()

◆ ~CBotExternalCall()

CBot::CBotExternalCall::~CBotExternalCall ( )
virtual

Destructor.

Member Function Documentation

◆ Compile()

virtual CBotTypResult CBot::CBotExternalCall::Compile ( CBotVar * thisVar,
CBotVar * args,
void * user )
pure virtual

Compile the function.

Parameters
thisVar"this" variable for class calls, nullptr for normal calls
argsArguments (only types!) passed to the function
userUser pointer provided to CBotProgram::Compile()

Implemented in CBot::CBotExternalCallClass, and CBot::CBotExternalCallDefault.

◆ Run()

virtual bool CBot::CBotExternalCall::Run ( CBotVar * thisVar,
CBotStack * pStack )
pure virtual

Execute the function.

Parameters
thisVar"this" variable for class calls, nullptr for normal calls
pStackStack to execute the function on
Returns
false to request program interruption, true otherwise

Implemented in CBot::CBotExternalCallClass, and CBot::CBotExternalCallDefault.


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