From e00ca3fb0cfea3110f6e8325804a139b65798486 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=91=D1=8B=D1=87=D0=BA=D0=BE=D0=B2=20=D0=90=D0=BD=D0=B4?= =?UTF-8?q?=D1=80=D0=B5=D0=B9?= Date: Fri, 19 Oct 2018 13:30:57 +0000 Subject: [PATCH] git-svn-id: svn://db.shs.com.ru/pip@652 12ceb7fc-bf1f-11e4-8940-5bc7170c53b5 --- main.cpp | 39 +++++++++++++++++++++++++++++++++++---- 1 file changed, 35 insertions(+), 4 deletions(-) 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();