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

#include <IAsyncWorkProcessorFactory.h>

Inheritance diagram for IAsyncWorkProcessorFactory:
IPMUnknown

Public Types

enum  { kDefaultIID = IID_IASYNCWORKPROCESSORFACTORY }
 
enum  LoadModel { kComputationBound = 1, kExternalWait = 2, kMixed = 3 }
 

Public Member Functions

virtual bool IsThreadable () const =0
 
virtual LoadModel GetLoadModel () const =0
 
virtual uint32 GetMaximumInstances (uint32 nCPUCores) const =0
 
virtual AsyncWorkProcessorCreateProcessorInstance () const =0
 
- Public Member Functions inherited from IPMUnknown
virtual IPMUnknownQueryInterface (PMIID interfaceID) const =0
 
virtual void AddRef () const =0
 
virtual void Release () const =0
 

Detailed Description

this interface is on your factory boss that you register with the service registry

Member Function Documentation

virtual AsyncWorkProcessor* IAsyncWorkProcessorFactory::CreateProcessorInstance () const
pure virtual

Create an instance of your work processor that will subsequently be called to process packets. Note that is IsThreadable(), the thread context in which AsyncWorkProcessor::ProcessPacket() gets called may be different from call to call and also different than the creation thread context.

virtual LoadModel IAsyncWorkProcessorFactory::GetLoadModel () const
pure virtual
Returns
what type of work you do to help the architecture load balance
virtual uint32 IAsyncWorkProcessorFactory::GetMaximumInstances (uint32 nCPUCores) const
pure virtual
Returns
the maximum number of processor instances the architecture is ever allowed to create (or maybe it's just recommended). Not that if !IsThreadable(), this will be 1.
virtual bool IAsyncWorkProcessorFactory::IsThreadable () const
pure virtual
Returns
true if the underlying processor is thread safe, false otherwise