2016-02-07 03:48:40 +08:00
|
|
|
#pragma once
|
|
|
|
|
2016-08-11 11:47:30 +08:00
|
|
|
#include "communication/communication.hpp"
|
2016-06-06 17:29:52 +08:00
|
|
|
#include "database/db.hpp"
|
2016-08-20 01:40:04 +08:00
|
|
|
#include "database/db_accessor.hpp"
|
2016-08-10 16:39:02 +08:00
|
|
|
#include "query_engine/query_stripped.hpp"
|
2016-02-07 03:48:40 +08:00
|
|
|
|
|
|
|
class ICodeCPU
|
|
|
|
{
|
|
|
|
public:
|
2016-08-11 11:47:30 +08:00
|
|
|
virtual bool run(Db &db, code_args_t &args,
|
|
|
|
communication::OutputStream &stream) = 0;
|
2016-02-07 03:48:40 +08:00
|
|
|
virtual ~ICodeCPU() {}
|
|
|
|
};
|
|
|
|
|
2016-06-06 17:29:52 +08:00
|
|
|
using produce_t = ICodeCPU *(*)();
|
|
|
|
using destruct_t = void (*)(ICodeCPU *);
|