NDEVR
API Documentation
DesignParameterFinderfinal

Searches a model hierarchy and pulls a list of available parameters along with the count for how many instances of that parameter are present. More...

Inheritance diagram for DesignParameterFinder:
[legend]
Collaboration diagram for DesignParameterFinder:
[legend]

Public Member Functions

void addParameter (const StringView &parameter)
 Manually adds a parameter by name to the finder's collection.
ParseResult process (Model &model) final override
 Processes a single Model node during iteration, collecting its parameters.
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.
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

Dictionary< String, uint04parameter_count
 Maps each parameter name to the number of occurrences found.
Buffer< DesignParameterparameters
 The collected list of unique design parameters found.
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.

Private Member Functions

void _parseAllModels () final override
 Internal entry point that begins parsing all models in the hierarchy.

Additional Inherited Members

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...
Protected Member Functions inherited from ModelIterator
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.
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< Modelm_model_stack
 The stack of models pending traversal.

Detailed Description

Searches a model hierarchy and pulls a list of available parameters along with the count for how many instances of that parameter are present.


Definition at line 50 of file DesignParameterAccumulator.h.

Member Function Documentation

◆ addParameter()

void DesignParameterFinder::addParameter ( const StringView & parameter)

Manually adds a parameter by name to the finder's collection.

Parameters
[in]parameterThe name of the parameter to add.

◆ process() [1/3]

ParseResult DesignParameterFinder::process ( Model & model)
finaloverridevirtual

Processes a single Model node during iteration, collecting its parameters.

Parameters
[in]modelThe model to process.
Returns
ParseResult indicating whether to continue or stop iteration.

Reimplemented from ModelIterator.

◆ process() [2/3]

ParseResult DesignParameterFinder::process ( Model & model,
Geometry & geo )
finaloverridevirtual

Processes a Geometry node associated with a Model during iteration.

Parameters
[in]modelThe parent model of the geometry.
[in]geoThe geometry to process.
Returns
ParseResult indicating whether to continue or stop iteration.

Reimplemented from ModelIterator.

◆ process() [3/3]

ParseResult DesignParameterFinder::process ( Model & model,
Material & mat )
finaloverridevirtual

Processes a Material node associated with a Model during iteration.

Parameters
[in]modelThe parent model of the material.
[in]matThe material to process.
Returns
ParseResult indicating whether to continue or stop iteration.

Reimplemented from ModelIterator.


The documentation for this class was generated from the following file: