11 #ifndef __OPC_UA_BINARY_SERIALIZATION_TOOLS_H__ 12 #define __OPC_UA_BINARY_SERIALIZATION_TOOLS_H__ 20 template<
class Stream,
class Container>
21 inline void SerializeContainer(Stream & out,
const Container &
c, uint32_t emptySizeValue = ~uint32_t())
25 out.Serialize(emptySizeValue);
30 out.Serialize(static_cast<uint32_t>(c.size()));
31 std::for_each(c.begin(), c.end(), [&](
typename Container::value_type
const & v) { out.Serialize(v); });
35 template<
class Stream,
class Container>
43 if (!size || size == ~uint32_t())
48 for (uint32_t i = 0; i < size; ++i)
50 typename Container::value_type val;
57 #endif // __OPC_UA_BINARY_SERIALIZATION_TOOLS_H__
void SerializeContainer(Stream &out, const Container &c, uint32_t emptySizeValue=~uint32_t())
void DeserializeContainer(Stream &in, Container &c)
OPC UA Address space part. GNU LGPL.