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

Public Types | |
| enum | { kDefaultIID = IID_IPREFLIGHTOBJECT } |
Public Member Functions | |
| virtual void | SetID (const PreflightObjectID &objID)=0 |
| virtual PreflightObjectID | GetID () const =0 |
| virtual IDataBase * | GetDataBase (bool forceIntoMemory=kFalse) const =0 |
| virtual IDocument * | QueryDocument (bool forceIntoMemory=kFalse) const =0 |
| virtual void | SetModelRef (const UIDRef &modelRef)=0 |
| virtual UIDRef | GetModelRef (bool forceIntoMemory=kFalse) 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 is used to access various bits of information for a preflight object referene. A preflight object is simply a reference to something in the preflight model; it could be a document, a spread, a page item, some text, part of an AGM artwork tree, whatever. The association between a PO and a 'physical' element that you can ask questions of is provided by a preflight object association service. That service provider will create one of these interfaces via the service manager, typically by passing it a string that contains a sort of URL to the object.
Typically you get one of these from the preflight manager, which given a class ID and object ID will ask the appropriate service to inflate one. Or you may get one passed into a method, such as when a rule is asked to evaluate a preflight object.
Bear in mind that this reference can only be used for very short periods of time – in particular, if the document changes in any way, you may be hosed. Realistically you shouldn't hold onto one of these.
Note that depending on the service provider, this interface could be boss-based or not. It might be an interface on a real UID-based object, or just a temporary data structure.
| pure virtual |
Get the database to which this object belongs.
| forceIntoMemory | IN If true, forces the document to be loaded if not in memory. If false, will return nil if the document isn't currently in memory. |
| pure virtual |
Get the object ID from which this interface was created.
| pure virtual |
Iff this object maps directly into an InDesign model object, get the related object's UIDRef. For example, a kPreflightOM_Document preflight object will return the UIDRef of the document. A kPreflightOM_ArtworkMark preflight object will always return a nil UIDRef because there is no corresponding object.
If this object doesn't map into an InDesign object, or does so only through a more complex mechanism, the object should provide an info interface which will provide a more explicit mapping.
| forceIntoMemory | IN If true, force the document to be loaded in order to satisfy the request. If false, will return UIDRef() if the document is not currently open. |
| pure virtual |
Get the document to which this object belongs.
| forceIntoMemory | IN If true, forces the document to be loaded if not in memory. If false, will return nil if the document isn't currently in memory. |
| pure virtual |
Set the object ID this interface is referring to.
| objID | IN The object ID. |