MDL SDK API nvidia_logo_transpbg.gif Up
mi::mdl::IRule_matcher Class Referenceabstract

The interface to the generated rule matcher, new version for distiller plugin API. More...

#include <mdl_distiller_rules.h>

Public Types

typedef bool(* Checker_function) (IDistiller_plugin_api &plugin_api, DAG_node const *node)
 Function pointer for individual checker functions in rule sets. More...
 

Public Member Functions

virtual Rule_eval_strategy get_strategy () const =0
 Return the strategy to be used with this rule set. More...
 
virtual size_t get_target_material_name_count () const =0
 Return the number of fully qualified imported MDL names in this rule set. More...
 
virtual char const * get_target_material_name (size_t i) const =0
 Return the fully qualified name of the imported MDL name with the given index for this rule set. More...
 
virtual DAG_node const * matcher (IRule_matcher_event *event_handler, IDistiller_plugin_api &plugin_api, DAG_node const *node, mi::mdl::Distiller_options const *options, Rule_result_code &result_code) const =0
 Run the matcher. More...
 
virtual bool postcond (IRule_matcher_event *event_handler, IDistiller_plugin_api &plugin_api, DAG_node const *root, mi::mdl::Distiller_options const *options) const =0
 Returns true if the root node satisfies all postcondition that need to be valid after the rule set has been run. More...
 
virtual char const * get_rule_set_name () const =0
 Return the name of the rule set (for diagnostic messages) More...
 
virtual void set_node_types (Node_types *node_types)=0
 Set the Node_types object to use. More...
 

Detailed Description

The interface to the generated rule matcher, new version for distiller plugin API.

Member Typedef Documentation

 Checker_function

typedef bool(* mi::mdl::IRule_matcher::Checker_function) (IDistiller_plugin_api &plugin_api, DAG_node const *node)

Function pointer for individual checker functions in rule sets.

Member Function Documentation

 get_rule_set_name()

virtual char const * mi::mdl::IRule_matcher::get_rule_set_name ( ) const
pure virtual

Return the name of the rule set (for diagnostic messages)

 get_strategy()

virtual Rule_eval_strategy mi::mdl::IRule_matcher::get_strategy ( ) const
pure virtual

Return the strategy to be used with this rule set.

 get_target_material_name()

virtual char const * mi::mdl::IRule_matcher::get_target_material_name ( size_t  i) const
pure virtual

Return the fully qualified name of the imported MDL name with the given index for this rule set.

 get_target_material_name_count()

virtual size_t mi::mdl::IRule_matcher::get_target_material_name_count ( ) const
pure virtual

Return the number of fully qualified imported MDL names in this rule set.

 matcher()

virtual DAG_node const * mi::mdl::IRule_matcher::matcher ( IRule_matcher_event event_handler,
IDistiller_plugin_api plugin_api,
DAG_node const *  node,
mi::mdl::Distiller_options const *  options,
Rule_result_code result_code 
) const
pure virtual

Run the matcher.

Parameters
event_handlerif non-NULL, an event handler used to report events
plugin_apithe plugin API used to create new nodes
nodethe root node of the sub-DAG to match
optionsoptions to customize constants and behavior in rules
result_codereturns a code that controls the matching algorithm

 postcond()

virtual bool mi::mdl::IRule_matcher::postcond ( IRule_matcher_event event_handler,
IDistiller_plugin_api plugin_api,
DAG_node const *  root,
mi::mdl::Distiller_options const *  options 
) const
pure virtual

Returns true if the root node satisfies all postcondition that need to be valid after the rule set has been run.

Parameters
event_handlerif non-NULL, an event handler used to report events
plugin_apithe plugin API used to create new nodes
rootthe root node of the DAG to check
optionsoptions to customize constants and behavior in rules

 set_node_types()

virtual void mi::mdl::IRule_matcher::set_node_types ( Node_types *  node_types)
pure virtual

Set the Node_types object to use.

This is used by the Distiller to install the node type helper class in the rule object.