DriveWorks SDK Reference

| 0.6.67 Release

Map Serialization

Detailed Description

Functions to serialize and deserialize.

Functions

DW_API_PUBLIC dwStatus dwMaps_deserialize (const char *filename, dwMapHandle_t mapHandle)
 Loads map data from file into the map. More...
 
DW_API_PUBLIC dwStatus dwMaps_serialize (const char *filename, dwMapsSerializationFormat format, dwConstMapHandle_t mapHandle)
 Stores current map content into a file. More...
 

Function Documentation

◆ dwMaps_deserialize()

DW_API_PUBLIC dwStatus dwMaps_deserialize ( const char *  filename,
dwMapHandle_t  mapHandle 
)

Loads map data from file into the map.

Existing data in the map is overwritten.

Note
: If the map has not been initialized with sufficiently large buffer for the deserialized data file, and error is logged, and only part of the data is deserialized.
Parameters
[in]filenameFile to store the map data. Gets overwritten if it exists.
[in]mapHandleMap to serialize.
Returns
DW_SUCCESS Successfully deserialized map data from file.
DW_BAD_CAST Could not successfully cast handle to map object.
DW_FILE_INVALID Error during deserialization.

◆ dwMaps_serialize()

DW_API_PUBLIC dwStatus dwMaps_serialize ( const char *  filename,
dwMapsSerializationFormat  format,
dwConstMapHandle_t  mapHandle 
)

Stores current map content into a file.

Parameters
[in]filenameFile to store the map data. Gets overwritten if it exists.
[in]formatSerialization format.
[in]mapHandleMap to serialize.
Returns
DW_SUCCESS Successfully serialized map data into file.
DW_BAD_CAST Could not successfully cast handle to map object.
DW_INTERNAL_ERROR Error during point value serialization for xml.