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

#include <CScriptProvider.h>

Inheritance diagram for RepresentScriptProvider:
CScriptProviderCPMUnknown< IScriptProvider >IScriptProviderIPMUnknownBscMEScriptProviderBscShpScriptProviderCdlChartScriptProviderCdlStockScriptProviderCusDtLnkScriptProviderPstLstScriptProviderSingletonScriptProviderSnpRunnableScriptProvider

Protected Types

typedef CScriptProvider Inherited
 
- Protected Types inherited from CScriptProvider
typedef CPMUnknown
< IScriptProvider
Inherited
 

Protected Member Functions

 RepresentScriptProvider (IPMUnknown *boss)
 
virtual void GetObject (IScriptRequestData *data, IScript *parent)
 
virtual ErrorCode GetObjectByIndex (IScriptRequestData *data, IScript *parent)
 
virtual ErrorCode GetObjectByName (IScriptRequestData *data, IScript *parent)
 
virtual ErrorCode GetObjectByID (IScriptRequestData *data, IScript *parent)
 
virtual ErrorCode GetObjectByRange (IScriptRequestData *data, IScript *parent)
 
virtual ErrorCode GetObjectPrevious (IScriptRequestData *data, IScript *parent)
 
virtual ErrorCode GetObjectNext (IScriptRequestData *data, IScript *parent)
 
virtual ErrorCode GetObjectFirst (IScriptRequestData *data, IScript *parent)
 
virtual ErrorCode GetObjectLast (IScriptRequestData *data, IScript *parent)
 
virtual ErrorCode GetObjectMiddle (IScriptRequestData *data, IScript *parent)
 
virtual ErrorCode GetObjectAny (IScriptRequestData *data, IScript *parent)
 
virtual ErrorCode GetObjectAll (IScriptRequestData *data, IScript *parent)
 
virtual ErrorCode GetObjectWhose (IScriptRequestData *data, IScript *parent)
 
virtual ErrorCode HandleMethod (ScriptID methodID, IScriptRequestData *data, IScript *script)
 
virtual ErrorCode AccessProperty (ScriptID propID, IScriptRequestData *data, IScript *script)
 
virtual int32 GetNumObjects (const IScriptRequestData *data, IScript *parent)=0
 
virtual ErrorCode AppendNthObject (const IScriptRequestData *data, IScript *parent, int32 n, ScriptList &objectList)=0
 
virtual ErrorCode AppendAllObjects (const IScriptRequestData *data, IScript *parent, ScriptList &objectList)
 
virtual ErrorCode AppendObjectsWhose (const IScriptRequestData *data, IScript *parent, ScriptID propID, const ScriptData &propData, bool16 bFirstMatchOnly, ScriptList &objectList)
 
virtual int32 GetObjectIndex (const IScriptRequestData *data, IScript *parent, IScript *script)
 
virtual ErrorCode CountObjects (ScriptID methodID, IScriptRequestData *data, IScript *parent)
 
virtual ErrorCode AccessObject (ScriptID propID, IScriptRequestData *data, IScript *script)
 
virtual ErrorCode AccessID (ScriptID propID, IScriptRequestData *data, IScript *script)
 
virtual ErrorCode AccessIndex (ScriptID propID, IScriptRequestData *data, IScript *script)
 
virtual ErrorCode AccessLabel (ScriptID propID, IScriptRequestData *data, IScript *script)
 
virtual ErrorCode AccessClass (ScriptID propID, IScriptRequestData *data, IScript *script)
 
virtual ErrorCode AccessPropertiesProperty (ScriptID propID, IScriptRequestData *data, IScript *script)
 
virtual ErrorCode ExtractLabel (ScriptID methodID, IScriptRequestData *data, IScript *script)
 
virtual ErrorCode InsertLabel (ScriptID methodID, IScriptRequestData *data, IScript *script)
 
ErrorCode GetIndex (const IScriptRequestData *data, IScript *parent, const ScriptData &accessorData, int32 &index)
 
- Protected Member Functions inherited from CScriptProvider
 CScriptProvider (IPMUnknown *boss)
 
virtual void HandleMethodOnObjects (ScriptID methodID, IScriptRequestData *data, const ScriptList &scriptList)
 
virtual void AccessPropertyOnObjects (ScriptID propID, IScriptRequestData *data, const ScriptList &scriptList)
 
virtual void AccessProperties (IScriptRequestData *data, IScript *script)
 
virtual ErrorCode PreAccessProperty (ScriptID propID, IScriptRequestData *data, IScript *script)
 
virtual ErrorCode PostAccessProperty (ScriptID propID, IScriptRequestData *data, IScript *script)
 
virtual ErrorCode PreAccessProperties (IScriptRequestData *data, IScript *script)
 
virtual ErrorCode PostAccessProperties (IScriptRequestData *data, IScript *script)
 
virtual ErrorCode AccessParent (ScriptID propID, IScriptRequestData *data, IScript *script)
 
- Protected Member Functions inherited from CPMUnknown< IScriptProvider >
 CPMUnknown (IPMUnknown *boss)
 

Additional Inherited Members

- Public Types inherited from IScriptProvider
enum  { kDefaultIID = IID_ISCRIPTPROVIDER }
 
- Public Member Functions inherited from CPMUnknown< IScriptProvider >
IPMUnknownQueryInterface (PMIID interfaceID) const
 
void AddRef () const
 
void Release () const
 
void PreDirty (ImplementationID prop=kInvalidImpl, bool16 allowModification=kTrue)
 
void PreDirtyNoMessage (ImplementationID prop=kInvalidImpl, bool16 allowModification=kTrue)
 
 CPMUnknown (const CPMUnknown &)=delete
 
CPMUnknownoperator= (const CPMUnknown &)=delete
 
- Protected Attributes inherited from CPMUnknown< IScriptProvider >
HelperInterface fHelperInterface
 

Detailed Description

A base class for script providers that represent objects.

Member Function Documentation

virtual ErrorCode RepresentScriptProvider::AccessObject (ScriptID propID,
IScriptRequestDatadata,
IScriptscript 
)
protectedvirtual

Access the specified property using the provided data for the target object. Most subclasses will not need to override these methods.

Parameters
propIDis the request ID
datais the request data. If the return value is kSuccess, the implementation must call AppendReturnData before returning. If the return value is not kSuccess, the implementation should not call AppendReturnData.
scriptis the target object
Returns
kSuccess or an error code
virtual ErrorCode RepresentScriptProvider::AccessProperty (ScriptID propID,
IScriptRequestDatadata,
IScriptscript 
)
protectedvirtual

Access the specified property using the provided data for the target object. Most subclasses will override this method.

Parameters
propIDis the request ID
datais the request data. If the return value is kSuccess, the implementation must call AppendReturnData before returning. If the return value is not kSuccess, the implementation should not call AppendReturnData.
scriptis the target object
Returns
kSuccess or an error code

Reimplemented from CScriptProvider.

Reimplemented in PrefsScriptProvider, BscMEScriptProvider, SnipRunScriptProvider, CusDtLnkScriptProvider, BscShpScriptProvider, FrmLblPrefsScriptProvider, CdlChartScriptProvider, PstLstScriptProvider, SnapPrefsScriptProvider, SingletonScriptProvider, SnpRunnableScriptProvider, BPIPrefsScriptProvider, PrnSelScriptProvider, TranFxScriptProvider, PnlTrvScriptProvider, XDocBkPrefsScriptProvider, CdlStockScriptProvider, and CusDtLnkOptionScriptProvider.

virtual ErrorCode RepresentScriptProvider::AppendAllObjects (const IScriptRequestDatadata,
IScriptparent,
ScriptList & objectList 
)
protectedvirtual

Append all of the child objects, as specified by the data, that are contained in the parent object. Some subclasses may want to override this method for performance reasons.

Parameters
datais the request data
parentis the parent object
objectList- the child objects should be appended to this list. The number of objects appended must equal the value returned by calling GetNumObjects on the same implementation with the same parameters.
Returns
kSuccess or an error code. Only return an error code to indicate an exception. If the number of child objects is zero, return kSuccess.

Reimplemented in PrefsScriptProvider, BscShpScriptProvider, CdlChartScriptProvider, and CusDtLnkScriptProvider.

virtual ErrorCode RepresentScriptProvider::AppendNthObject (const IScriptRequestDatadata,
IScriptparent,
int32 n,
ScriptList & objectList 
)
protectedpure virtual

Append the nth child object, as specified by the data, that is contained in the parent object. All subclasses must override this method.

Parameters
datais the request data
parentis the parent object
nis the index of the child
objectList- the child object should be appended to this list
Returns
kSuccess or an error code

Implemented in PrefsScriptProvider, BscMEScriptProvider, BscShpScriptProvider, CdlChartScriptProvider, CusDtLnkScriptProvider, PstLstScriptProvider, SnpRunnableScriptProvider, SingletonScriptProvider, and CdlStockScriptProvider.

virtual ErrorCode RepresentScriptProvider::AppendObjectsWhose (const IScriptRequestDatadata,
IScriptparent,
ScriptID propID,
const ScriptDatapropData,
bool16 bFirstMatchOnly,
ScriptList & objectList 
)
protectedvirtual

Obtain a list of child objects, as specified by the data and the whose value for the specified property matches the specified value, that are contained in the parent object. Most subclasses will not need to override this method.

Parameters
datais the request data
parentis the parent object
propIDis the property on the child object to match
propDatais the value on the child object to match
bFirstMatchOnlyindicates whether to return only the first matching child or all matching children
objectList- the child objects should be appended to this list
Returns
kSuccess or an error code. Only return an error code to indicate an exception. If the number of matching child objects is zero, return kSuccess.
virtual ErrorCode RepresentScriptProvider::CountObjects (ScriptID methodID,
IScriptRequestDatadata,
IScriptparent 
)
protectedvirtual

Get the number of child objects, as specified by the data, that are contained in the parent object. Most subclasses will not need to override this method.

Parameters
methodIDis the request ID
datais the request data. If the return value is kSuccess, the implementation must call AppendReturnData before returning. If the return value is not kSuccess, the implementation should not call AppendReturnData.
parentis the parent object
Returns
kSuccess or an error code
virtual ErrorCode RepresentScriptProvider::ExtractLabel (ScriptID methodID,
IScriptRequestDatadata,
IScriptscript 
)
protectedvirtual

Handle the specified method using the provided data for the target object. Most subclasses will not need to override this method.

Parameters
methodIDis the request ID
datais the request data. If the return value is kSuccess, the implementation must call AppendReturnData before returning. If the return value is not kSuccess, the implementation should not call AppendReturnData.
scriptis the target object
Returns
kSuccess or an error code
ErrorCode RepresentScriptProvider::GetIndex (const IScriptRequestDatadata,
IScriptparent,
const ScriptDataaccessorData,
int32 & index 
)
protected

A utility to extract an index from accessor data supplied for a GetObject request.

Parameters
datais the request data
parentis the parent object
accessorDatais the client-supplied accessor data from which to extract an index
indexis used to return the result
Returns
kSuccess or an error code
virtual int32 RepresentScriptProvider::GetNumObjects (const IScriptRequestDatadata,
IScriptparent 
)
protectedpure virtual

Get the number of child objects, as specified by the data, that are contained in the parent object. All subclasses must override this method.

Parameters
datais the request data
parentis the parent object
Returns
the number of child objects

Implemented in PrefsScriptProvider, BscMEScriptProvider, BscShpScriptProvider, CusDtLnkScriptProvider, CdlChartScriptProvider, PstLstScriptProvider, SnpRunnableScriptProvider, CdlStockScriptProvider, and SingletonScriptProvider.

virtual void RepresentScriptProvider::GetObject (IScriptRequestDatadata,
IScriptparent 
)
protectedvirtual

Obtain a list of child objects, as specified by the data, that are contained in the parent object. Most subclasses will not need to override this method.

Parameters
datais the request data. The implementation must call AppendReturnData before returning.
parentis the parent object

Reimplemented from CScriptProvider.

Reimplemented in SingletonScriptProvider.

virtual ErrorCode RepresentScriptProvider::GetObjectByIndex (IScriptRequestDatadata,
IScriptparent 
)
protectedvirtual

Obtain a list of child objects, as specified by the data, that are contained in the parent object. Most subclasses will not need to override these methods.

Parameters
datais the request data. If the return value is kSuccess, the implementation must call AppendReturnData before returning. If the return value is not kSuccess, the implementation should not call AppendReturnData.
parentis the parent object
Returns
kSuccess or an error code
virtual int32 RepresentScriptProvider::GetObjectIndex (const IScriptRequestDatadata,
IScriptparent,
IScriptscript 
)
protectedvirtual

Return the index of the child object within the list of such child objects that are contained in the parent object. Most subclasses will not need to override this method.

Parameters
datais the request data
parentis the parent object
scriptis the child object
Returns
the index of the child within all children of the same type on the parent, or -1 if not found
virtual ErrorCode RepresentScriptProvider::HandleMethod (ScriptID methodID,
IScriptRequestDatadata,
IScriptscript 
)
protectedvirtual

Handle the specified method using the provided data for the target object. Most subclasses will override this method.

Parameters
methodIDis the request ID
datais the request data. If the return value is kSuccess, the implementation must call AppendReturnData before returning. If the return value is not kSuccess, the implementation should not call AppendReturnData.
scriptis the target object
Returns
kSuccess or an error code

Reimplemented from CScriptProvider.

Reimplemented in BscMEScriptProvider, CusDtLnkScriptProvider, SnipRunScriptProvider, BscShpScriptProvider, FrmLblPrefsScriptProvider, CdlChartScriptProvider, PstLstScriptProvider, SnpRunnableScriptProvider, and CdlStockScriptProvider.

virtual ErrorCode RepresentScriptProvider::InsertLabel (ScriptID methodID,
IScriptRequestDatadata,
IScriptscript 
)
protectedvirtual

Handle the specified method using the provided data for the target object. Most subclasses will not need to override this method.

Parameters
methodIDis the request ID
datais the request data. The implementation should not call AppendReturnData.
scriptis the target object
Returns
kSuccess or an error code