1#ifndef __MESHX_COMPOSITION_HPP__
2#define __MESHX_COMPOSITION_HPP__
27 elements.push_back(std::move(element));
42 if (el && el->has_model(model_id))
return true;
109 std::vector<std::unique_ptr<meshXElementIF>>
elements;
std::vector< uint8_t > baked_elements
Definition meshx_composition.hpp:112
MESHX_COMPOSITION * baked_comp_ptr
Definition meshx_composition.hpp:121
meshXComposition()
Definition meshx_composition.hpp:98
void add_element(std::unique_ptr< meshXElementIF > element)
Add an element to the composition.
Definition meshx_composition.hpp:26
MESHX_COMPOSITION * get_baked_composition()
Get the baked composition structure.
Definition meshx_composition.hpp:95
meshx_err_t bake(uint16_t cid, uint16_t pid, uint16_t vid)
"Bake" the dynamic composition into a contiguous C-array
Definition meshx_composition.cpp:34
std::vector< std::vector< uint8_t > > baked_ven_model_arrays
Definition meshx_composition.hpp:118
std::vector< std::unique_ptr< meshXElementIF > > & get_elements()
Get the list of elements.
Definition meshx_composition.hpp:33
bool is_composition_baked() const
Check if the composition is baked.
Definition meshx_composition.hpp:83
meshXComposition & operator=(const meshXComposition &)=delete
dev_struct_t * pdev
Definition meshx_composition.hpp:105
void clear_elements()
Clear all elements and reset state.
Definition meshx_composition.hpp:55
void set_device_struct(dev_struct_t *pdev)
Set the device structure pointer.
Definition meshx_composition.hpp:67
static meshXComposition & get_instance()
Get the singleton instance.
Definition meshx_composition.cpp:29
bool is_baked
Definition meshx_composition.hpp:106
meshXComposition(const meshXComposition &)=delete
MESHX_COMPOSITION baked_comp
Definition meshx_composition.hpp:120
std::vector< std::vector< uint8_t > > baked_sig_model_arrays
Definition meshx_composition.hpp:117
std::vector< std::unique_ptr< meshXElementIF > > elements
Definition meshx_composition.hpp:109
~meshXComposition()=default
bool has_elements() const
Check if there are any elements.
Definition meshx_composition.hpp:50
MESHX_ELEMENT * get_baked_elements()
Get the baked elements array.
Definition meshx_composition.hpp:88
bool has_model(uint16_t model_id) const
Check if any element in the composition contains a specific model.
Definition meshx_composition.hpp:40
struct dev_struct dev_struct_t
Structure representing the device composition and elements.
meshx_err_t
MeshX Error Codes.
Definition meshx_err.h:43
Forward declaration of MeshX classes.