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

Public Types | |
| enum | { kDefaultIID = IID_IPREFLIGHTPROCESS } |
| enum | OperatingState { kNothingToDo, kInitializing, kWaitingForComposition, kExpandingTree, kVisitingTree, kResultsComplete } |
| enum | PauseState { kRunning = 0, kDocumentClosed, kUserPaused } |
| enum | PriorityType { kInactive, kLowPriority, kHighPriority } |
| enum | NodeType { kInvalidNodeType, kRoot, kObject, kResult, kDirectory } |
| enum | LinkType { kInvalidLinkType, kOwnership, kReference, kTemporary } |
| typedef uint32 | NodeID |
| typedef K2Vector< NodeID > | NodeIDVector |
| typedef uint32 | LinkID |
Public Member Functions | |
| virtual uint32 | GetUniqueID () const =0 |
| virtual void | SetUniqueID (uint32 id)=0 |
| virtual uint32 | GetTimeStamp () const =0 |
| virtual ClassID | GetSelector () const =0 |
| virtual void | SetSelector (ClassID selID)=0 |
| virtual PreflightDocumentID | GetDocumentID () const =0 |
| virtual void | SetDocumentID (const PreflightDocumentID &newDocID)=0 |
| virtual void | SetIsBookProcess (bool newState)=0 |
| virtual bool | IsBookProcess () const =0 |
| virtual bool | GetAutoDelete () const =0 |
| virtual void | SetAutoDelete (bool newState)=0 |
| virtual void | Clear ()=0 |
| virtual void | SetOptions (const IPreflightOptions *iOptions)=0 |
| virtual const IPreflightOptions * | QueryOptions () const =0 |
| virtual const IPreflightProfile * | QueryProfile () const =0 |
| virtual void | SetProfile (IPreflightProfile *iProfile)=0 |
| virtual OperatingState | GetState () const =0 |
| virtual PauseState | GetPaused () const =0 |
| virtual void | SetPaused (PauseState newState)=0 |
| virtual bool | IsActive () const =0 |
| virtual PriorityType | GetPriority () const =0 |
| virtual void | AdvanceState (IdleTimer *timer, bool synchronous)=0 |
| virtual IPreflightAggregatedResults * | CreateAggregatedResults () const =0 |
| virtual NodeID | GetRootNode () const =0 |
| virtual NodeID | GetRootObjectNode () const =0 |
| virtual NodeType | GetNodeType (NodeID node) const =0 |
| virtual LinkType | GetLinkType (LinkID link) const =0 |
| virtual void | GetParentNodes (NodeID node, NodeIDVector &parents) const =0 |
| virtual void | GetChildNodes (NodeID node, NodeIDVector &children) const =0 |
| virtual LinkID | GetFirstParentLink (NodeID node) const =0 |
| virtual LinkID | GetNextParentLink (LinkID link) const =0 |
| virtual LinkID | GetFirstChildLink (NodeID node) const =0 |
| virtual LinkID | GetNextChildLink (LinkID link) const =0 |
| virtual NodeID | GetLinkParentNode (LinkID link) const =0 |
| virtual NodeID | GetLinkChildNode (LinkID link) const =0 |
| virtual void | GetObjectNodeObjectID (NodeID node, PreflightObjectID &objID) const =0 |
| virtual void | GetResultNodes (NodeIDVector &results) const =0 |
| virtual PreflightRuleID | GetResultNodeRuleID (NodeID resultNode) const =0 |
| virtual IPreflightResultRecordTable * | QueryResultNodeTable (NodeID resultNode) const =0 |
| virtual void | InvalidateObject (const PreflightObjectID &objID)=0 |
| virtual void | InvalidateDocument ()=0 |
| virtual void | OnSettingsChange (const IPreflightSettingsChangeInfo *iInfo)=0 |
| virtual PMString | GetDescription () const =0 |
| virtual PMString | GetResults () const =0 |
| virtual PMString | GetInventory () 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 interface sits on a preflight process boss and tracks the status of a particular preflight operation (either the background process we use in the UI or a synchronous one you create yourself via IPreflightProcessManager).
In addition to the state/status, it also maintains a database of raw results. This database tracks not only the results but the entire preflight DOM used for the process. Normally you don't inspect the raw results directly (though you can) but rather use the aggregated results, which are a prettified version with user-facing strings and organization.
You normally get this interface from IPreflightProcessManager. To find the processes for a given document, for example, use IPreflightProcessManager::GetProcessesForDocument or use IPreflightUtils::QueryProcessForDocument() if you want the process for the document that the preflight UI is using.
| typedef uint32 IPreflightProcess::LinkID |
Links are a parent-child data structure that also maintain next- and prev- of same parent node, and next- and prev- of same child node. Ie an arbitrary graph of nodes. Each link also has a type (ownership vs reference).
| typedef uint32 IPreflightProcess::NodeID |
Nodes in the database. Zero means invalid.
A vector of node IDs, used for various "get all of X" methods.
This enum identifies the link type.
This enum identifies the node category. Depending on the category you can ask different questions.
States a process can be in at any point in time (see GetState()).
Processes can have differing priorities depending on their state. See GetPriority().
| pure virtual |
Give a time slice to do some work.
| timer | IN The timer which tells the process how much time it can use. Can be nil, indicating the process should work synchronously. |
| synchronous | IN Set this to true if you are calling this in a tight loop where (for example) the text composer will not be given any time to work; otherwise the process will never (or only extremely slowly) complete. When true, text composition will be forced synchronously prior to preflight expansion and visitation. Set this parameter to false if you're calling it from an idle loop where the text composer has a chance to operate efficiently. |
| pure virtual |
Clear all tasks, the database, everything.
| pure virtual |
Create an aggregated version of the results. This is the version that drives the UI, and rules are given the opportunity to condense all results into an "aggregated" form.
| pure virtual |
Get the auto-delete property. If true the process will be deleted automatically if the document (or book, if the process is associated with a book) is closed. If false, the process is not automatically deleted.
| pure virtual |
Get all the child nodes of a given node.
| node | IN The node for which you want the children. |
| parents | OUT Receives the list of child nodes. |
| pure virtual |
This is for debugging purposes.
| pure virtual |
Get the first child link of a given node.
| node | IN The node you want the first child of. |
Get the first parent link of a given node (note that nodes can have multiple parents). Once you have the link you can look "up" to the parent node, or "over" to the next parent.
| node | IN The child node whose first parent you want. |
| pure virtual |
This is for debugging purposes.
Given a parent-child link, get the child node.
| link | IN The link you want the child node for. |
Given a parent-child link, get the parent node.
| link | IN The link you want the parent node for. |
Given a link, get its type.
| link | IN THe link you're interested in. |
Get the next child link (ie same parent, a different child).
| link | IN The 'current' link, the one you want the next sibling of. |
Get the next parent link of the same child node.
| node | IN The current parent link. |
Given a node, get its type.
| node | IN THe node you're interested in. |
| pure virtual |
For object nodes, get the preflight object ID.
| node | IN The object node you're interested in. |
| objID | OUT Receives the object ID, or an invalid ID if the node isn't valid, or isn't an object node. |
| pure virtual |
Get all the parent nodes of a given node.
| node | IN The node for which you want the parents. |
| parents | OUT Receives the list of parent nodes. |
| pure virtual |
Gets whether the process is paused, and if so, why.
| pure virtual |
Checks the current state and returns a performance priority.
| pure virtual |
For a given result node ID, obtain the rule ID of that node.
| pure virtual |
Obtains a vector of all results nodes.
| results | OUT Receives the vector of result node IDs. |
| pure virtual |
This is for debugging purposes.
| pure virtual |
Get the root node in the database – note that this is NOT the same as the root object node! The root node is a logical root, whereas the root object (ie, the document object) sits under the root. Remember, the database contains more than just object nodes.
| pure virtual |
Get the root OBJECT node in the database – note that this is NOT the same as the root node! The root node is a logical root, whereas the root object (ie, the document object) sits under the root. Remember, the database contains more than just object nodes.
| pure virtual |
Gets the selector ID for the process. This is simply a way of tagging the owner of the process so the owner can find it later. For example preflight uses the kPreflightContinuousProcessSelectorID selector to indicate the current continous (background) preflighting process, as opposed to some ad-hoc process it might create for other reasons.
Note that this is purely a tagging mechanism. The process doesn't do anything with the selector ID except store it.
| pure virtual |
Get the current state of the process.
| pure virtual |
Returns the modification 'time stamp' – not really a time at all, but a change number that indicates whether the state of the database is the same as the last time you checked. Every time there's a change this number is bumped by one.
| pure virtual |
Get the unique ID of this process. This number is generated automatically by the process manager in all cases where the process is created via the manager.
| pure virtual |
Invalidate the root document object. This clears out the document tree and forces a complete rebuild of all results. Same result as if you got the document object ID and called InvalidateObject.
| pure virtual |
Invalidate the specified object in the process (if that object exists). This clips the subtree below the node and adds the node to the expansion and visitation list.
| objID | IN The object to invalidate. |
| pure virtual |
Same as checking for state != kResultsComplete && state != kNothingToDo && paused == kRunning.
| pure virtual |
Get whether there are books associated with this process.
| pure virtual |
Called on a process via the process manager (usually) to indicate that settings may have changed for the given database. (Profile change, deleted profile, options, etc.) Process needs to double-check settings and/or invalidate as appropriate.
| iInfo | IN The event information to respond to. |
| pure virtual |
Query the current options. Note that you can't modify these options, just look at them.
| pure virtual |
Get the profile used for this preflight process. Const because it may come from someplace that wouldn't want it to be modified.
| pure virtual |
For a given result node ID, obtain the table of recorded results.
| pure virtual |
Set the auto-delete property. If true the process will be deleted automatically if the document (or book, if the process is associated with a book) is closed. If false, the process is not automatically deleted.
| newState | IN The new auto-delete state. |
| pure virtual |
Set the document this preflight is associated with. This is typically done only when the process is first created. Note that this does NOT use IDocument because the life cycle of the process may or may not correspond to the open document.
| newDocID | IN The new document ID. |
| pure virtual |
Set whether there are books associated with this process. That is, this process's results are used (either actively or not, in the case of a closed document) to provide the current preflight errors for a document associated with a book. Note that a process can in theory be associated with more than one book (if it happens to match multiple books' settings). Also, note that this boolean doesn't mean that it isn't the active preflight for a document as well. The impetus for this flag is that when a process is associated with a book and the document is closed, the process is not automatically destroyed.
| newState | IN kTrue if the process is book-affiliated; kFalse otherwise. |
| pure virtual |
Set the options to use for this process. This method makes a COPY of the options.
| iOptions | IN The options. Can't be nil. A copy is made so refcount is unchanged. |
| pure virtual |
Sets whether the process is paused, and if so, why.
| newState | The new paused state. |
| pure virtual |
Set the profile used for this preflight process. This references the profile, unless the profile is one associated with a document (as opposed to the application), in which case a copy of the profile is made so that the process (and all its associated data) can still live with the document closed. (This is needed for book preflight, for example.)
| iProfile | IN The profile to use. |
| pure virtual |
Sets the selector ID for the process.
| selID | IN The new selector ID. |
| pure virtual |
Set the unique ID of the process. This should not be called for any process that is created by the process manager, as changing it will affect all kinds of caches.
| id | IN The new unique ID. |