![]() | InDesign SDK 20.5 |
#include <IPreflightVisitInfo.h>
Public Member Functions | |
| virtual const IPreflightOptions * | QueryOptions () const =0 |
| virtual const PreflightObjectID & | GetObjectID () const =0 |
| virtual IPreflightObject * | QueryObject () const =0 |
| virtual IPreflightResultRecord * | CreateResultRecord ()=0 |
Provides context, information, and results feedback to a preflight rule visitor.
The only use this interface has in the API is as an argument to IPreflightRuleVisitor::Visit.
Typical application:
void MyRuleVisitor::Visit(IPreflightVisitInfo* iInfo)
{
InterfacePtr<IPreflightObject> iObj(iInfo->QueryObject());
if (iInfo->GetObjectID().GetClassID() == kPreflightOM_PageItem)
{
Query interfaces from iObj, and/or use iObj->GetModelRef()..
if (error condition detected)
{
InterfacePtr<IPreflightResultRecord> iRec(iInfo->CreateResultRecord());
iRec->SetCriteria(...);
etc } } }
| pure virtual |
Create a preflight result record. This is a result that corresponds to an error condition. You can record the parameters of the failure here; they are automatically persisted in the database and can be retrieved later at results aggregation time.
Note that the created record is owned by the PreflightVisitInfo object as part of its internal tables, so you wouldn't use the result to do arbitrary things with. If you need a preflight result record with a life cycle you manage yourself, use IPreflightAggregatedResultsUtils::CreatePreflightResultRecord.
| pure virtual |
Get the object you're visiting.
| pure virtual |
Get a preflight object interface for the object you're visiting. This produces the same results as IPreflightObjectModel::QueryObject(GetObjectID()) but
| pure virtual |
Get the preflight options. Most of the time you don't care about this, in the sense that the upstream object model implementation strips out objects you shouldn't "care about." But if you're doing your own object model walking then you may need to honor the settings.