NDEVR
API Documentation
DesignParameterExecutor

Forward declaration of ManagedDesignCommand class. More...

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

Public Member Functions

 DesignParameterExecutor (ManagedDesignCommand *command, DesignObjectLookup *lookup)
 Constructs a DesignParameterExecutor with the given command and lookup.
ParseResult process (Model &model) override
 Processes a model by applying the design command to it.
ParseResult process (Model &model, Geometry &geo) override
 Processes a model and its associated geometry by applying the design command.
ParseResult process (Model &model, Material &mat) override
 Processes a model and its associated material by applying the design command.
bool shouldProcess (DesignObject &object)
 Checks whether the given design object should be processed by this executor.
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.

Protected Member Functions

virtual bool processDesignCommand (DesignObject &object)
 Applies the managed design command to the given design object.
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.

Protected Attributes

ManagedDesignCommandm_command
 The managed design command to execute.
DesignObjectLookupm_lookup
 The design object lookup for resolving objects.
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.

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...
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.

Detailed Description

Forward declaration of ManagedDesignCommand class.


Used to execute a ManagedDesignCommand

Definition at line 49 of file DesignCommandExecutor.h.

Constructor & Destructor Documentation

◆ DesignParameterExecutor()

DesignParameterExecutor::DesignParameterExecutor ( ManagedDesignCommand * command,
DesignObjectLookup * lookup )
explicit

Constructs a DesignParameterExecutor with the given command and lookup.

Parameters
[in]commandThe managed design command to execute.
[in]lookupThe design object lookup used to resolve design objects.

Member Function Documentation

◆ process() [1/3]

ParseResult DesignParameterExecutor::process ( Model & model)
overridevirtual

Processes a model by applying the design command to it.

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

Reimplemented from ModelIterator.

◆ process() [2/3]

ParseResult DesignParameterExecutor::process ( Model & model,
Geometry & geo )
overridevirtual

Processes a model and its associated geometry by applying the design command.

Parameters
[in]modelThe model to process.
[in]geoThe geometry associated with the model.
Returns
ParseResult indicating whether to continue or stop parsing.

Reimplemented from ModelIterator.

◆ process() [3/3]

ParseResult DesignParameterExecutor::process ( Model & model,
Material & mat )
overridevirtual

Processes a model and its associated material by applying the design command.

Parameters
[in]modelThe model to process.
[in]matThe material associated with the model.
Returns
ParseResult indicating whether to continue or stop parsing.

Reimplemented from ModelIterator.

◆ processDesignCommand()

virtual bool DesignParameterExecutor::processDesignCommand ( DesignObject & object)
protectedvirtual

Applies the managed design command to the given design object.

Parameters
[in]objectThe design object to apply the command to.
Returns
True if the command was successfully applied, false otherwise.

◆ shouldProcess()

bool DesignParameterExecutor::shouldProcess ( DesignObject & object)

Checks whether the given design object should be processed by this executor.

Parameters
[in]objectThe design object to evaluate.
Returns
True if the object should be processed, false otherwise.

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