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

Type-erased property value holder. More...

#include <materialepas_serialization.hpp>

Public Member Functions

 PropertyValue (const void *blob_data, size_t blob_size, traits::PropertyType type)
 Construct from raw BLOB data.
 PropertyValue (std::string_view str, traits::PropertyType type)
 Construct from string (for convenience).
const std::vector< uint8_t > & blob () const noexcept
 Get raw BLOB data.
std::string_view as_string () const noexcept
 Get BLOB as string view (for String, Integer, Double, etc.).
traits::PropertyType type () const noexcept
 Get property type.

Detailed Description

Type-erased property value holder.

Stores a database property value (BLOB data) along with its type metadata. Used for deserializing MaterialPassport properties from database.

Definition at line 24 of file materialepas_serialization.hpp.

Constructor & Destructor Documentation

◆ PropertyValue() [1/2]

reusex::core::serialization::PropertyValue::PropertyValue ( const void * blob_data,
size_t blob_size,
traits::PropertyType type )

Construct from raw BLOB data.

Parameters
blob_dataPointer to BLOB data from database
blob_sizeSize of BLOB data in bytes
typePropertyType enum indicating how to deserialize

References type().

◆ PropertyValue() [2/2]

reusex::core::serialization::PropertyValue::PropertyValue ( std::string_view str,
traits::PropertyType type )

Construct from string (for convenience).

Parameters
strString value
typePropertyType enum

References type().

Member Function Documentation

◆ as_string()

std::string_view reusex::core::serialization::PropertyValue::as_string ( ) const
noexcept

Get BLOB as string view (for String, Integer, Double, etc.).

Returns
String view of BLOB data

◆ blob()

const std::vector< uint8_t > & reusex::core::serialization::PropertyValue::blob ( ) const
inlinenoexcept

Get raw BLOB data.

Returns
Vector containing BLOB bytes

Definition at line 46 of file materialepas_serialization.hpp.

◆ type()

traits::PropertyType reusex::core::serialization::PropertyValue::type ( ) const
inlinenoexcept

Get property type.

Returns
PropertyType enum value

Definition at line 58 of file materialepas_serialization.hpp.

References type().

Referenced by PropertyValue(), PropertyValue(), and type().


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