Re: Serialization/deserialization of templated class

2017-06-29 Thread Steven Schveighoffer via Digitalmars-d
On 6/28/17 1:52 AM, Dmitry Solomennikov wrote: On Wednesday, 28 June 2017 at 05:01:17 UTC, Eugene Wissner wrote: On Wednesday, 28 June 2017 at 04:41:25 UTC, Dmitry Solomennikov wrote: Probably if you have serialized data, you convert strings to other types, so it may be possible to perfom if

Re: Serialization/deserialization of templated class

2017-06-28 Thread Jacob Carlborg via Digitalmars-d
On 2017-06-28 07:52, Dmitry Solomennikov wrote: On Wednesday, 28 June 2017 at 05:01:17 UTC, Eugene Wissner wrote: On Wednesday, 28 June 2017 at 04:41:25 UTC, Dmitry Solomennikov wrote: Probably if you have serialized data, you convert strings to other types, so it may be possible to perfom i

Re: Serialization/deserialization of templated class

2017-06-27 Thread Eugene Wissner via Digitalmars-d
On Wednesday, 28 June 2017 at 05:52:38 UTC, Dmitry Solomennikov wrote: On Wednesday, 28 June 2017 at 05:01:17 UTC, Eugene Wissner wrote: On Wednesday, 28 June 2017 at 04:41:25 UTC, Dmitry Solomennikov wrote: Probably if you have serialized data, you convert strings to other types, so it may

Re: Serialization/deserialization of templated class

2017-06-27 Thread Dmitry Solomennikov via Digitalmars-d
On Wednesday, 28 June 2017 at 05:01:17 UTC, Eugene Wissner wrote: On Wednesday, 28 June 2017 at 04:41:25 UTC, Dmitry Solomennikov wrote: Probably if you have serialized data, you convert strings to other types, so it may be possible to perfom if-checks: if (myDataIsStringAndDouble(data)) {

Re: Serialization/deserialization of templated class

2017-06-27 Thread Eugene Wissner via Digitalmars-d
On Wednesday, 28 June 2017 at 04:41:25 UTC, Dmitry Solomennikov wrote: Hi, guys! I have templated classes like this: class Some(T1) { T1 value; this(T1 _value){ value = _value; } } class Pair(T1, T2) { T1 first; T2 second; this(T1 _first, T2 _second){ first = _first; sec

Serialization/deserialization of templated class

2017-06-27 Thread Dmitry Solomennikov via Digitalmars-d
Hi, guys! I have templated classes like this: class Some(T1) { T1 value; this(T1 _value){ value = _value; } } class Pair(T1, T2) { T1 first; T2 second; this(T1 _first, T2 _second){ first = _first; second = _second; } } and a lot of serialised data, which I have to read