git-svn-id: svn://db.shs.com.ru/pip@652 12ceb7fc-bf1f-11e4-8940-5bc7170c53b5
This commit is contained in:
39
main.cpp
39
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<typename T>
|
||||
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<O>();
|
||||
|
||||
|
||||
// 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();
|
||||
|
||||
Reference in New Issue
Block a user