mirror of
https://github.com/polserver/polserver
synced 2026-08-13 08:23:08 -04:00
* all except pol * pol and includes under defines * something weird has happened * remove own folder from include searchpath * fixed remaining, adapted include style for external headers * missing include
43 lines
963 B
C++
43 lines
963 B
C++
#pragma once
|
|
|
|
#include "bscript/bobject.h"
|
|
#include "bscript/bobjectimp.h"
|
|
#include "bscript/exectype.h"
|
|
|
|
|
|
namespace Pol::Bscript
|
|
{
|
|
class Executor;
|
|
class BContinuation;
|
|
class BFunctionRef;
|
|
|
|
struct ContinuationCallbackWrapper
|
|
{
|
|
BObjectImp* ( *call )( Executor&, BContinuation*, void* /*wrapper data*/, BObjectRef /*result*/ );
|
|
void ( *free )( void* );
|
|
size_t ( *size )();
|
|
};
|
|
|
|
class BContinuation : public BObjectImp
|
|
{
|
|
public:
|
|
BContinuation( BObjectRef funcref, BObjectRefVec args, ContinuationCallbackWrapper wrapper,
|
|
void* wrapperData );
|
|
~BContinuation() override;
|
|
|
|
BObjectImp* continueWith( Executor& exec, BObjectRef result );
|
|
BFunctionRef* func();
|
|
|
|
BObjectImp* copy() const override;
|
|
size_t sizeEstimate() const override;
|
|
std::string getStringRep() const override;
|
|
|
|
private:
|
|
BObjectRef funcref_;
|
|
ContinuationCallbackWrapper wrapper_;
|
|
void* wrapperData_;
|
|
|
|
public:
|
|
BObjectRefVec args;
|
|
};
|
|
} // namespace Pol::Bscript
|