![]() |
NDEVR
API Documentation
|
Searches a model hierarchy and pulls all parameter data based on the AccumationMode settings. More...
Public Types | |
| enum | AccumulateMode { e_get_max_min , e_get_average , e_get_variance , e_get_std_dev , e_get_strings , e_get_total , e_get_indices , e_get_floats } |
| Defines which statistical or data-collection operations to perform during accumulation. 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 | |
| DesignParameterAccumulator (const DesignParameter &design_parameter, BitFlag mode=BitFlag(0)) | |
| Constructs a DesignParameterAccumulator for a specific parameter. | |
| void | accumulate (const DesignObject &object, fltp08 known_avg=Constant< fltp08 >::Invalid) |
| Accumulates parameter data from a design object. | |
| void | accumulate (fltp08 value, const uint01 &dim=X, bool to_unit=true) |
| Accumulates a single floating-point value into the running statistics. | |
| void | addToTotal (fltp08 value) |
| Adds a value directly to the running total without updating other statistics. | |
| void | clear () |
| Resets all accumulated statistics and collected data to their initial state. | |
| void | setCollectVerticesByPrimitive (PrimitiveProperty vertex_collection_primitive) |
| Configures vertex collection to gather vertices by the specified primitive property. | |
| void | setToDefaults (const DesignObject &object) |
| Initialises accumulator defaults from the given design object's properties. | |
| DesignObject::DesignObjectType | type () |
| Returns the DesignObjectType that this accumulator is targeting. | |
| 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 | |
| BitFlag | accumulate_mode |
| Bitmask of AccumulateMode flags controlling which statistics to collect. | |
| bool | add_commas = false |
| Whether to insert commas as thousands separators in formatted output. | |
| fltp08 | average = Constant<fltp08>::Invalid |
| The computed average value, or Invalid if not yet calculated. | |
| String | default_value |
| Default value string used when a parameter is missing. | |
| Buffer< fltp08 > | float_values |
| Collected raw floating-point values (when e_get_floats is set). | |
| bool | include_unit_symbols = true |
| Whether to append unit symbols (e.g., "m", "ft") in formatted string output. | |
| Buffer< uint04 > | indices |
| Collected row or object indices (when e_get_indices is set). | |
| bool | is_normal_prop = false |
| Whether the parameter is a standard built-in property. | |
| fltp08 | lower_std_dev = 0.0 |
| Standard deviation for values less than the average. | |
| fltp08 | lower_variance = 0.0 |
| Variance for values less than the average. | |
| fltp08 | max = Constant<fltp08>::Min |
| The maximum value encountered during accumulation. | |
| uint04 | max_num_of_decimals = Constant<uint04>::Max |
| Maximum number of decimal places for string formatting. | |
| uint04 | max_num_of_values = Constant<uint04>::Max |
| Maximum number of values to collect before stopping. | |
| fltp08 | min = Constant<fltp08>::Max |
| The minimum value encountered during accumulation. | |
| uint04 | min_digits = 0 |
| Minimum number of digits for string formatting. | |
| uint04 | min_num_of_decimals = 0 |
| Minimum number of decimal places for string formatting. | |
| ConstPointer< Unit > | override_unit |
| Optional unit override for value conversion. Null uses the parameter's default unit. | |
| DesignParameter | parameter |
| The design parameter being accumulated. | |
| bool | recursive_matrix = false |
| Whether to recursively compose parent transform matrices. | |
| StringAllocatingView | string_cache |
| Temporary string buffer used during value formatting. | |
| Buffer< StringAllocatingView > | string_values |
| Collected string representations of parameter values (when e_get_strings is set). | |
| uint04 | total_count = 0 |
| Total number of values accumulated. | |
| uint04 | total_lower = 0 |
| Count of values less than the average. | |
| uint04 | total_upper = 0 |
| Count of values greater than the average. | |
| fltp08 | total_value = 0.0 |
| The running sum of all accumulated values. | |
| Matrix< fltp08 > | transform = Matrix<fltp08>(1.0) |
| The current transformation matrix applied during accumulation. | |
| fltp08 | upper_std_dev = 0.0 |
| Standard deviation for values greater than the average. | |
| fltp08 | upper_variance = 0.0 |
| Variance for values greater than the average. | |
| bool | use_defaults = false |
| Whether to use default_value when the parameter is absent from an object. | |
| 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 accumulator targets. | |
| PrimitiveProperty | m_vertex_collection_primitive = PrimitiveProperty::Vertices |
| The primitive property used to group vertices during collection. | |
| 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 during accumulation. | |
| 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 | |
| void | _parseAllModels () final override |
| Internal entry point that begins parsing all models in the hierarchy. | |
| ParseResult | postProcess (Model &m) final override |
| Post-processes a Model after its children have been visited, finalising statistics. | |
| ParseResult | process (Model &model) final override |
| Processes a single Model node during accumulation. | |
| ParseResult | process (Model &model, Geometry &geo) final override |
| Processes a Geometry node associated with a Model during accumulation. | |
| ParseResult | process (Model &model, Material &mat) final override |
| Processes a Material node associated with a Model during accumulation. | |
Additional Inherited Members | |
| Protected Member Functions inherited from ModelIterator | |
| Model | popNextModel () |
| Pops and returns the next model from the traversal stack. | |
| void | removeFromPostProcessStack () |
| Removes the current model from the post-process stack. | |
Searches a model hierarchy and pulls all parameter data based on the AccumationMode settings.
Definition at line 85 of file DesignParameterAccumulator.h.
Defines which statistical or data-collection operations to perform during accumulation.
Definition at line 89 of file DesignParameterAccumulator.h.
|
explicit |
Constructs a DesignParameterAccumulator for a specific parameter.
| [in] | design_parameter | The parameter definition to accumulate. |
| [in] | mode | A BitFlag combination of AccumulateMode values controlling what data to collect. |
| void DesignParameterAccumulator::accumulate | ( | const DesignObject & | object, |
| fltp08 | known_avg = Constant< fltp08 >::Invalid ) |
Accumulates parameter data from a design object.
| [in] | object | The design object whose parameter value is accumulated. |
| [in] | known_avg | A pre-computed average, used when computing variance or std deviation. Invalid if not provided. |
| void DesignParameterAccumulator::accumulate | ( | fltp08 | value, |
| const uint01 & | dim = X, | ||
| bool | to_unit = true ) |
Accumulates a single floating-point value into the running statistics.
| [in] | value | The value to accumulate. |
| [in] | dim | The dimension index (e.g., X, Y, Z) for multi-dimensional parameters. |
| [in] | to_unit | Whether to convert the value to the display unit before accumulating. |
| void DesignParameterAccumulator::addToTotal | ( | fltp08 | value | ) |
Adds a value directly to the running total without updating other statistics.
| [in] | value | The value to add to the total. |
|
finaloverrideprivatevirtual |
Post-processes a Model after its children have been visited, finalising statistics.
| [in] | m | The model being post-processed. |
Reimplemented from ModelIterator.
|
finaloverrideprivatevirtual |
Processes a single Model node during accumulation.
| [in] | model | The model to process. |
Reimplemented from ModelIterator.
|
finaloverrideprivatevirtual |
Processes a Geometry node associated with a Model during accumulation.
| [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 accumulation.
| [in] | model | The parent model of the material. |
| [in] | mat | The material to process. |
Reimplemented from ModelIterator.
| void DesignParameterAccumulator::setCollectVerticesByPrimitive | ( | PrimitiveProperty | vertex_collection_primitive | ) |
Configures vertex collection to gather vertices by the specified primitive property.
| [in] | vertex_collection_primitive | The primitive property that determines how vertices are grouped. |
| void DesignParameterAccumulator::setToDefaults | ( | const DesignObject & | object | ) |
Initialises accumulator defaults from the given design object's properties.
| [in] | object | The design object to derive defaults from. |
|
inline |
Returns the DesignObjectType that this accumulator is targeting.
Definition at line 127 of file DesignParameterAccumulator.h.
References m_design_type.