//****************************************************************************** // RCF - Remote Call Framework // Copyright (c) 2005 - 2007. All rights reserved. // Consult your license for conditions of use. // Developed by Jarl Lindrud. // Contact: jlindrud@hotmail.com . //****************************************************************************** #ifndef INCLUDE_SF_SERIALIZESTATICARRAY_HPP #define INCLUDE_SF_SERIALIZESTATICARRAY_HPP #include namespace SF { // serialize C-style static arrays template inline void serializeFundamentalStaticArray(Archive &ar, T (*pt)[N], const unsigned int version) { serializeFundamental(ar, (*pt)[0], version, N); } template inline void serializeNonfundamentalStaticArray(Archive &ar, T (*pt)[N], const unsigned int) { for (unsigned int i=0; i class SerializeStaticArray; template<> class SerializeStaticArray { public: template void operator()(Archive &ar, T (*pt)[N], const unsigned int version) { serializeFundamentalStaticArray(ar, pt, version); } }; template<> class SerializeStaticArray { public: template void operator()(Archive &ar, T (*pt)[N], const unsigned int version) { serializeNonfundamentalStaticArray(ar, pt, version); } }; template inline void preserialize(Archive &ar, T (*pt)[N], const unsigned int version) { static const bool IsFundamental = RCF::IsFundamental::value; SerializeStaticArray()(ar, pt, version); } } // namespace SF #endif // ! INCLUDE_SF_SERIALIZESTATICARRAY_HPP