#include <XPRULE.H>
Inheritance diagram for xpRuleGeneric:
Public Member Functions | |
xpRuleGeneric (xpAgent *MyAgent=NULL) | |
xpRuleGeneric (const xpRuleGeneric &xr) | |
virtual void | AddStringToHistory (wxString H="") |
virtual void | CalculateValue (void) |
virtual xpRuleGeneric | Fire (void) |
virtual wxString | GetHistoryString (void) const |
virtual wxString | GetName (void) const |
virtual wxString | GetReasoning (void) |
virtual wxString | GetValueString (void) |
virtual wxString | GetValueString (const xbool V) const |
xpRuleGeneric & | operator= (xboolean &xb) |
xpRuleGeneric & | operator= (const xpRuleGeneric &xb) |
xpRuleGeneric | operator! (void) |
Static Public Member Functions | |
bool | GetShortcutMode (void) |
void | SetShortcutMode (bool M) |
Protected Attributes | |
wxString | HistoryString |
xpAgent * | Agent |
wxString | Name |
Friends | |
xpRuleGeneric | operator && (const xpRuleGeneric &xrL, const xpRuleGeneric &xrR) |
xpRuleGeneric | operator|| (const xpRuleGeneric &xrL, const xpRuleGeneric &xrR) |
The logical functionality of the generic rule class is identical with that of the xboolean class, inherited from it. In addition, it does make reasoning and does evaluate rules. This class implements also the generic inference engine functionality.
|
The default constructor. Save the source of information in xpRuleGeneric::Agent.
|
|
Copy constructor. Copies strings and info source from xr.
|
|
Contribute to history string. Use parameter H if not empty, otherwise the default is "Name" plus "HistoryString".
|
|
Calculate xpRuleGeneric::value anew via calling Fire(). Stores new value and updates history string.
Reimplemented from xboolean. |
|
Evaluates the rule (the logical expression, comprising rules). Called by CalculateValue().
Reimplemented in xrIsCarbonXPresent, xrIsCarbonAugerPresent, xrIsRutheniumPresent, xrHasCarbon1sPeak, xrIsCarbon1sPeak, xrDoesSampleContainCarbon, xrDoMarkCarbon1s, xrIsCarbonEnergySeparationOK, xrIsCarbonShirleyTailHigh, xrIsCarbonPostPeakSlopeBiggest, xrIsCarbonAngleRatioBiggest, xrIsCarbonContaminationConsensus, xrIsEnergyBE, xrIsEnergyKE, xrIsXEnergyKnown, xrIsEnergyAvailBE, xrIsEnergyAvailKE, xrIsRegionMeasuredBE, xrIsRegionMeasuredKE, xrIsPeakInRangeBE, xrIsPeakInRangeKE, xrHasPeakInRangeBE, and xrHasPeakInRangeKE. |
|
Return the history corresponding to the current value.
|
|
Return the name of the rule.
|
|
Return the rule history in reasoning form. Calls CalculateValue() to make a fresh copy of the value.
|
|
Return the evaluation mode: true if 'shortcut' else false
|
|
Return the parameter value V in string form.
|
|
Get and return the rule's value in string form
Reimplemented from xboolean. |
|
! (negation) operator.Also handles (default) reasoning.
Reimplemented from xboolean. |
|
= (assign) operator
|
|
= (assign) operator
|
|
Sets the evaluation mode to 'shortcut' or 'complete'
|
|
&& (logical AND) operator. Also handles (default) reasoning.
|
|
|| (logical OR) operator. Also handles (default) reasoning.
|
|
Back pointer to the agent.
|
|
The stored execution history string.
|
|
The rule identifying string.
|