Serialization helpers.
More...
#include <ecvSerializableObject.h>
|
| static short | GenericArrayToFileMinVersion () |
| | Returns the minimum file version to save/load a 'generic array'. More...
|
| |
| static void | CoordsFromDataStream (QDataStream &stream, int flags, PointCoordinateType *out, unsigned count=1) |
| |
| static void | ScalarsFromDataStream (QDataStream &stream, int flags, ScalarType *out, unsigned count=1) |
| |
| 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, const QString &verboseDescription) |
| | 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, const QString &verboseDescription, FileComponentType *_autoOffset=nullptr) |
| |
|
| static bool | ReadArrayHeader (QFile &in, short dataVersion, ::uint8_t &componentCount, ::uint32_t &elementCount) |
| |
◆ CoordsFromDataStream()
| static void ccSerializationHelper::CoordsFromDataStream |
( |
QDataStream & |
stream, |
|
|
int |
flags, |
|
|
PointCoordinateType * |
out, |
|
|
unsigned |
count = 1 |
|
) |
| |
|
inlinestatic |
Reads one or several 'PointCoordinateType' values from a QDataStream either in float or double format depending on the 'flag' value
Referenced by define_ccSerializationHelper().
◆ GenericArrayFromFile()
template<class Type , int N, class ComponentType >
| static bool ccSerializationHelper::GenericArrayFromFile |
( |
std::vector< Type > & |
data, |
|
|
QFile & |
in, |
|
|
short |
dataVersion, |
|
|
const QString & |
verboseDescription |
|
) |
| |
|
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, |
|
|
const QString & |
verboseDescription, |
|
|
FileComponentType * |
_autoOffset = nullptr |
|
) |
| |
|
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
◆ GenericArrayToFileMinVersion()
| static short ccSerializationHelper::GenericArrayToFileMinVersion |
( |
| ) |
|
|
inlinestatic |
◆ ReadArrayHeader()
| static bool ccSerializationHelper::ReadArrayHeader |
( |
QFile & |
in, |
|
|
short |
dataVersion, |
|
|
::uint8_t & |
componentCount, |
|
|
::uint32_t & |
elementCount |
|
) |
| |
|
inlinestaticprotected |
◆ ScalarsFromDataStream()
| static void ccSerializationHelper::ScalarsFromDataStream |
( |
QDataStream & |
stream, |
|
|
int |
flags, |
|
|
ScalarType * |
out, |
|
|
unsigned |
count = 1 |
|
) |
| |
|
inlinestatic |
Reads one or several 'ScalarType' values from a QDataStream either in float or double format depending on the 'flag' value
Referenced by define_ccSerializationHelper().
The documentation for this class was generated from the following file: