Class: MEmbeddedComponentAccessor

Declaration: GUICompoundDocumentEmbedder.h

Taxonomy Categories:

Member Functions:


Interface Category:

API.

Inherits From:

None.

Inherited By:

TEmbedderTextSelection TGUIEmbedderModelSelection

Purpose:

This mixin defines the protocol that commands can use to access and modify selected components. The modifications are limited to change the area associated with the component. TComponentAreaRectControlState uses commands that require MEmbeddedComponentAccessor to change the allocated area associated with a component when the user manipulates the frame.

Instantiation:

MEmbeddedComponentAccessor is an abstract class and is never instantiated except as part of a derived class.

Deriving Classes:

Derived class of TModelSelection that want to enable commands on MEmbeddedComponentAccessor will derive from this mixin class. Derived classes must override the pure virtual functions GetSelectedComponentCount, IsSelected, GetSelectedComponents, GetComponentArea, and SetComponentArea.

Concurrency:

Not multithread safe.

Resource Use:

No special requirements.

Other Considerations:

None.

Member Function: MEmbeddedComponentAccessor::~MEmbeddedComponentAccessor

virtual ~ MEmbeddedComponentAccessor ()

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: MEmbeddedComponentAccessor::GetSelectedComponentCount

virtual long GetSelectedComponentCount () const

Interface Category:

API.

Purpose:

Gets the count of components selected by the selection.

Calling Context:

Called by any client object.

Parameters:

Return Value:

Returns the count of selected components.

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

Member Function: MEmbeddedComponentAccessor::IsSelected

virtual bool IsSelected (const TDocumentComponentReference &) const

Interface Category:

API.

Purpose:

Determines if a specific component is selected by this selection.

Calling Context:

Called by any client object.

Parameters:

Return Value:

Returns true if the specified component is selected.

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

Member Function: MEmbeddedComponentAccessor::AddInterests

virtual void AddInterests (TSetOf < TInterest > & set)

Interface Category:

API.

Purpose:

Gets interests to connect for notification on changes to the area associated with components in the model selected by this selection. Derived classes override this function to return the appropriate interests.

Calling Context:

Called by an client object.

Parameters:

Return Value:

None.

Exceptions:

Throws no exceptions, passes all exceptions through.

Concurrency:

Not multithread safe.

Other Considerations:

None.

Member Function: MEmbeddedComponentAccessor::GetSelectedComponents

virtual void GetSelectedComponents (TCollectionOf < TDocumentComponentReference > &) const

Interface Category:

API.

Purpose:

Returns a list of all the components selected by this selection.

Calling Context:

Called by any client.

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

Member Function: MEmbeddedComponentAccessor::GetComponentArea

virtual void GetComponentArea (const TDocumentComponentReference &, TGArea &) const

Interface Category:

API.

Purpose:

Returns the area associated with a component in the model specified by this selection.

Calling Context:

Called by any client object.

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

Member Function: MEmbeddedComponentAccessor::SetComponentArea

virtual void SetComponentArea (const TDocumentComponentReference &, const TGArea &)

Interface Category:

API.

Purpose:

Sets the area associated with a component in the model specified by this selection.

Calling Context:

Called by any client object.

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

Member Function: MEmbeddedComponentAccessor::operator=

MEmbeddedComponentAccessor & operator =(const MEmbeddedComponentAccessor &)

Interface Category:

API.

Purpose:

Assignment operator.

Calling Context:

Called when an object is assigned to another compatible object.

Parameters:

Return Value:

Returns a const reference to the left-hand side object.

Exceptions:

Throws no exceptions, passes all exceptions through.

Concurrency:

Not multithread safe.

Other Considerations:

None.

Member Function: MEmbeddedComponentAccessor::operator>>=

virtual TStream & operator >>=(TStream &) const

Interface Category:

API.

Purpose:

Stream-out operator.

Calling Context:

Called to stream out data.

Parameters:

Return Value:

Returns a reference to the stream the object streams itself out to.

Exceptions:

Throws no exceptions, passes all exceptions through.

Concurrency:

Not multithread safe.

Other Considerations:

None.

Member Function: MEmbeddedComponentAccessor::operator<<=

virtual TStream & operator <<= (TStream &)

Interface Category:

API.

Purpose:

Stream-in operator.

Calling Context:

Called to stream in data.

Parameters:

Return Value:

Returns a reference to the stream the object streams itself in from.

Exceptions:

Throws a TInvalidVersionError if the version of the object on the stream is unknown to the version of the shared library installed.

Concurrency:

Not multithread safe.

Other Considerations:

None.

Member Function: MEmbeddedComponentAccessor::MEmbeddedComponentAccessor

  1. MEmbeddedComponentAccessor ()
  2. MEmbeddedComponentAccessor (const MEmbeddedComponentAccessor &)

Interface Category:

API.

Purpose:

  1. Default constructor.
  2. Copy constructor.

Calling Context:

  1. Called by the stream-in operators.
  2. Called to copy an object.

Parameters:

Return Value:

None.

Exceptions:

Throws no exceptions, passes all exceptions through.

Concurrency:

Not multithread safe.

Other Considerations:

MEmbeddedComponentAccessor is an abstract base class--all the constructors are protected. Do not instantiate this class.
Click the icon to mail questions or corrections about this material to Taligent personnel.
Copyright©1995 Taligent,Inc. All rights reserved.