[ First ]  [ Previous ]  [ Next ]  [ Last ]  [ Manuals ]

 

LAttachable



Overviedw:

LAttachable is a PowerPlant class that is used for storing Attachment information in lists.

Methods :

The methods in this class are:

 

LAttachable()  
~LAttachable()  
AddAttachment()  
ExecuteAttachments()  
GetDefaultAttachable()  
RemoveAllAttachments()  
RemoveAttachment()  
SetDefaultAttachable()  

Data Members:

The data members in this class are:

 

sDefaultAttachable  
mAttachments  

Operation:

Typically, you don't need to override any methods in this class. As it exists, the class provides all the implementation that you are likely to need.

Source files:

(Feature Classes)

LAttachable.h

LAttachable.cp

See Also:

LAttachment

LAttachable()

Purpose:

The copy constructor initializes the mAttachments data member, but does not make a copy of any other member data. The default constructor initializes the mAttachments data member, and also calls SetDefaultAttachable() with a pointer to this object.

Access:

Public

Prototypes:

LAttachable();

LAttachable::LAttachable(
const LAttachable& inOriginal );
Parameters:

 

const LAttachable&  
inOriginal  
This is a reference to the LAttachable object you wish to copy  

~LAttachable()

Purpose:

The destructor destroys the LAttachable object, using a call to RemoveAllAttachments().

Access:

Public, Virtual

Prototype:

virtual ~LAttachable();

AddAttachment()

Purpose:

This method adds an Attachment to the list.

Access:

Public, Virtual

Prototype:

virtual void AddAttachment(
LAttachment *inAttachment,
LAttachment *inBefore,
Boolean inOwnsAttachment)
Parameters:

This method has the following parameters:

 

LAttachment*  
inAttachment  
A pointer to the Attachment to add to the list.  
LAttachment*  
inBefore  
A pointer to the attachment to precede in the list. Set this to nil to add to the end of the list.  
Boolean  
inOwnsAttachment  
If true, the Attachable assumes ownership of the Attachment and will delete the Attachment when the Attachable itself is deleted.  

Return:

None

ExecuteAttachments()

Purpose:

This method tells all associated Attachments to execute themselves for the specified message.

Access:

Virtual, Public

Prototype:

Boolean ExecuteAttachments( MessageT inMessage,
void *ioParam );
Parameters:

This method has the following parameters:

 

MessageT  
inMessage  
The message that is passed from the framework.  
void*  
ioParam  
A pointer to the data block that accompanies the message.  

Return:

The Boolean return value specifies whether the default Host action should be executed. The value is false if any Attachment's Execute() function returns false, otherwise it's true.

GetDefaultAttachable()

Purpose:

This method returns a pointer to the sDefaultAttachable data member.

Access:

Static, Public, Inline

Prototype:

static LAttachable* GetDefaultAttachable()
Parameters:

None

Return:

A pointer to sDefaultAttachable.

RemoveAllAttachments()

Purpose:

This method removes all Attachments from an Attachable. All Attachments owned by this Attachable are deleted.

Access:

Virtual, Public

Prototype:

void RemoveAllAttachments();
Parameters:

None

Return:

None

RemoveAttachment()

Purpose:

This method removes an Attachment from an Attachable. If this Attachable is the owner of the Attachment, the Attachment's owner is set to nil, and the caller should assume control of the Attachment.

Access:

Virtual, Public

Prototype:

void RemoveAttachment( LAttachment *inAttachment 
);
Parameters:

This method has the following parameter:

 

LAttachment*  
inAttachment  
The pointer to the Attachment to remove.  

Return:

None

SetDefaultAttachable()

Purpose:

This method sets the pointer for the sDefaultAttachable data member.

Access:

Static, Public, Inline

Prototype:

static void SetDefaultAttachable( 
LAttachment* inAttachment );
Parameters:

This method has the following parameter:

 

LAttachment*  
inAttachment  
The pointer to the Attachment.  

Return:

None

sDefaultAttachable

Purpose:

This data member contains the pointer to the default Attachable object.

Access:

Protected

Prototype:

static LAttachable* sDefaultAttachable;

mAttachments

Purpose:

This data member is a list of all the Attachments.

Access:

Protected

Prototype:

TArray<LAttachment*> *mAttachments;

 


[ First ]  [ Previous ]  [ Next ]  [ Last ]  [ Manuals ]

Visit the Metrowerks website at: http://www.metrowerks.com
For assistance contact Metrowerks Technical Support at: cw_support@metrowerks.com
Copyright © 2000, Metrowerks Corp. All rights reserved.

Last updated: July 21, 2000