Serialization helpers.
More...
#include <ccSerializableObject.h>
|
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<class Type , int N, class ComponentType > |
static bool | GenericArrayToFile (const std::vector< Type > &data, QFile &out) |
| Helper: saves a vector to file. More...
|
|
template<class Type , int N, class ComponentType > |
static bool | GenericArrayFromFile (std::vector< Type > &data, QFile &in, short dataVersion) |
| Helper: loads a vector structure from file. More...
|
|
template<class Type , int N, class ComponentType , class FileComponentType > |
static bool | GenericArrayFromTypedFile (std::vector< Type > &data, QFile &in, short dataVersion) |
| Helper: loads a vector structure from a file stored with a different type. More...
|
|
|
static bool | ReadArrayHeader (QFile &in, short dataVersion, ::uint8_t &componentCount, ::uint32_t &elementCount) |
|
◆ GenericArrayFromFile()
template<class Type , int N, class ComponentType >
static bool ccSerializationHelper::GenericArrayFromFile |
( |
std::vector< Type > & |
data, |
|
|
QFile & |
in, |
|
|
short |
dataVersion |
|
) |
| |
|
inlinestatic |
Helper: loads a vector structure from file.
- Parameters
-
data | vector to load |
in | input file (must be already opened) |
dataVersion | version current data version |
- Returns
- success
◆ GenericArrayFromTypedFile()
template<class Type , int N, class ComponentType , class FileComponentType >
static bool ccSerializationHelper::GenericArrayFromTypedFile |
( |
std::vector< Type > & |
data, |
|
|
QFile & |
in, |
|
|
short |
dataVersion |
|
) |
| |
|
inlinestatic |
Helper: loads a vector structure from a file stored with a different type.
- Parameters
-
data | vector to load |
in | input file (must be already opened) |
dataVersion | version current data version |
- Returns
- success
◆ GenericArrayToFile()
template<class Type , int N, class ComponentType >
static bool ccSerializationHelper::GenericArrayToFile |
( |
const std::vector< Type > & |
data, |
|
|
QFile & |
out |
|
) |
| |
|
inlinestatic |
Helper: saves a vector to file.
- Parameters
-
data | vector to save (must be allocated) |
out | output file (must be already opened) |
- Returns
- success
The documentation for this class was generated from the following file: