memgraph/query_engine/template/template_code_cpu.cpp
2016-02-10 23:34:49 +01:00

35 lines
505 B
C++

#include <iostream>
#include <string>
#include "query_engine/i_code_cpu.hpp"
// TODO generate with the template engine
// #include "storage/model/properties/jsonwriter.hpp"
using std::cout;
using std::endl;
// query: {{query}}
class {{class_name}} : public ICodeCPU
{
public:
QueryResult::sptr run(Db& db) override
{
{{code}} }
~{{class_name}}() {}
};
extern "C" ICodeCPU* produce()
{
return new {{class_name}}();
}
extern "C" void destruct(ICodeCPU* p)
{
delete p;
}