ReUseX  0.0.5
3D Point Cloud Processing for Building Reuse
Loading...
Searching...
No Matches
reusex::core::serialization::Deserializer Class Reference

Deserializer for converting database values to C++ structs. More...

#include <materialepas_serialization.hpp>

Static Public Member Functions

template<typename T>
static void deserialize (T &obj, const std::map< std::string, PropertyValue > &values)
 Deserialize a struct from property value map.

Detailed Description

Deserializer for converting database values to C++ structs.

Uses PropertyTraits metadata to map database property values (keyed by leksikon_guid) to struct fields. Handles type conversions, JSON parsing for arrays, and nested object deserialization.

Definition at line 72 of file materialepas_serialization.hpp.

Member Function Documentation

◆ deserialize()

template<typename T>
void reusex::core::serialization::Deserializer::deserialize ( T & obj,
const std::map< std::string, PropertyValue > & values )
static

Deserialize a struct from property value map.

Template Parameters
TThe struct type (must have PropertyTraits specialization)
Parameters
objOutput object to populate
valuesMap of leksikon_guid → PropertyValue

Missing properties will leave fields with default values. Type mismatches will throw std::runtime_error.

Definition at line 141 of file materialepas_serialization.hpp.

References reusex::core::traits::Boolean, reusex::core::traits::Double, reusex::core::traits::EnumArray, reusex::core::traits::EnumValue, reusex::core::traits::Integer, reusex::core::traits::ObjectArray, reusex::core::traits::String, reusex::core::traits::StringArray, and reusex::core::traits::TriState.


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