ReUseX  0.0.5
3D Point Cloud Processing for Building Reuse
Loading...
Searching...
No Matches
reusex::core::traits::detail Namespace Reference

Functions

template<typename T>
constexpr PropertyDescriptor make_property (const char *field_name, const char *leksikon_guid, const char *json_name, PropertyType type, size_t field_offset) noexcept
 Create a simple property descriptor (non-nested).
template<typename T, typename NestedT>
constexpr PropertyDescriptor make_nested_property (const char *field_name, const char *json_name, size_t field_offset) noexcept
 Create a nested object array property descriptor.

Function Documentation

◆ make_nested_property()

template<typename T, typename NestedT>
PropertyDescriptor reusex::core::traits::detail::make_nested_property ( const char * field_name,
const char * json_name,
size_t field_offset )
constexprnoexcept

Create a nested object array property descriptor.

Helper function for fields like std::vector<DangerousSubstance>. Links to nested type's PropertyTraits for recursive serialization.

Template Parameters
TThe parent struct type
NestedTThe nested struct type (must have PropertyTraits specialization)
Parameters
field_nameC++ field name
json_nameJSON export name matching Danish standard template
field_offsetOffset of field in struct (use offsetof)
Returns
PropertyDescriptor instance with nested properties linked

Definition at line 126 of file materialepas_traits.hpp.

References make_nested_property(), reusex::core::traits::ObjectArray, reusex::core::traits::PropertyTraits< T >::properties(), and reusex::core::traits::PropertyTraits< T >::property_count().

Referenced by make_nested_property().

◆ make_property()

template<typename T>
PropertyDescriptor reusex::core::traits::detail::make_property ( const char * field_name,
const char * leksikon_guid,
const char * json_name,
PropertyType type,
size_t field_offset )
constexprnoexcept

Create a simple property descriptor (non-nested).

Helper function to construct PropertyDescriptor for simple fields. Provides type-safe, constexpr property creation without macros.

Template Parameters
TThe struct type containing the field
Parameters
field_nameC++ field name (e.g., "contact_email")
leksikon_guidMolio leksiCon GUID string
json_nameJSON export name matching Danish standard template
typePropertyType enum value
field_offsetOffset of field in struct (use offsetof)
Returns
PropertyDescriptor instance

Definition at line 95 of file materialepas_traits.hpp.

References make_property().

Referenced by make_property().