mirror of
https://github.com/polserver/polserver
synced 2026-08-13 08:23:08 -04:00
* tidy * Automated clang-tidy change: modernize-concat-nested-namespaces * compile test * fix namespace --------- Co-authored-by: Clang Tidy <clang-tidy@users.noreply.github.com>
42 lines
915 B
C++
42 lines
915 B
C++
#pragma once
|
|
|
|
#include "bobject.h"
|
|
#include "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
|