InDesign SDK  20.5
 All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
IPreflightVisitInfo Class Referenceabstract

#include <IPreflightVisitInfo.h>

Public Member Functions

virtual const IPreflightOptionsQueryOptions () const =0
 
virtual const PreflightObjectIDGetObjectID () const =0
 
virtual IPreflightObjectQueryObject () const =0
 
virtual IPreflightResultRecordCreateResultRecord ()=0
 

Detailed Description

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 } } }

Member Function Documentation

virtual IPreflightResultRecord* IPreflightVisitInfo::CreateResultRecord ()
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.

Returns
A refcounted results record.
virtual const PreflightObjectID& IPreflightVisitInfo::GetObjectID () const
pure virtual

Get the object you're visiting.

Returns
The preflight object ID of the object you're visiting.
virtual IPreflightObject* IPreflightVisitInfo::QueryObject () const
pure virtual

Get a preflight object interface for the object you're visiting. This produces the same results as IPreflightObjectModel::QueryObject(GetObjectID()) but

Returns
A refcounted preflight object interface pointer.
virtual const IPreflightOptions* IPreflightVisitInfo::QueryOptions () const
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.

Returns
A refcounted preflight options interface.