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

#include <IExecutionContext.h>

Public Member Functions

virtual ~IExecutionContext ()
 
virtual ISessionGetSession () const =0
 
virtual IErrorStateGetErrorState () const =0
 
virtual IObjectModelGetObjectModel () const =0
 
virtual IDTask * GetCurrentTask () const =0
 

Detailed Description

The execution context wraps together necessary components for the execution of threads. All threads in a thread domain share the same execution context (they are not preemptive against each other so they can share an EC).

An IExecutionContext ptr is NOT a reference to a standard boss object. It is a virtual C++ class, but does not inherit from IPMUnknown. IExecutionContext member function GetSession() replaces gSession global object. This was necessary because of the added support for multi-threading.

Constructor & Destructor Documentation

virtual IExecutionContext::~IExecutionContext ()
inlinevirtual

Destructor of the execution context.

Member Function Documentation

virtual IDTask* IExecutionContext::GetCurrentTask () const
pure virtual

Returns the task information for the current task that uses this execution context. The pointer is valid only in the current execution context and should not be stored.

virtual IErrorState* IExecutionContext::GetErrorState () const
pure virtual

Retrieves the current error state for the calling thread. Each thread keeps its own "global" error code (it is a thread specific variable).

virtual IObjectModel* IExecutionContext::GetObjectModel () const
pure virtual

Returns a non addref-ed pointer to the IObjectModel instance for the current thread.

virtual ISession* IExecutionContext::GetSession () const
pure virtual

Returns a non addref-ed pointer to the ISession instance for the current thread.