Re: Serialize a char array member as part of class serialization into cache - C++ API

2020-08-03 Thread Igor Sapego
Hi Dana, "char" type is not supported by Ignite as it may have different sign on different platforms. You can use int8_t if you want to have a byte array, or WriteString/ReadString if you want it to be a string. Also, I've re-factored your BinaryType code a little bit so it's more readable: temp

Re: Serialize a char array member as part of class serialization into cache - C++ API

2020-08-03 Thread Denis Magda
Igor, Would you please join the discussion and help Data tackle the issue? - Denis On Thu, Jul 30, 2020 at 1:03 AM Dana Milan wrote: > Hi, > > I couldn't find an answer anywhere else, hopefully you can help me. > > I have the following class: > > class Pair { > friend struct ignite::binary::B

Serialize a char array member as part of class serialization into cache - C++ API

2020-07-30 Thread Dana Milan
Hi, I couldn't find an answer anywhere else, hopefully you can help me. I have the following class: class Pair { friend struct ignite::binary::BinaryType; public: Pair() { _len = 0; _buff = nullptr; } Pair(char* buff, int len) { _len = len; _buff = new char[len]; for (int i = 0; i < len; i++) {