![]() |
NDEVR
API Documentation
|
Classes for conveniently setting parameters for a series of DesignObjects in the model hierarchy. More...
Public Types | |
| enum | SetMode { e_set_from_strings } |
| Defines the mode used when setting parameter values. More... | |
| Public Types inherited from ModelIterator | |
| enum | ParseResult { e_continue_parsing , e_do_not_parse_children , e_finish_parsing } |
| The result returned by process functions to control iteration flow. More... | |
Public Member Functions | |
| DesignParameterSetter (const DesignParameter &design_parameter, SetMode mode) | |
| Constructs a DesignParameterSetter for a specific parameter and set mode. | |
| ParseResult | process (DesignObject &object) |
| Sets the parameter value on a generic DesignObject. | |
| ParseResult | process (Geometry &geo) |
| Sets the parameter value on a Geometry. | |
| ParseResult | process (Material &mat) |
| Sets the parameter value on a Material. | |
| ParseResult | process (Model &model) final override |
| Processes a single Model node, setting its parameter value. | |
| void | setToDefaults (const DesignObject &object) |
| Initialises setter defaults from the given design object's properties. | |
| Public Member Functions inherited from ModelIterator | |
| ModelIterator () | |
| Default constructor. | |
| ModelIterator (Buffer< Model > models) | |
| Constructs an iterator initialized with multiple root models. | |
| ModelIterator (const Model &model) | |
| Constructs an iterator initialized with a single root model. | |
| void | addToStack (const Model &model) |
| Adds a model to the internal traversal stack without starting iteration. | |
| Model | currentModel () const |
| Returns the model currently at the top of the traversal stack. | |
| void | parseAll () |
| Parses all models currently on the internal stack and their descendants. | |
| void | parseAll (const Model &model) |
| Parses the given model and all of its descendants. | |
| void | parseAllChildren (const Model &parent) |
| Parses all children of the given parent model, but not the parent itself. | |
| void | parseAllModels (const Buffer< Model > &models) |
| Parses all models in the given buffer and their descendants. | |
| ParseResult | parseNext () |
| Parses the next model on the stack, processing it and optionally its geometry and material. | |
Public Attributes | |
| String | default_value |
| Default value string used when no explicit value is provided. | |
| Buffer< fltp08 > | float_values |
| Floating-point values to apply when not using string mode. | |
| Buffer< uint04 > | indices |
| Indices specifying which rows or objects to target. | |
| bool | is_normal_prop = false |
| Whether the parameter is a standard built-in property. | |
| uint04 | max_num_of_values = Constant<uint04>::Max |
| Maximum number of values to set before stopping. | |
| DesignParameter | parameter |
| The design parameter being set. | |
| bool | recursive = true |
| Whether to recurse into child models. | |
| bool | recursive_matrix = false |
| Whether to recursively compose parent transform matrices. | |
| SetMode | set_mode |
| The current mode controlling how values are interpreted. | |
| uint04 | set_offset = 0 |
| Current offset into string_values or float_values during iteration. | |
| Buffer< String > | string_values |
| The string values to apply, one per object or vertex. | |
| bool | swap_result = false |
| Whether to swap byte order of the result value. | |
| uint04 | total_count = 0 |
| Total number of values that have been set so far. | |
| Matrix< fltp08 > | transform = Matrix<fltp08>(1.0) |
| The current transformation matrix applied during setting. | |
| bool | use_defaults = false |
| Whether to apply default_value when the parameter is absent. | |
| Public Attributes inherited from ModelIterator | |
| bool | depth_first = true |
| Whether to traverse depth-first (true) or breadth-first (false). | |
| std::function< bool(const Model &, const Geometry &)> | geo_filter |
| Optional filter predicate for geometry processing. Returns true to include. | |
| bool | is_recursive = true |
| Whether to recurse into child models. | |
| std::function< bool(const Model &, const Material &)> | material_filter |
| Optional filter predicate for material processing. Returns true to include. | |
| std::function< bool(const Model &)> | model_filter |
| Optional filter predicate for model processing. Returns true to include. | |
| bool | post_process_model = false |
| Whether to invoke postProcess() after a model's children have been parsed. | |
| bool | process_geometry = true |
| Whether to invoke process() for each Geometry on a model. | |
| bool | process_material = false |
| Whether to invoke process() for each Material on a model. | |
| bool | process_model = true |
| Whether to invoke process() for the model itself. | |
| bool | use_unit = false |
| Whether to apply unit conversions during processing. | |
Protected Attributes | |
| bool | is_design_index = false |
| Whether the parameter represents a design-level index property. | |
| bool | is_matrix_prop = false |
| Whether the parameter represents a matrix-type property. | |
| bool | is_special_field = false |
| Whether the parameter requires special handling (e.g., computed fields). | |
| bool | is_vertex_index = false |
| Whether the parameter represents a vertex-level index property. | |
| DesignObject::DesignObjectType | m_design_type = DesignObject::DesignObjectType::e_model |
| The type of design object this setter targets. | |
| uint04 | property_index = Constant<uint04>::Invalid |
| Cached column/property index for the current parameter lookup. | |
| fltp08 | total_value_c = 0.0 |
| Kahan summation compensation term for maintaining precision. | |
| Protected Attributes inherited from ModelIterator | |
| uint04 | m_forward_position = 0U |
| Current forward index position used in breadth-first traversal. | |
| Buffer< std::pair< Model, uint04 > > | m_model_parent_stack |
| Stack tracking parent models and their child indices for post-processing. | |
| Buffer< Model > | m_model_stack |
| The stack of models pending traversal. | |
Private Member Functions | |
| ParseResult | process (Model &model, Geometry &geo) final override |
| Processes a Geometry node associated with a Model during iteration. | |
| ParseResult | process (Model &model, Material &mat) final override |
| Processes a Material node associated with a Model during iteration. | |
Additional Inherited Members | |
| Protected Member Functions inherited from ModelIterator | |
| virtual void | _parseAllModels () |
| Internal method that drives the main parsing loop over all stacked models. | |
| Model | popNextModel () |
| Pops and returns the next model from the traversal stack. | |
| virtual ParseResult | postProcess (Model &model) |
| Called after all children of a model have been processed, when post_process_model is true. | |
| void | removeFromPostProcessStack () |
| Removes the current model from the post-process stack. | |
Classes for conveniently setting parameters for a series of DesignObjects in the model hierarchy.
Definition at line 230 of file DesignParameterAccumulator.h.
Defines the mode used when setting parameter values.
| Enumerator | |
|---|---|
| e_set_from_strings | Set parameter values by parsing from string representations. |
Definition at line 234 of file DesignParameterAccumulator.h.
|
explicit |
Constructs a DesignParameterSetter for a specific parameter and set mode.
| [in] | design_parameter | The parameter definition to set. |
| [in] | mode | The mode controlling how values are interpreted. |
| ParseResult DesignParameterSetter::process | ( | DesignObject & | object | ) |
Sets the parameter value on a generic DesignObject.
| [in] | object | The design object to update. |
| ParseResult DesignParameterSetter::process | ( | Geometry & | geo | ) |
Sets the parameter value on a Geometry.
| [in] | geo | The geometry to update. |
| ParseResult DesignParameterSetter::process | ( | Material & | mat | ) |
Sets the parameter value on a Material.
| [in] | mat | The material to update. |
|
finaloverridevirtual |
Processes a single Model node, setting its parameter value.
| [in] | model | The model to process. |
Reimplemented from ModelIterator.
|
finaloverrideprivatevirtual |
Processes a Geometry node associated with a Model during iteration.
| [in] | model | The parent model of the geometry. |
| [in] | geo | The geometry to process. |
Reimplemented from ModelIterator.
|
finaloverrideprivatevirtual |
Processes a Material node associated with a Model during iteration.
| [in] | model | The parent model of the material. |
| [in] | mat | The material to process. |
Reimplemented from ModelIterator.
| void DesignParameterSetter::setToDefaults | ( | const DesignObject & | object | ) |
Initialises setter defaults from the given design object's properties.
| [in] | object | The design object to derive defaults from. |