|
Container System 0.1.0
High-performance C++20 type-safe container framework with SIMD-accelerated serialization
|
Modern factory namespace for creating value instances. More...
Functions | |
| template<typename T > | |
| value | make (std::string_view name, T &&val) |
| Generic factory template for creating typed values. | |
| value | make_null (std::string_view name="") |
| Create a null value. | |
| value | make_array (std::string_view name, std::vector< std::shared_ptr< value > > values) |
| Create an array value from vector of shared_ptr<value> | |
| value | make_array (std::string_view name, std::initializer_list< value > values) |
| Create an array value from initializer list. | |
| value | make_empty_array (std::string_view name) |
| Create an empty array value. | |
| value | make_container (std::string_view name, std::shared_ptr< thread_safe_container > container) |
| Create a container value. | |
| value | make_bytes (std::string_view name, const uint8_t *data, size_t size) |
| Create a bytes value from raw data pointer. | |
| value | make_bytes_from_string (std::string_view name, std::string_view data) |
| Create a bytes value from string (copy bytes) Note: This treats the string as binary data. | |
Modern factory namespace for creating value instances.
Provides a unified, minimal API for value creation:
Usage examples:
|
inline |
Generic factory template for creating typed values.
Forwards arguments to the value constructor with perfect forwarding. This is a thin wrapper that provides a consistent factory interface.
| T | The value type (automatically deduced) |
| name | Value name |
| val | The value to store |
Definition at line 59 of file variant_value_factory.h.
|
inline |
Create an array value from initializer list.
Definition at line 88 of file variant_value_factory.h.
References kcenon::container::array_variant::values.
|
inline |
Create an array value from vector of shared_ptr<value>
Definition at line 78 of file variant_value_factory.h.
References kcenon::container::array_variant::values.
|
inline |
Create a bytes value from raw data pointer.
Definition at line 118 of file variant_value_factory.h.
|
inline |
Create a bytes value from string (copy bytes) Note: This treats the string as binary data.
Definition at line 128 of file variant_value_factory.h.
|
inline |
Create a container value.
Definition at line 110 of file variant_value_factory.h.
|
inline |
Create an empty array value.
Definition at line 103 of file variant_value_factory.h.
|
inline |
Create a null value.
Explicit factory for null value creation when a named null is needed.
| name | Value name (default: empty string) |
Definition at line 71 of file variant_value_factory.h.