PICloud small patches
This commit is contained in:
20
main.cpp
20
main.cpp
@@ -1,5 +1,16 @@
|
||||
#include "pip.h"
|
||||
|
||||
class A: public PIObject {
|
||||
PIOBJECT(A)
|
||||
public:
|
||||
EVENT_HANDLER1(void, eh, PIByteArray, i) {piCout << "eh" << i.toHex();}
|
||||
};
|
||||
|
||||
class B: public PIObject {
|
||||
PIOBJECT(B)
|
||||
public:
|
||||
EVENT2(eh, PIByteArray, i, PIString, str);
|
||||
};
|
||||
|
||||
template <typename S, typename T, typename std::enable_if<
|
||||
std::is_same<T, PIVector<S>>::value
|
||||
@@ -10,7 +21,12 @@ template <typename S, typename T, typename std::enable_if<
|
||||
|
||||
|
||||
int main() {
|
||||
PIDeque<int> x;
|
||||
A a;
|
||||
B b;
|
||||
CONNECTU_QUEUED(&b, eh, &a, eh, &a);
|
||||
b.eh(PIByteArray::fromHex("102030"), "str");
|
||||
a.maybeCallQueuedEvents();
|
||||
/*PIDeque<int> x;
|
||||
x.resize(16, [](size_t i) {return i+1;});
|
||||
piCout << x;
|
||||
PIDeque<PIDeque<int>> m = x.reshape(2,8);
|
||||
@@ -21,6 +37,6 @@ int main() {
|
||||
PIDeque<int> y;
|
||||
y = m.reshape<int>();
|
||||
piCout << y;
|
||||
piCout << m.reshape<int>(PIDeque<int>::byColumn);
|
||||
piCout << m.reshape<int>(PIDeque<int>::byColumn);*/
|
||||
return 0;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user