Class: TModelLink

Declaration: CompoundDocumentLinking.h

Taxonomy Categories:

Member Functions:


Interface Category:

API.

Inherits From:

MCollectible

Inherited By:

None.

Purpose:

Links are connections between anchors and are always owned by anchors.

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: Assert ( GetHereAnchorReference().IsDefined() ==true ). Assert ( GetThereAnchorReference().IsDefined() ==true ).

Member Function: TModelLink::TModelLink

  1. TModelLink (const TModelAnchorReference & theHereAnchorReference, const TModelAnchorReference & theThereAnchorReference)
  2. TModelLink (const TModelLink &)
  3. TModelLink ()

Interface Category:

API.

Purpose:

  1. Creates a new link between the here anchor and the there anchor.
  2. Copy constructor.
  3. Default constructor.

Calling Context:

  1. Call this function directly.
  2. Called to copy an object. You can also call this function directly.
  3. Called by the stream-in operators.

Parameters:

Return Value:

None.

Exceptions:

Throws kUndefinedAnchorID if theHereAnchorReference.IsDefined() ==false. Throws kUndefinedAnchorID if theThereAnchorReference.IsDefined() ==false.

Concurrency:

Not multithread safe.

Other Considerations:

Preconditions: Assert (theHereAnchorReference.IsDefined() ==true ). Assert (theThereAnchorReference.IsDefined() ==true ).

Member Function: TModelLink::~TModelLink

virtual ~ TModelLink ()

Interface Category:

API.

Purpose:

Destructor.

Calling Context:

Called to destroy an object. You can also 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: TModelLink::operator=

TModelLink & operator =(const TModelLink &)

Interface Category:

API.

Purpose:

Assignment operator.

Calling Context:

Called when an object is assigned to another compatible object. You can also call this function directly.

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: TModelLink::GetReference

TModelLinkReference GetReference () const

Interface Category:

API.

Purpose:

Returns a reference to this link.

Calling Context:

Call this function directly.

Parameters:

Return Value:

Returns a reference to this link.

Exceptions:

Throws no exceptions, passes all exceptions through.

Concurrency:

Not multithread safe.

Other Considerations:

None.

Member Function: TModelLink::GetHereReference

TModelAnchorReference GetHereReference () const

Interface Category:

API.

Purpose:

Returns a reference to the here anchor (for example, the anchor that owns the link).

Calling Context:

Call this function directly.

Parameters:

Return Value:

Returns a reference to the here anchor.

Exceptions:

Throws no exceptions, passes all exceptions through.

Concurrency:

Not multithread safe.

Other Considerations:

None.

Member Function: TModelLink::SetHereReference

void SetHereReference (const TModelAnchorReference &)

Interface Category:

API.

Purpose:

Sets a new here anchor reference for this link. The old one is not 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.

Member Function: TModelLink::GetThereReference

TModelAnchorReference GetThereReference () const

Interface Category:

API.

Purpose:

Returns a reference to the there anchor. This is the anchor that the here anchor is connected to.

Calling Context:

Call this function directly.

Parameters:

Return Value:

Returns a reference to the there anchor.

Exceptions:

Throws no exceptions, passes all exceptions through.

Concurrency:

Not multithread safe.

Other Considerations:

None.

Member Function: TModelLink::SetThereReference

void SetThereReference (const TModelAnchorReference &)

Interface Category:

API.

Purpose:

Sets a new there anchor reference for this link. The old one is not 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.

Member Function: TModelLink::AddAttribute

virtual void AddAttribute (const TModelLinkAttribute & theAttribute)

Interface Category:

API.

Purpose:

Attaches a copy of the specified model link attribute to the link.

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: TModelLink::DeleteAttribute

virtual void DeleteAttribute (const TModelLinkAttribute & thePatternToMatch)

Interface Category:

API.

Purpose:

Deletes the model link attribute that matches (IsEqual ==true) the pattern.

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: TModelLink::CopyAttribute

virtual TModelLinkAttribute * CopyAttribute (const TModelLinkAttribute & thePatternToMatch) const

Interface Category:

API.

Purpose:

Returns a copy of the link attribute matching the pattern to the caller. The caller owns the copy.

Calling Context:

Call this function directly.

Parameters:

Return Value:

Returns a link attribute copy matching the pattern.

Exceptions:

Throws no exceptions, passes all exceptions through.

Concurrency:

Not multithread safe.

Other Considerations:

None.

Member Function: TModelLink::DeleteAllAttributes

virtual void DeleteAllAttributes ()

Interface Category:

API.

Purpose:

Deletes all the attributes that are attached to the link.

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: TModelLink::CopyAllAttributes

virtual void CopyAllAttributes (TCollectionOf<TModelLinkAttribute> &) const

Interface Category:

API.

Purpose:

Inserts copies of all the link's attributes into the collection. The caller owns the copied attributes.

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: TModelLink::IsBidirectional

virtual bool IsBidirectional () const

Interface Category:

API.

Purpose:

Indicates whether this link is bidirectional. Bidirectional indicates that another link exists from the there anchor to the here anchor.

Calling Context:

Call this function directly.

Parameters:

Return Value:

Returns true if the link is bidirectional.

Exceptions:

Throws no exceptions, passes all exceptions through.

Concurrency:

Not multithread safe.

Other Considerations:

None.

Member Function: TModelLink::SetBidirectional

virtual void SetBidirectional (bool =true)

Interface Category:

API.

Purpose:

Alters whether this link is bidirectional or not.

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

virtual long Hash () const

Interface Category:

API.

Purpose:

Generates a hash key for use by the Collection classes.

Calling Context:

Call this function directly.

Parameters:

Return Value:

Returns the hash key.

Exceptions:

Throws no exceptions, passes all exceptions through.

Concurrency:

Not multithread safe.

Other Considerations:

None.

Member Function: TModelLink::operator>>=

virtual TStream & operator >>=(TStream & towhere) 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: TModelLink::operator<<=

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

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.
Click the icon to mail questions or corrections about this material to Taligent personnel.
Copyright©1995 Taligent,Inc. All rights reserved.