![]() | InDesign SDK 20.5 |
#include <IPreflightRuleVisitor.h>

Public Types | |
| enum | { kDefaultIID = IID_IPREFLIGHTRULEVISITOR } |
Public Member Functions | |
| virtual PreflightObjectClassIDVector | GetClassesToVisit () const =0 |
| virtual void | Visit (IPreflightVisitInfo *iInfo)=0 |
| virtual void | AggregateResults (const IPreflightProcess *iProcess, const IPreflightProcess::NodeIDVector &resultNodes, IPreflightAggregatedResults *iResults, IPreflightAggregatedResults::NodeID parentID) const =0 |
| virtual void | UpdateRuleData ()=0 |
| virtual ErrorCode | ValidateRuleData (const IPreflightRuleData::Key &key, const ScriptData &proposedValue) const =0 |
Public Member Functions inherited from IPMUnknown | |
| virtual IPMUnknown * | QueryInterface (PMIID interfaceID) const =0 |
| virtual void | AddRef () const =0 |
| virtual void | Release () const =0 |
This is the single most important interface to understand if you're writing a rule. The IPreflightRuleVisitor interface is usually a nonpersistent interface that provides the dynamic model behavior for the rule. It sits on a rule boss created by your rule service along with the persistent data.
This is one of two interfaces that are typically implemented on a rule using something other than the standard implementations (more on the standard implementations below).
The methods in this interface are mostly for the inspection of objects and reporting and formatting of results, but a few utilities that require dynamic, rule-specific implementations also reside here. Namely UpdateRuleData().
The other dynamic, rule-specific interface on a rule boss is IPreflightRuleUI, which provides services for the presentation of rule parameters to the user in the profile editing dialog. Since we like to separate model and UI behaviors into separate plugins, IPreflightRuleUI is usually an Add-In implementation onto the rule boss in the UI plugin.
Other interfaces on the rule boss include:
| pure virtual |
Given a list of previously reported nodes in the process database, determine their presentation in the user interface (and reporting, which is why this is in the model interface and not in the rule UI interface).
| iProcess | The process from which you can get the "raw" results. |
| resultNodes | The vector of result nodes reported by your rule. |
| iResults | The aggregated results database to add nodes to. |
| parentID | The node in the results database under which you should add your result nodes. |
Implemented in PreflightFontRuleVisitor, and PreflightBlackOverprintRuleVisitor.
| pure virtual |
Return a vector of class IDs that you're interested in visiting.
Implemented in PreflightFontRuleVisitor, and PreflightBlackOverprintRuleVisitor.
| pure virtual |
This is called at startup for application-level rules and at document open time for document-level rules. It gives the plugin a chance to review the data in the rule and make any updates based on version changes.
Normally the rule data is stored as a key/value dictionary in IPreflightRuleData on the same boss.
Implemented in PreflightFontRuleVisitor, and PreflightBlackOverprintRuleVisitor.
| pure virtual |
This is called to check a parameter for the rule and should be called before setting the value. It validate the proposed value for the specified key and returns an error code indicating the error, ususally out of range or invalid paragtmers.
Normally the rule data is stored as a key/value dictionary in IPreflightRuleData on the same boss.
| key | is the data key. |
| proposedValue | is the value for the specified key to be validated. |
Implemented in PreflightFontRuleVisitor, and PreflightBlackOverprintRuleVisitor.
| pure virtual |
This method is called when it's time to visit an object whose class you said you were interested in via GetClassesToVisit.
| iInfo | An information and reporting structure. |
Implemented in PreflightFontRuleVisitor, and PreflightBlackOverprintRuleVisitor.