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

An interface for reporting rule matcher events. More...

#include <mdl_distiller_rules.h>

Classes

struct  Detailed_trace_event
 A detailed trace event for reporting the operation of the distiller. More...
 

Public Types

enum  Detailed_trace_event_kind {
  Rule_match ,
  Call_pattern_match ,
  Call_pattern_mismatch ,
  Attribute_missing ,
  Attribute_match ,
  Attribute_mismatch ,
  No_match
}
 Detailed trace events are tagged with this enumeration type. More...
 

Public Member Functions

virtual void path_check_event (char const *rule_set_name, char const *dag_path)=0
 A DAG path is checked against a rule set. More...
 
virtual void rule_match_event (char const *rule_set_name, unsigned rule_id, char const *rule_name, char const *file_name, unsigned line_number)=0
 A rule has matched. More...
 
virtual void postcondition_failed (char const *rule_set_name)=0
 A postcondition has failed. More...
 
virtual void postcondition_failed_path (char const *path)=0
 A postcondition has failed for a given path. More...
 
virtual void debug_print (IDistiller_plugin_api &plugin_api, char const *rule_set_name, unsigned rule_id, char const *rule_name, char const *file_name, unsigned line_number, char const *var_name, DAG_node const *value)=0
 A rule with an attached debug_print() statement has matched. More...
 
virtual void detailed_trace_event (char const *rule_set_name, unsigned rule_id, char const *rule_name, char const *file_name, unsigned line_number, Detailed_trace_event trace_event)=0
 A detailed trace event has occurred. More...
 

Detailed Description

An interface for reporting rule matcher events.

Member Enumeration Documentation

 Detailed_trace_event_kind

Detailed trace events are tagged with this enumeration type.

Enumerator
Rule_match 

Rule match completed.

Call_pattern_match 

A call pattern being tested matched.

Call_pattern_mismatch 

A call pattern being tested did not match.

Attribute_missing 

An attribute being tested did not exist.

Attribute_match 

An attribute being tested matched.

Attribute_mismatch 

An attribute being tested did not match.

No_match 

No rule of current rule set has matched.

Member Function Documentation

 debug_print()

virtual void mi::mdl::IRule_matcher_event::debug_print ( IDistiller_plugin_api plugin_api,
char const *  rule_set_name,
unsigned  rule_id,
char const *  rule_name,
char const *  file_name,
unsigned  line_number,
char const *  var_name,
DAG_node const *  value 
)
pure virtual

A rule with an attached debug_print() statement has matched.

This function receives the same arguments as rule_match_event() plus the name of the variable to be printed and the value of the variable after matching succeeded.

Parameters
plugin_apireference to the distiller plugin API that issued this debug_print() event
rule_set_namethe name of the rule set
rule_idthe rule id
rule_namethe name of the rule that matched
file_nameif non-NULL, the file name where the rule was declared
line_numberif non-ZERO, the line number where the rule was declared
var_namename of the variable whose value is printed
valuevalue to be printed

 detailed_trace_event()

virtual void mi::mdl::IRule_matcher_event::detailed_trace_event ( char const *  rule_set_name,
unsigned  rule_id,
char const *  rule_name,
char const *  file_name,
unsigned  line_number,
Detailed_trace_event  trace_event 
)
pure virtual

A detailed trace event has occurred.

The kind and message of the event are passed in via the trace_event parameter.

Parameters
rule_set_namethe name of the rule set
rule_idthe rule id
rule_namethe name of the rule that matched
file_nameif non-NULL, the file name where the rule was declared
line_numberif non-zero, the line number where the rule was declared
trace_eventthe traced event

 path_check_event()

virtual void mi::mdl::IRule_matcher_event::path_check_event ( char const *  rule_set_name,
char const *  dag_path 
)
pure virtual

A DAG path is checked against a rule set.

Parameters
rule_set_namethe name of the rule set
dag_paththe DAG path to a node that is currently checked

 postcondition_failed()

virtual void mi::mdl::IRule_matcher_event::postcondition_failed ( char const *  rule_set_name)
pure virtual

A postcondition has failed.

Parameters
rule_set_namethe name of the rule set

 postcondition_failed_path()

virtual void mi::mdl::IRule_matcher_event::postcondition_failed_path ( char const *  path)
pure virtual

A postcondition has failed for a given path.

Parameters
paththe path that failed

 rule_match_event()

virtual void mi::mdl::IRule_matcher_event::rule_match_event ( char const *  rule_set_name,
unsigned  rule_id,
char const *  rule_name,
char const *  file_name,
unsigned  line_number 
)
pure virtual

A rule has matched.

Parameters
rule_set_namethe name of the rule set
rule_idthe rule id
rule_namethe name of the rule that matched
file_nameif non-NULL, the file name where the rule was declared
line_numberif non-ZERO, the line number where the rule was declared