Main Page | Modules | Namespace List | Class Hierarchy | Class List | Directories | File List | Namespace Members | Class Members | File Members | Related Pages

CP_ScriptableObject_Property Class Reference
[AppleEvents]

A CP_ScriptableObject_Imp class to handle properties of objects. More...

Inheritance diagram for CP_ScriptableObject_Property:

CP_ScriptableObject_Imp CP_NoCopy List of all members.

Containers

CP_ScriptableObject_ImpGetSuperScriptableObject () const
virtual void SetSuperScriptableObject (CP_ScriptableObject_Imp *inSuperScriptableObject)
CP_ScriptableObject_ImpGetDefaultSubScriptableObject () const
void SetDefaultSubScriptableObject (CP_ScriptableObject_Imp *inObject)
CP_ScriptableObject_ImpGetDefaultSuperScriptableObject () const
void SetDefaultSuperScriptableObject (CP_ScriptableObject_Imp *inObject)
static void SetDefaultObject (CP_ScriptableObject_Imp *inDefaultObject)
static CP_ScriptableObject_ImpGetDefaultObject ()
static CP_ScriptableObject_ImpGetScriptableObjectFromToken (const AEDesc &inToken)

Property

CP_ScriptableObject_ImpGetScriptableObjectProperty (DescType inProperty) const
virtual void DoAE_GetData (const DescType inPropertyType, const AEDesc &inValue, AppleEvent &inOutReply)
virtual void DoAE_SetData (const DescType inPropertyType, const AEDesc &inValue, AppleEvent &inOutReply)

AppleEventHandlers

virtual void DoAE_Activate (const AppleEvent &inEvent, AppleEvent &inOutReply)
virtual void DoAE_Clone (const AppleEvent &inEvent, AppleEvent &inOutReply)
virtual void DoAE_Close (const AppleEvent &inEvent, AppleEvent &inOutReply)
virtual void DoAE_Delete (const AppleEvent &inEvent, AppleEvent &inOutReply)
virtual void DoAE_DoObjectsExist (const AppleEvent &inEvent, AppleEvent &inOutReply)
virtual void DoAE_Move (const AppleEvent &inEvent, AppleEvent &inOutReply)
virtual void DoAE_Open (const AppleEvent &inEvent, AppleEvent &inOutReply)
virtual void DoAE_Print (const AppleEvent &inEvent, AppleEvent &inOutReply)
virtual void DoAE_Save (const AppleEvent &inEvent, AppleEvent &inOutReply)
virtual void DoAE_Revert (const AppleEvent &inEvent, AppleEvent &inOutReply)

Public Member Functions

Constructor / Destructor
 CP_ScriptableObject_Property (CP_ScriptableObject_Imp *inContainer, const DescType inPropertyType)
 Constructor.
virtual ~CP_ScriptableObject_Property () throw ()
 Destructor.
Getters
virtual DescType GetAppleClass () const
virtual DescType GetPropertyType () const
Events
virtual void HandleAppleEventSelf (const AppleEvent &inEvent, AppleEvent &inOutReply, SInt32 inRefCon)
Data
virtual void DoGetData (const AppleEvent &inEvent, AppleEvent &inOutReply)
virtual void DoSetData (const AppleEvent &inEvent, AppleEvent &inOutReply)
virtual void SendAE_SetData (const DescType inDataType, Ptr inDataPtr, Size inDataSize, bool inDoExecute)

Protected Member Functions

Specifier
virtual void MakeSelfSpecifier (AEDesc &inContainerSpec, AEDesc &inOutSelfSpec)

Protected Attributes

DescType fAppleClassType
DescType fPropertyType
CP_AppleEventHandler_Map fEventHandlers
CP_ScriptableObject_ImpfSuperScriptableObject
CP_ScriptableObject_ImpfDefaultSubScriptableObject
CP_ScriptableObject_ImpfDefaultSuperScriptableObject

Static Protected Attributes

static CP_ScriptableObject_ImpgDefaultObject = NULL
static bool gInited = false

Detailed Description


Constructor & Destructor Documentation

CPLAT_Begin_Namespace_CPLAT CP_ScriptableObject_Property::CP_ScriptableObject_Property CP_ScriptableObject_Imp inContainer,
const DescType  inPropertyType
 

Constructor.

Parameters:
inContainer Container object for the property we are interested in.
inPropertyType DescType containing the type of property desired.
Exceptions:
none 

CP_ScriptableObject_Property::~CP_ScriptableObject_Property  )  throw () [virtual]
 

Destructor.

Exceptions:
none 


Member Function Documentation

DescType CP_ScriptableObject_Property::GetAppleClass  )  const [virtual]
 

Return a DescType describing the type of class we are.

Exceptions:
none 
Returns:
DescType const The AppleEvent class of this object.

Implements CP_ScriptableObject_Imp.

virtual DescType CP_ScriptableObject_Property::GetPropertyType  )  const [virtual]
 

void CP_ScriptableObject_Property::HandleAppleEventSelf const AppleEvent &  inEvent,
AppleEvent &  inOutReply,
SInt32  inRefCon
[virtual]
 

Handle the passed in Apple Event.

Parameters:
inEvent The AppleEvent object that contains
inOutReply The AppleEvent object that we place the reply in.
inRefCon User data.
Exceptions:
none 
Returns:
void

Reimplemented from CP_ScriptableObject_Imp.

void CP_ScriptableObject_Property::DoGetData const AppleEvent &  inEvent,
AppleEvent &  inOutReply
[virtual]
 

Handle a get data Apple Event.

Parameters:
inEvent The AppleEvent object that contains the data.
inOutReply The AppleEvent object that we place the reply in.
Exceptions:
none 
Returns:
void

void CP_ScriptableObject_Property::DoSetData const AppleEvent &  inEvent,
AppleEvent &  inOutReply
[virtual]
 

Handle a set data Apple Event.

Parameters:
inEvent The AppleEvent object that contains the data.
inOutReply The AppleEvent object that we place the reply in.
Exceptions:
none 
Returns:
void

void CP_ScriptableObject_Property::SendAE_SetData const DescType  inDataType,
Ptr  inDataPtr,
Size  inDataSize,
bool  inDoExecute
[virtual]
 

Send a set data AppleEvent to ourselves.

Parameters:
inDataType A DescType describing the data type.
inDataPtr Points to the data we are sending.
inDataSize The size of the data pointed to by inDataPtr.
inDoExecute If true, the event is also executed, if false the event is just for recording purposes.
Exceptions:
none 
Returns:
void

void CP_ScriptableObject_Property::MakeSelfSpecifier AEDesc &  inContainerSpec,
AEDesc &  inOutSelfSpec
[protected, virtual]
 

Make a self specifier for this property.

Parameters:
inContainerSpec AEDesc containing the container for this property.
inOutSelfSpec Object that the result will be returned in.
Exceptions:
none 
Returns:
void

Reimplemented from CP_ScriptableObject_Imp.

void CP_ScriptableObject_Imp::HandleAppleEvent const AppleEvent &  inEvent,
AppleEvent &  outAEReply,
AEDesc &  outResult,
SInt32  inRefCon
[virtual, inherited]
 

Handles AppleEvents for this object and any sub scriptable objects that this object might contain.

Parameters:
inEvent The AppleEvent being handled.
inOutReply The AppleEvent to place any reply into.
outReply Location to put a reply into.
inRefCon The eventID passed from the AppleEvent manager when the event handler was registered.
Exceptions:
OSErrorExceptions 
Returns:
void

void CP_ScriptableObject_Imp::SetDefaultObject CP_ScriptableObject_Imp inDefaultObject  )  [static, inherited]
 

Set the default object. This is the object that subsequent events will use when they refer to the default object.

Parameters:
inDefaultObject The CP_ScriptableObject_Imp that is to become the default object.
Exceptions:
none 
Returns:
void

static CP_ScriptableObject_Imp* CP_ScriptableObject_Imp::GetDefaultObject  )  [static, inherited]
 

CP_ScriptableObject_Imp * CP_ScriptableObject_Imp::GetScriptableObjectFromToken const AEDesc &  inToken  )  [static, inherited]
 

Gets the scriptable object that an event corresponds to, by extracting our CP_ModelToken from the descriptor.

Parameters:
inToken The AEDesc that contains the token for the scriptable object we are trying to get.
Exceptions:
OSErrorExceptions 
Returns:
void

CP_ScriptableObject_Imp* CP_ScriptableObject_Imp::GetSuperScriptableObject  )  const [inherited]
 

virtual void CP_ScriptableObject_Imp::SetSuperScriptableObject CP_ScriptableObject_Imp inSuperScriptableObject  )  [virtual, inherited]
 

CP_ScriptableObject_Imp* CP_ScriptableObject_Imp::GetDefaultSubScriptableObject  )  const [inherited]
 

void CP_ScriptableObject_Imp::SetDefaultSubScriptableObject CP_ScriptableObject_Imp inObject  )  [inherited]
 

CP_ScriptableObject_Imp* CP_ScriptableObject_Imp::GetDefaultSuperScriptableObject  )  const [inherited]
 

void CP_ScriptableObject_Imp::SetDefaultSuperScriptableObject CP_ScriptableObject_Imp inObject  )  [inherited]
 

bool CP_ScriptableObject_Imp::CompareObjects const DescType  inOperation,
const CP_ScriptableObject_Imp toWhat
[virtual, inherited]
 

Compare Apple Event objects. This method returns false, and subclasses need to override it.

Parameters:
inOperation A DescType describing the type of comparison operation to be performed.
toWhat The CP_ScriptableObject_Imp we are comparing against.
Exceptions:
none 
Returns:
bool The result of the comparison.

SInt32 CP_ScriptableObject_Imp::CountContainedObjects const DescType  inType  )  [virtual, inherited]
 

Return a count of the objects of inType contained in ourselves. This needs to be overriden, this method just returns 0.

Parameters:
inType Not used
Exceptions:
none 
Returns:
SInt32 The number of contained objects.

Reimplemented in CP_Document_Base, and CP_Application_Imp.

void CP_ScriptableObject_Imp::GetContainedObject const DescType  inDesiredClass,
const DescType  inForm,
const AEDesc &  inSelectionData,
AEDesc &  outToken
[virtual, inherited]
 

Return the object contained in the passed in container based upon the inForm criteria.

Parameters:
inDesiredClass A DescType describing the class we are looking for.
inForm a DescType describing the form.
inSelectionData AEDesc with the selection data.
inNeedsDisposal Flag to indicate if we should dispose dispose of objects.
Exceptions:
none 
Returns:
void

CP_ScriptableObject_Imp * CP_ScriptableObject_Imp::GetContainedObjectByName const DescType  inDesiredClass,
const CP_String inName
[virtual, inherited]
 

Return the object contained in ourselves based on the name passed in. Subclasses need to override this function. This routine just returns NULL.

Parameters:
inDesiredClass A DescType for the class we are looking for.
inName The name we are looking for.
Exceptions:
none 
Returns:
CP_ScriptableObject_Imp * The contained object.

Reimplemented in CP_Document_Base, and CP_Application_Imp.

CP_ScriptableObject_Imp * CP_ScriptableObject_Imp::GetContainedObjectByPosition DescType  inDesiredClass,
SInt32  inPosition
[virtual, inherited]
 

Return the object contained in ourselves based on the position passed in. Subclasses need to override this function. This routine just returns NULL.

Parameters:
inDesiredClass A DescType for the class we are looking for.
inPosition The position of the object we are looking for.
Exceptions:
none 
Returns:
CP_ScriptableObject_Imp * The contained object.

Reimplemented in CP_Document_Base, and CP_Application_Imp.

CP_ScriptableObject_Imp * CP_ScriptableObject_Imp::GetContainedObjectByUniqueID DescType  inDesiredClass,
SInt32  inID
[virtual, inherited]
 

Return the object contained in ourselves based on the unique ID passed in. Subclasses need to override this function. This routine just returns NULL.

Parameters:
inDesiredClass A DescType for the class we are looking for.
inUniqueID The unique id to identify the object.
Exceptions:
none 
Returns:
CP_ScriptableObject_Imp * The contained object.

CP_ScriptableObject_Imp * CP_ScriptableObject_Imp::GetContainedObjectByRelativePosition DescType  inDesiredClass,
SInt32  inPosition
[virtual, inherited]
 

Return the object contained in ourselves based on the position passed in. Subclasses need to override this function. This routine just returns NULL.

Parameters:
inDesiredClass A DescType for the class we are looking for.
inRelativePosition The relative position of the object we are looking for.
Exceptions:
none 
Returns:
CP_ScriptableObject_Imp * The contained object.

CP_ScriptableObject_Imp * CP_ScriptableObject_Imp::DoAE_CreateElement const DescType  inDesiredClass,
const DescType  inInsertLocation,
const AppleEvent &  inEvent,
AppleEvent &  inOutAEReply
[virtual, inherited]
 

Subclasses need to override this to handle the create element event.

Parameters:
inDesiredClass A DescType describing the class desired to create.
inInsertLocation A DescType describing the location to insert the object.
inEvent The incoming AppleEvent that we are creating the object for.
inOutAEReply The reply to the incoming Apple Event.
Exceptions:
none 
Returns:
CP_ScriptableObject_Imp * The newly created element.

Reimplemented in CP_Application< DOC_POLICY, PRINT_POLICY, UNDO_POLICY >.

void CP_ScriptableObject_Imp::AddEvent SInt32  inEventID,
CP_AppleEventSignal inEventSignal
[inherited]
 

Adds the passed in CP_AppleEventSignal to the list of AppleEvents we will handle through a signal / slot connection.

Parameters:
inEventID The identifier of the event to be handled.
inEventSignal The signal to call to handle the event.
Exceptions:
none 
Returns:
void

void CP_ScriptableObject_Imp::RemoveEvent SInt32  inEventID  )  [inherited]
 

Removes a previously added event handler from the list of the events handled by the object.

Parameters:
inEventID The identifier of the event to be removed.
Exceptions:
none 
Returns:
void

bool CP_ScriptableObject_Imp::HasHandlerForEvent SInt32  inEventID  )  [inherited]
 

Returns true if there is a registered signal handler for the passed in event.

Parameters:
inEventID The event id to check for a handler for.
Exceptions:
none 
Returns:
bool True if we have a handler for the event.

CP_AppleEventSignal * CP_ScriptableObject_Imp::FindHandlerForEvent SInt32  inEventID  )  [inherited]
 

Finds and returns the signal for the passed in event.

Parameters:
inEventID The identifier of the event to return the signal handler for.
Exceptions:
none 
Returns:
CP_AppleEventSignal * The AppleEventSignal handler for the event.

void CP_ScriptableObject_Imp::GetScriptableObjectToken DescType  inModelID,
DescType  inKeyForm,
const AEDesc &  inKeyData,
AEDesc &  outToken
[virtual, inherited]
 

Tries to get the CP_ModelToken from the passed in descriptor and return in outToken.

Parameters:
inModelID Identifier of the model to get.
inKeyForm Form to use.
inKeyData Descriptor that holds the data.
outToken Location to return the result in.
Exceptions:
none 
Returns:
void

void CP_ScriptableObject_Imp::PutInToken CP_ScriptableObject_Imp inScriptableObject,
AEDesc &  outToken
const [inherited]
 

Places the passed in scriptable object into a CP_ModelToken and then packages it up in a descriptor and returns in outToken.

Parameters:
inScriptableObject Object to package up.
outToken Location to return the result in.
Exceptions:
OSErrorExceptions 
Returns:
void

CP_ScriptableObject_Imp* CP_ScriptableObject_Imp::GetScriptableObjectProperty DescType  inProperty  )  const [inherited]
 

void CP_ScriptableObject_Imp::DoAE_GetData const DescType  inPropertyType,
const AEDesc &  inValue,
AppleEvent &  inOutReply
[virtual, inherited]
 

Subclasses should override this to handle the get data event.

Parameters:
inPropertyType The DescType of property we are getting.
inValue Any value of data to get.
inOutReply The AppleEvent where the reply will be placed.
Exceptions:
none 
Returns:
void

Reimplemented in CP_Document_Base, CP_Application_Imp, and CP_Window_Imp.

void CP_ScriptableObject_Imp::DoAE_SetData const DescType  inPropertyType,
const AEDesc &  inValue,
AppleEvent &  inOutReply
[virtual, inherited]
 

Subclasses should override this to handle the set data event.

Parameters:
inPropertyType The DescType of property we are setting.
inValue Any value of data to get.
inOutReply The AppleEvent where the reply will be placed.
Exceptions:
none 
Returns:
void

Reimplemented in CP_Window_Imp.

void CP_ScriptableObject_Imp::SendAppleEvent_Self const AEEventClass  inEventClass,
const AEEventID  inEventID,
const bool  inDoExecute
[inherited]
 

Send an Apple Event to ourselves. Used to record events.

Parameters:
inEventClass The AEEventClass for this event.
inEventID The AEEventID for this event.
inDoExecute If false, the event is sent for recording purposes, but not actually executed.
Exceptions:
none 
Returns:
void

void CP_ScriptableObject_Imp::MakeSpecifier AEDesc &  inOutSpecifier  )  [virtual, inherited]
 

Make the specifier for our object. This method will recruisvely travel the object heirachy to make the correct specifier.

Parameters:
inOutSpecifier The CP_AE_Object where we will place the results.
Exceptions:
none 
Returns:
void

void CP_ScriptableObject_Imp::GotRequiredParams const AppleEvent &  inAppleEvent  )  [virtual, inherited]
 

Check to make sure that the required params for the event are present, and throw an OSErr exception if they are missing.

Parameters:
inAppleEvent The AppleEvent that we are checking.
Exceptions:
OSErrorExceptions 
Returns:
void

void CP_ScriptableObject_Imp::Install CP_AE_ObjectDispatcher inDispatcher = NULL  )  [protected, virtual, inherited]
 

Initialize our Apple Event handling by installing the Apple Event dispatcher and its object handlers.

Parameters:
inDispatcher Ghe CP_AE_ObjectDispatcher you want to use. If you pass NULL in this parameter, then the default CPLAT dispatcher will be used.
Exceptions:
none 
Returns:
void

void CP_ScriptableObject_Imp::DoAE_Activate const AppleEvent &  inEvent,
AppleEvent &  inOutReply
[protected, virtual, inherited]
 

void CP_ScriptableObject_Imp::DoAE_Clone const AppleEvent &  inEvent,
AppleEvent &  inOutReply
[protected, virtual, inherited]
 

void CP_ScriptableObject_Imp::DoAE_Close const AppleEvent &  inEvent,
AppleEvent &  inOutReply
[protected, virtual, inherited]
 

Reimplemented in CP_Window_Imp.

void CP_ScriptableObject_Imp::DoAE_Delete const AppleEvent &  inEvent,
AppleEvent &  inOutReply
[protected, virtual, inherited]
 

void CP_ScriptableObject_Imp::DoAE_DoObjectsExist const AppleEvent &  inEvent,
AppleEvent &  inOutReply
[protected, virtual, inherited]
 

void CP_ScriptableObject_Imp::DoAE_Move const AppleEvent &  inEvent,
AppleEvent &  inOutReply
[protected, virtual, inherited]
 

void CP_ScriptableObject_Imp::DoAE_Open const AppleEvent &  inEvent,
AppleEvent &  inOutReply
[protected, virtual, inherited]
 

void CP_ScriptableObject_Imp::DoAE_Print const AppleEvent &  inEvent,
AppleEvent &  inOutReply
[protected, virtual, inherited]
 

void CP_ScriptableObject_Imp::DoAE_Save const AppleEvent &  inEvent,
AppleEvent &  inOutReply
[protected, virtual, inherited]
 

void CP_ScriptableObject_Imp::DoAE_Revert const AppleEvent &  inEvent,
AppleEvent &  inOutReply
[protected, virtual, inherited]
 

void CP_ScriptableObject_Imp::GetContainedObject_FormAbsolutePosition const DescType  inDesiredClass,
const DescType  inForm,
const AEDesc &  inSelectionData,
AEDesc &  outToken
[protected, virtual, inherited]
 

Return the object contained in the passed in container based upon the inForm criteria.

Parameters:
inDesiredClass A DescType describing the class we are looking for.
inForm a DescType describing the form.
inSelectionData AEDesc with the selection data.
inNeedsDisposal Flag to indicate if we should dispose dispose of objects.
Exceptions:
none 
Returns:
void

void CP_ScriptableObject_Imp::GetContainedObject_FormName const DescType  inDesiredClass,
const DescType  inForm,
const AEDesc &  inSelectionData,
AEDesc &  outToken
[protected, virtual, inherited]
 

Return the object contained in the passed in container based upon the inForm criteria.

Parameters:
inDesiredClass A DescType describing the class we are looking for.
inForm a DescType describing the form.
inSelectionData AEDesc with the selection data.
inNeedsDisposal Flag to indicate if we should dispose dispose of objects.
Exceptions:
none 
Returns:
void

void CP_ScriptableObject_Imp::GetContainedObject_FormUniqueID const DescType  inDesiredClass,
const DescType  inForm,
const AEDesc &  inSelectionData,
AEDesc &  outToken
[protected, virtual, inherited]
 

Return the object contained in the passed in container based upon the inForm criteria.

Parameters:
inDesiredClass A DescType describing the class we are looking for.
inForm a DescType describing the form.
inSelectionData AEDesc with the selection data.
inNeedsDisposal Flag to indicate if we should dispose dispose of objects.
Exceptions:
none 
Returns:
void

void CP_ScriptableObject_Imp::GetContainedObject_FormRelativePosition const DescType  inDesiredClass,
const DescType  inForm,
const AEDesc &  inSelectionData,
AEDesc &  outToken
[protected, virtual, inherited]
 

Return the object contained in the passed in container based upon the inForm criteria.

Parameters:
inDesiredClass A DescType describing the class we are looking for.
inForm a DescType describing the form.
inSelectionData AEDesc with the selection data.
inNeedsDisposal Flag to indicate if we should dispose dispose of objects.
Exceptions:
none 
Returns:
void

void CP_ScriptableObject_Imp::GetContainedObject_FormPropertyID const DescType  inDesiredClass,
const DescType  inForm,
const AEDesc &  inSelectionData,
AEDesc &  outToken
[protected, virtual, inherited]
 

Return the object contained in the passed in container based upon the inForm criteria.

Parameters:
inDesiredClass A DescType describing the class we are looking for.
inForm a DescType describing the form.
inSelectionData AEDesc with the selection data.
inNeedsDisposal Flag to indicate if we should dispose dispose of objects.
Exceptions:
none 
Returns:
void

void CP_ScriptableObject_Imp::GetContainedObject_OtherForm const DescType  inDesiredClass,
const DescType  inForm,
const AEDesc &  inSelectionData,
AEDesc &  outToken
[protected, virtual, inherited]
 

Return the object contained in the passed in container based upon the inForm criteria.

Parameters:
inDesiredClass A DescType describing the class we are looking for.
inForm a DescType describing the form.
inSelectionData AEDesc with the selection data.
inNeedsDisposal Flag to indicate if we should dispose dispose of objects.
Exceptions:
CP_AE_EventNotHandledException 
Returns:
void

SInt32 CP_ScriptableObject_Imp::GetPositionOfSubObject const DescType  inObjectID,
const CP_ScriptableObject_Imp inObject
const [protected, virtual, inherited]
 

Subclasses need to override to return the position of their sub objects.

Parameters:
inDesiredClass A DescType for the class we are looking for.
inObject The object we are looking for.
Exceptions:
none 
Returns:
SInt32 The position of the subobject.


Member Data Documentation

DescType CP_ScriptableObject_Property::fAppleClassType [protected]
 

DescType CP_ScriptableObject_Property::fPropertyType [protected]
 

CPLAT_Begin_Namespace_CPLAT CP_ScriptableObject_Imp * CP_ScriptableObject_Imp::gDefaultObject = NULL [static, protected, inherited]
 

bool CP_ScriptableObject_Imp::gInited = false [static, protected, inherited]
 

The default object that events will be dispatched to.

CP_AppleEventHandler_Map CP_ScriptableObject_Imp::fEventHandlers [protected, inherited]
 

Flag to indicate if this class has been initialized.

CP_ScriptableObject_Imp* CP_ScriptableObject_Imp::fSuperScriptableObject [protected, inherited]
 

Map that contains all of the registered handlers.

CP_ScriptableObject_Imp* CP_ScriptableObject_Imp::fDefaultSubScriptableObject [protected, inherited]
 

Scriptable object that is our container.

CP_ScriptableObject_Imp* CP_ScriptableObject_Imp::fDefaultSuperScriptableObject [protected, inherited]
 

Default scriptable object that is contained by this object.


The documentation for this class was generated from the following files:
Generated on Sat Sep 17 20:02:07 2005 for CPLAT by  doxygen 1.4.0