Taxonomy Categories:
Member Functions:
Interface Category:
API.
Inherits From:
TGUIEmbedderModelSelection
Inherited By:
None.
Purpose:
Provides a selection on a specific derived class of TGUIEmbedderModel. The class is parameterized by the type of model to provide type safe access to instances of the model.
Instantiation:
Allocate on the heap or the stack.
Deriving Classes:
Derived classes must override the pure virtual functions CopyDataIntoModelSubclass, MoveDataOutofModelSubclass, and MoveDataIntoModelSubclass. It can also override CreateAvailableTypesList & ChooseTypes in order to do type negotiation.
Concurrency:
Not multithread safe.
Resource Use:
No special requirements.
Other Considerations:
None.
- TGUIEmbedderModelSelectionFor ()
- TGUIEmbedderModelSelectionFor (const TModelReference &)
- TGUIEmbedderModelSelectionFor (const AModel & theModel)
- TGUIEmbedderModelSelectionFor (const TGUIEmbedderModelSelectionFor < AModel > &)
Interface Category:
API.
Purpose:
- Default constructor.
- Creates a selection on a model.
- Creates a selection on a model.
- Copy constructor.
Calling Context:
- Called by the stream-in operators.
- Called by any client.
- Called by any client.
- Called to copy the object.
Parameters:
Return Value:
None.
Exceptions:
Throws no exceptions, passes all exceptions through.
Concurrency:
Not multithread safe.
Other Considerations:
None.
~ TGUIEmbedderModelSelectionFor ()
Interface Category:
API.
Purpose:
Destructor.
Calling Context:
Called to destroy an object.
Parameters:
Return Value:
None.
Exceptions:
Throws no exceptions, passes all exceptions through.
Concurrency:
Not multithread safe.
Other Considerations:
None.
const AModel * GetModelForReading () const
Interface Category:
API.
Purpose:
Returns a const pointer to the model selected by this selection to be used for accessing the model.
Calling Context:
Called by any client object.
Parameters:
Return Value:
Returns a const pointer to the model.
Exceptions:
Throws no exceptions, passes all exceptions through.
Concurrency:
Not multithread safe.
Other Considerations:
None.
AModel * GetModelForWriting () const
Interface Category:
API.
Purpose:
Returns an non-const pointer to the model selected by this selection to be used for modifying the model.
Calling Context:
Called by any client object.
Parameters:
Return Value:
Returns a pointer to the model.
Exceptions:
Throws no exceptions, passes all exceptions through.
Concurrency:
Not multithread safe.
Other Considerations:
None.
virtual void CreateAvailableTypesList (TSequenceOf < TTypeDescription > & theTypes) const
Interface Category:
API.
Purpose:
Creates and returns the list of model types this selection can produce. The order is most to least preferred. The model type parameter is the first type on the list.
Calling Context:
Called as part of type negotiation for data exchange.
Parameters:
Return Value:
None.
Exceptions:
Throws no exceptions, passes all exceptions through.
Concurrency:
Not multithread safe.
Other Considerations:
None.
virtual void ChooseTypes (const TSequenceOf < TTypeDescription > & theChoices, TSequenceOf < TTypeDescription > & theChosenTypes) const
Interface Category:
API.
Purpose:
Chooses all the types from theChoices that this selection can accept. The order is most to least preferred. The first type chosen is the model parameter type.
Calling Context:
Called as part of type negotiation for data exchange.
Parameters:
Return Value:
None.
Exceptions:
Throws no exceptions, passes all exceptions through.
Concurrency:
Not multithread safe.
Other Considerations:
None.
virtual TModel * HandleCreateModel (const TTypeDescription &) const
Interface Category:
API.
Purpose:
Creates the model of the specified type. The default creates a model of the model parameter type if requested.
Calling Context:
Called by HandleCopyData.
Parameters:
Return Value:
Returns the model created. NIL is returned if the type is not known.
Exceptions:
Throws no exceptions, passes all exceptions through.
Concurrency:
Not multithread safe.
Other Considerations:
None.
virtual void HandleCopyDataInto (TModel &) const
Interface Category:
API.
Purpose:
Overridden to call CopyDataIntoGUIEmbedderModel and CopyDataIntoModelSubclass if the model is of the model parameter type. Derived classes should override CopyDataIntoModelSubclass instead.
Calling Context:
Called by CopyDataInto.
Parameters:
- TModel & -The model to copy data into.
Return Value:
None.
Exceptions:
Throws no exceptions, passes all exceptions through.
Concurrency:
Not multithread safe.
Other Considerations:
None.
virtual TModel * HandleReplaceData (TModel * theData)
Interface Category:
API.
Purpose:
Overridden to call MoveDataOutofGUIEmbedderModel and MoveDataOutofModelSubclass if the model is of the model parameter type. Derived classes should override MoveDataOutofModelSubclass instead.
Calling Context:
Called by ReplaceData.
Parameters:
- TModel * theData -The data to replace the selected data.
Return Value:
Returns the model to be used to undo this operation.
Exceptions:
Throws no exceptions, passes all exceptions through.
Concurrency:
Not multithread safe.
Other Considerations:
None.
virtual TModel * HandleOrphanData ()
Interface Category:
API.
Purpose:
Overridden to call MoveDataIntoGUIEmbedderModel and MoveDataIntoModelSubclass. Derived classes should override MoveDataIntoModelSubclass instead.
Calling Context:
Called by OrphanData.
Parameters:
Return Value:
Returns the model to be used to undo this operation.
Exceptions:
Throws no exceptions, passes all exceptions through.
Concurrency:
Not multithread safe.
Other Considerations:
None.
virtual void CopyDataIntoModelSubclass (AModel & theDestModel) const
Interface Category:
API.
Purpose:
Copies the derived class specific data selected by this selection into the specified model. There is no need to copy any data owned by TGUIEmbedderModel. This is handled by the calling function.
Calling Context:
Called by HandleCopyDataInto.
Parameters:
- AModel & theDestModel -The model to copy data into.
Return Value:
None.
Exceptions:
Throws no exceptions, passes all exceptions through.
Concurrency:
Not multithread safe.
Other Considerations:
This function is a pure virtual function and must be overridden by classes deriving from TGUIEmbedderModelSelectionFor.
virtual void MoveDataOutofModelSubclass (AModel & theDestModel)
Interface Category:
API.
Purpose:
Moves derived class specific data out of the specified model and into the model specified by this selection. There is no need to move any data owned by TGUIEmbedderModel. This is handled by the calling function.
Calling Context:
Called by HandleReplaceData.
Parameters:
- AModel & theDestModel -The model to move data from.
Return Value:
None.
Exceptions:
Throws no exceptions, passes all exceptions through.
Concurrency:
Not multithread safe.
Other Considerations:
This function is a pure virtual function and must be overridden by classes deriving from TGUIEmbedderModelSelectionFor.
virtual void MoveDataIntoModelSubclass (AModel & theDestModel)
Interface Category:
API.
Purpose:
Moves derived class specific data specified by this selection into the specified model. There is no need to move any data owned by TGUIEmbedderModel. This is handled by the calling function.
Calling Context:
Called by HandleOrphanData.
Parameters:
- AModel & theDestModel -The model to move data into.
Return Value:
None.
Exceptions:
Throws no exceptions, passes all exceptions through.
Concurrency:
Not multithread safe.
Other Considerations:
This function is a pure virtual function and must be overridden by classes deriving from TGUIEmbedderModelSelectionFor.
Click the icon to mail questions or corrections about this material to Taligent personnel.
Copyright©1995 Taligent,Inc. All rights reserved.