Class: TGUIEmbedderModelSelectionFor

Declaration: GUICompoundDocumentEmbedder.h

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.

Member Function: TGUIEmbedderModelSelectionFor::TGUIEmbedderModelSelectionFor

  1. TGUIEmbedderModelSelectionFor ()
  2. TGUIEmbedderModelSelectionFor (const TModelReference &)
  3. TGUIEmbedderModelSelectionFor (const AModel & theModel)
  4. TGUIEmbedderModelSelectionFor (const TGUIEmbedderModelSelectionFor < AModel > &)

Interface Category:

API.

Purpose:

  1. Default constructor.
  2. Creates a selection on a model.
  3. Creates a selection on a model.
  4. Copy constructor.

Calling Context:

  1. Called by the stream-in operators.
  2. Called by any client.
  3. Called by any client.
  4. Called to copy the object.

Parameters:

Return Value:

None.

Exceptions:

Throws no exceptions, passes all exceptions through.

Concurrency:

Not multithread safe.

Other Considerations:

None.

Member Function: TGUIEmbedderModelSelectionFor::~TGUIEmbedderModelSelectionFor

~ 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.

Member Function: TGUIEmbedderModelSelectionFor::GetModelForReading

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.

Member Function: TGUIEmbedderModelSelectionFor::GetModelForWriting

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.

Member Function: TGUIEmbedderModelSelectionFor::CreateAvailableTypesList

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.

Member Function: TGUIEmbedderModelSelectionFor::ChooseTypes

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.

Member Function: TGUIEmbedderModelSelectionFor::HandleCreateModel

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.

Member Function: TGUIEmbedderModelSelectionFor::HandleCopyDataInto

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:

Return Value:

None.

Exceptions:

Throws no exceptions, passes all exceptions through.

Concurrency:

Not multithread safe.

Other Considerations:

None.

Member Function: TGUIEmbedderModelSelectionFor::HandleReplaceData

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:

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.

Member Function: TGUIEmbedderModelSelectionFor::HandleOrphanData

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.

Member Function: TGUIEmbedderModelSelectionFor::CopyDataIntoModelSubclass

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:

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.

Member Function: TGUIEmbedderModelSelectionFor::MoveDataOutofModelSubclass

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:

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.

Member Function: TGUIEmbedderModelSelectionFor::MoveDataIntoModelSubclass

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:

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.