Class: TDocumentComponentSelection

Declaration: CompoundDocument.h

Taxonomy Categories:

Member Functions:


Interface Category:

API.

Inherits From:

MCollectible

Inherited By:

None.

Purpose:

Selections are used to specify the data that is to be the target of a document component command. The document component selection is a monomorphic class that splits the data into two pieces: a selection on the presenter state and a selection on the model.

Instantiation:

Allocate on the heap or the stack.

Deriving Classes:

Do not derive from this class.

Concurrency:

Not multithread safe.

Resource Use:

No special requirements.

Other Considerations:

Invariants: Assertion (GetPresenterStateSelection() != NIL). Assertion (GetModelSelection() != NIL ).

Member Function: TDocumentComponentSelection::TDocumentComponentSelection

  1. TDocumentComponentSelection (const TModelSelection &, const TPresenterStateSelection &)
  2. TDocumentComponentSelection (TModelSelection * adoptM, TPresenterStateSelection * adoptP)
  3. TDocumentComponentSelection (TDocumentComponent&)
  4. TDocumentComponentSelection (const TDocumentComponentSelection &)
  5. TDocumentComponentSelection()

Interface Category:

API.

Purpose:

  1. Creates a component selection containing the presenter state selection, and the model selection.
  2. Creates a component selection adopting the presenter state selection, and the model selection.
  3. Creates a component selection with a whole model selection and whole presenter state selection for the component.
  4. Copy constructor. Deep-copies the component selection. In both cases, the component selection owns the presenter state and model selections.
  5. Default constructor. This is only for internal use by Resurrect. This function is protected.

Calling Context:

  1. Call this function directly.
  2. Call this function directly.
  3. Call this function directly.
  4. Called to copy an object. You can also call this function directly.
  5. Only for internal use by Resurrect.

Parameters:

Return Value:

None.

Exceptions:

  1. Throws no exceptions, passes all exceptions through.
  2. Throws kNILSelection if either the presenter state selection or the model selection is NIL.
  3. Throws no exceptions, passes all exceptions through.
  4. Throws no exceptions, passes all exceptions through.
  5. Throws no exceptions, passes all exceptions through.

Concurrency:

Not multithread safe.

Other Considerations:

None.

Member Function: TDocumentComponentSelection::~TDocumentComponentSelection

virtual ~ TDocumentComponentSelection ()

Interface Category:

API.

Purpose:

Destructor. Called to destroy an object. Deletes the presenter state selection and the model selection.

Calling Context:

Call this function directly.

Parameters:

Return Value:

None.

Exceptions:

Throws no exceptions, passes all exceptions through.

Concurrency:

Not multithread safe.

Other Considerations:

None.

Member Function: TDocumentComponentSelection::IsDefined

bool IsDefined () const

Interface Category:

API.

Purpose:

Indicates whether this selection specifies a valid range of data.

Calling Context:

Call this function directly.

Parameters:

Return Value:

Returns true if the selection is defined.

Exceptions:

Throws no exceptions, passes all exceptions through.

Concurrency:

Not multithread safe.

Other Considerations:

None.

Member Function: TDocumentComponentSelection::GetPresenterStateSelection

  1. TPresenterStateSelection * GetPresenterStateSelection ()
  2. const TPresenterStateSelection * GetPresenterStateSelection () const

Interface Category:

API.

Purpose:

  1. The component selection is comprised of a presenter state and a model selection. This accessor returns the presenter state subselection.
  2. The component selection is comprised of a presenter state and a model selection. This accessor returns the presenter state subselection.

Calling Context:

Call this function directly.

Parameters:

Return Value:

  1. Returns a pointer to the presenter state selection.
  2. Returns a const pointer to the presenter state selection.

Exceptions:

Throws no exceptions, passes all exceptions through.

Concurrency:

Not multithread safe.

Other Considerations:

None.

Member Function: TDocumentComponentSelection::AdoptPresenterStateSelection

void AdoptPresenterStateSelection (TPresenterStateSelection *)

Interface Category:

API.

Purpose:

Adopts the specified presenter state selection into the component selection. The old presenter state selection is deleted. There is no corresponding OrphanPresenterSelection because it is not possible to have a component selection with out a presenter state subselection.

Calling Context:

Call this function directly.

Parameters:

Return Value:

None.

Exceptions:

Throws no exceptions, passes all exceptions through.

Concurrency:

Not multithread safe.

Other Considerations:

None.

Member Function: TDocumentComponentSelection::GetModelSelection

  1. TModelSelection * GetModelSelection ()
  2. const TModelSelection * GetModelSelection () const

Interface Category:

API.

Purpose:

  1. The component selection is comprised of a presenter state and model selection. This accessor returns the model subselection.
  2. The component selection is comprised of a presenter state and model selection. This accessor returns the model subselection.

Calling Context:

Call this function directly.

Parameters:

Return Value:

  1. Returns a pointer to a subselection on the model's data.
  2. Returns a const pointer to a subselection on the model's data.

Exceptions:

Throws no exceptions, passes all exceptions through.

Concurrency:

Not multithread safe.

Other Considerations:

None.

Member Function: TDocumentComponentSelection::AdoptModelSelection

void AdoptModelSelection (TModelSelection *)

Interface Category:

API.

Purpose:

Adopts the specified model selection into the component selection. The old model selection is deleted. There is no corresponding OrphanModelSelection because it is not possible to have a component selection with out a model subselection.

Calling Context:

Call this function directly.

Parameters:

Return Value:

None.

Exceptions:

Throws no exceptions, passes all exceptions through.

Concurrency:

Not multithread safe.

Other Considerations:

None.

Member Function: TDocumentComponentSelection::DeselectAll

void DeselectAll ()

Interface Category:

API.

Purpose:

Resets the selection so that it no longer specifies any model or presenter state data. This delegates to TPresenterStateSelection:: DeselectAll and TModelSelection::DeselectAll.

Calling Context:

Call this function directly.

Parameters:

Return Value:

None.

Exceptions:

Throws no exceptions, passes all exceptions through.

Concurrency:

Not multithread safe.

Other Considerations:

Preconditions: Assertion (IsDefined() ==true ). Postconditions: Assertion ( IsEmpty() ==true ). Invariants: Assertion ( IsDefined() ==true ).

Member Function: TDocumentComponentSelection::SelectWholeComponent

void SelectWholeComponent ()

Interface Category:

API.

Purpose:

Selects all the information contained in the model and presenter states. It does this by delegating to TModelSelection::SelectWholeModel and TPresenterStateSelection::SelectWholePresenterState.

Calling Context:

Call this function directly.

Parameters:

Return Value:

None.

Exceptions:

Throws no exceptions, passes all exceptions through.

Concurrency:

Not multithread safe.

Other Considerations:

Postconditions: Assertion (IsDefined() ==true ).

Member Function: TDocumentComponentSelection::SetUndefined

virtual void SetUndefined ()

Interface Category:

API.

Purpose:

Marks this selection as being undefined. It does not specify any model insertion point or model data.

Calling Context:

Call this function directly.

Parameters:

Return Value:

None.

Exceptions:

Throws no exceptions, passes all exceptions through.

Concurrency:

Not multithread safe.

Other Considerations:

Postconditions: Assertion (IsDefined() ==false ).

Member Function: TDocumentComponentSelection::SelectDefault

void SelectDefault ()

Interface Category:

API.

Purpose:

Makes a default selection on this model and presenter state. This member function delegates to TModelSelection::SelectDefault and TPresenterStateSelection::SelectDefault.

Calling Context:

Call this function directly.

Parameters:

Return Value:

None.

Exceptions:

Throws no exceptions, passes all exceptions through.

Concurrency:

Not multithread safe.

Other Considerations:

Postconditions: Assertion (IsDefined() ==true ).

Member Function: TDocumentComponentSelection::operator=

TDocumentComponentSelection & operator =(const TDocumentComponentSelection &)

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: TDocumentComponentSelection::operator>>=

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

Interface Category:

API.

Purpose:

Stream-out operator.

Calling Context:

Called to stream out data. You can also call this function directly.

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: TDocumentComponentSelection::operator<<=

virtual TStream & operator <<= (TStream & fromwhere)

Interface Category:

API.

Purpose:

Stream-in operator.

Calling Context:

Called to stream in data. You can also call this function directly.

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: TDocumentComponentSelection::Hash

virtual long Hash () const

Interface Category:

API.

Purpose:

Standard hashing for the collection classes.

Calling Context:

Call this function directly.

Parameters:

Return Value:

Returns the hash value.

Exceptions:

Throws no exceptions, passes all exceptions through.

Concurrency:

Not multithread safe.

Other Considerations:

None.

Member Function: TDocumentComponentSelection::SetModelSelection

void SetModelSelection (const TModelSelection &)

Interface Category:

Adopts a copy of the specified model selection into the component selection. The old model selection is deleted.

Calling Context:

Call this function directly.

Parameters:

Return Value:

None.

Exceptions:

Throws no exceptions, passes all exceptions through.

Concurrency:

API.

Other Considerations:

None.

Member Function: TDocumentComponentSelection::SetPresenterStateSelection

void SetPresenterStateSelection (const TPresenterStateSelection &)

Interface Category:

API.

Purpose:

Adopts a copy of the specified presenter state selection into the component selection. The old presenter state selection is deleted.

Calling Context:

Call this function directly.

Parameters:

Return Value:

None.

Exceptions:

Throws no exceptions, passes all exceptions through.

Concurrency:

Not multithread safe.

Other Considerations:

None.
Click the icon to mail questions or corrections about this material to Taligent personnel.
Copyright©1995 Taligent,Inc. All rights reserved.