diff --git a/main.cpp b/main.cpp index 52f82e48..19cf66a7 100644 --- a/main.cpp +++ b/main.cpp @@ -1,7 +1,7 @@ #include "pip.h" #include "piauth.h" - +/* class Obj : public PIObject { PIOBJECT(Obj) public: @@ -40,10 +40,41 @@ public: piCout << "PICout(" << id << ") finished:" << (*buff); } }; +*/ +class O { +public: + O() {piCout << "O";} + ~O() {piCout << "~O";} +}; + +class Buffer { +public: + Buffer() {} + template + static Buffer create() { + Buffer ret; + ret.data = new T(); + ret.pdestroy = (void *)(T::~T); + return ret; + } + void destroy() {} + void * data; + void * pdestroy; +}; + + +class __BufferStorage { +public: + +}; + int main() { - PIEvaluator eval, eval2; - eval.check("1-1*2"); - piCout << eval.evaluate().real(); + Buffer b = Buffer::create(); + + +// PIEvaluator eval, eval2; +// eval.check("1-1*2"); +// piCout << eval.evaluate().real(); /*eval.setVariable("t", complexd(1, 2)); eval.check("(t*t*(t<8))+(72*(t>8)-8*(9-t)*(9-t)*(t>8)*(t<8.8))+(3*(t-8.8)*(t>8.8))"); PIByteArray ba = eval.save();