From: Baptiste DURAND Date: Fri, 29 Mar 2013 18:00:47 +0000 (+0100) Subject: Add Serialize/Deserialize function for unsigned long X-Git-Tag: submit/tizen/20130521.003238~3 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=5bc2988b8ffec76f4244f1ab1b2b264c058229d6;p=platform%2Fframework%2Fweb%2Fwrt-commons.git Add Serialize/Deserialize function for unsigned long Fix for wrt-plugins-common build static void Serialize(IStream& stream, const long unsigned int value) static void Deserialize(IStream& stream, unsigned long int& value) --- diff --git a/modules/core/include/dpl/serialization.h b/modules/core/include/dpl/serialization.h index d72c488..f100547 100644 --- a/modules/core/include/dpl/serialization.h +++ b/modules/core/include/dpl/serialization.h @@ -70,6 +70,16 @@ struct Serialization { { stream.Write(sizeof(*value), value); } + + // long int + static void Serialize(IStream& stream, const long unsigned int value) + { + stream.Write(sizeof(value), &value); + } + static void Serialize(IStream& stream, const long unsigned int* const value) + { + stream.Write(sizeof(*value), value); + } // int static void Serialize(IStream& stream, const int value) @@ -203,6 +213,17 @@ struct Deserialization { stream.Read(sizeof(*value), value); } + // long int + static void Deserialize(IStream& stream, long unsigned int& value) + { + stream.Read(sizeof(value), &value); + } + static void Deserialize(IStream& stream, long unsigned int*& value) + { + value = new long unsigned int; + stream.Read(sizeof(*value), value); + } + // int static void Deserialize(IStream& stream, int& value) {