qCC_db  version 2.5.4 (Qt) - 19 Apr 2014
 All Classes Functions Variables Typedefs Enumerations Enumerator Pages
Static Public Member Functions | Static Protected Member Functions | List of all members
ccSerializationHelper Class Reference

Serialization helpers. More...

#include <ccSerializableObject.h>

Static Public Member Functions

static void CoordsFromDataStream (QDataStream &stream, int flags, PointCoordinateType *out, unsigned count=1)
 Reads one or several 'PointCoordinateType' values from a QDataStream either in float or double format depending on the 'flag' value.
 
static void ScalarsFromDataStream (QDataStream &stream, int flags, ScalarType *out, unsigned count=1)
 Reads one or several 'ScalarType' values from a QDataStream either in float or double format depending on the 'flag' value.
 
template<int N, class ElementType >
static bool GenericArrayToFile (const GenericChunkedArray< N, ElementType > &chunkArray, QFile &out)
 Helper: saves a GenericChunkedArray structure to file. More...
 
template<int N, class ElementType >
static bool GenericArrayFromFile (GenericChunkedArray< N, ElementType > &chunkArray, QFile &in, short dataVersion)
 Helper: loads a GenericChunkedArray structure from file. More...
 
template<int N, class ElementType , class FileElementType >
static bool GenericArrayFromTypedFile (GenericChunkedArray< N, ElementType > &chunkArray, QFile &in, short dataVersion)
 Helper: loads a GenericChunkedArray structure from a file stored with a different type. More...
 

Static Protected Member Functions

static bool ReadArrayHeader (QFile &in, short dataVersion,::uint8_t &componentCount,::uint32_t &elementCount)
 

Detailed Description

Serialization helpers.

Member Function Documentation

template<int N, class ElementType >
static bool ccSerializationHelper::GenericArrayFromFile ( GenericChunkedArray< N, ElementType > &  chunkArray,
QFile &  in,
short  dataVersion 
)
inlinestatic

Helper: loads a GenericChunkedArray structure from file.

Parameters
chunkArrayGenericChunkedArray structure to load
ininput file (must be already opened)
dataVersionversion current data version
Returns
success
template<int N, class ElementType , class FileElementType >
static bool ccSerializationHelper::GenericArrayFromTypedFile ( GenericChunkedArray< N, ElementType > &  chunkArray,
QFile &  in,
short  dataVersion 
)
inlinestatic

Helper: loads a GenericChunkedArray structure from a file stored with a different type.

Parameters
chunkArrayGenericChunkedArray structure to load
ininput file (must be already opened)
dataVersionversion current data version
Returns
success
template<int N, class ElementType >
static bool ccSerializationHelper::GenericArrayToFile ( const GenericChunkedArray< N, ElementType > &  chunkArray,
QFile &  out 
)
inlinestatic

Helper: saves a GenericChunkedArray structure to file.

Parameters
chunkArrayGenericChunkedArray structure to save (must be allocated)
outoutput file (must be already opened)
Returns
success

The documentation for this class was generated from the following file: