Taxonomy Categories:
Member Functions:
Interface Category:
API.
Inherits From:
TAbstractModel
Inherited By:
TMediaModel
TEmbedderModel
TGUIEmbedderModel
TStandardCanvasModel
TTextModel
Purpose:
The model provides an interface needed by the Compound Document Framework to manage its native data types in a compound document. This is a core class for the Compound Document Framework. All data types used with the Compound Document Framework are derived from TModel.
Instantiation:
Allocate on the heap or the stack.
Deriving Classes:
All new data types to be used in the Compound Document Framework must derive from TModel. Derived classes must override the pure virtual function CreateSelection.
Concurrency:
Not multithread safe. Models contained in document components can be safely accessed concurrently by obtaining a TDocumentComponentReadEntry or TDocumentComponentWriteEntry prior to looking up the model from a reference.
Resource Use:
No special requirements.
virtual ~ TModel ()
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. Models contained in document components can be safely accessed concurrently by obtaining a TDocumentComponentReadEntry or TDocumentComponentWriteEntry prior to looking up the model from a reference.
Other Considerations:
None.
Member Function: TModel::LookupForWriting
static TModel * LookupForWriting (const TModelReference &)
Interface Category:
API.
Purpose:
Looks up a model from a reference for read/write access.
Calling Context:
Called to access a model safely in a concurrent environment.
Parameters:
Return Value:
Returns a pointer to a TModel object.
Exceptions:
Throws TCompoundDocumentException::KModelDoesNotExist if the model is not in the document.
Throws TCompoundDocumentException::kModelNotLocked if the component containing the model is not read/write locked. To lock the component, a TDocumentComponentWriteEntry for the component must be in scope at the time of lookup. The model pointer must not be held outside the scope of the entry.
Concurrency:
Not multithread safe. Models contained in document components can be safely accessed concurrently by obtaining a TDocumentComponentReadEntry or TDocumentComponentWriteEntry prior to looking up the model from a reference.
Other Considerations:
Preconditions:
Assertion( the associated model is read-write locked or is not inside a document ).
Member Function: TModel::LookupForReading
static const TModel * LookupForReading (const TModelReference &)
Interface Category:
API.
Purpose:
Looks up a model from a reference for read access.
Calling Context:
Called to access a model safely in a concurrent environment.
Parameters:
Return Value:
Returns a const pointer to a TModel instance.
Exceptions:
Throws TCompoundDocumentException::kModelDoesNotExist if the model is not in the document.
Throws TCompoundDocumentException::kModelNotLocked if the component containing the model is not locked.
Concurrency:
Not multithread safe. Models contained in document components can be safely accessed concurrently by obtaining a TDocumentComponentReadEntry or TDocumentComponentWriteEntry prior to looking up the model from a reference.
Other Considerations:
Preconditions:
Assertion( the associated model is read locked or is not inside a document ).
Member Function: TModel::CreateSelection
virtual TModelSelection * CreateSelection () const
Interface Category:
API.
Purpose:
Virtual constructor that provides a compatible selection for this model. The return selection is undefined.
Calling Context:
Called to virtually construct a selection for this model.
Parameters:
Return Value:
Returns a selection of a compatible class for this model.
Exceptions:
Throws no exceptions, passes all exceptions through.
Concurrency:
Not multithread safe. Models contained in document components can be safely accessed concurrently by obtaining a TDocumentComponentReadEntry or TDocumentComponentWriteEntry prior to looking up the model from a reference.
Other Considerations:
This function is a pure virtual function and must be overridden by classes deriving from TModel.
Member Function: TModel::FileIn
virtual void FileIn (TStorageMechanism &)
Interface Category:
API.
Purpose:
Files the model's data in from persistent store.
Calling Context:
Called by the Compound Document Framework when a model is looked up and is not found in the memory.
Parameters:
- TStorageMechanism & -A compatible storage mechanism containing the persistent data for this model.
Return Value:
None.
Exceptions:
Throws no exceptions, passes all exceptions through.
Concurrency:
Not multithread safe. Models contained in document components can be safely accessed concurrently by obtaining a TDocumentComponentReadEntry or TDocumentComponentWriteEntry prior to looking up the model from a reference.
Other Considerations:
None.
Member Function: TModel::FileOut
virtual void FileOut (TStorageMechanism &) const
Interface Category:
API.
Purpose:
To file the model's data out to persistent store.
Calling Context:
Called by the Compound Document Framework when a model is committed to store.
Parameters:
- TStorageMechanism & -A compatible storage mechanism used to store the persistent data for this model.
Return Value:
None.
Exceptions:
Throws no exceptions, passes all exceptions through.
Concurrency:
Not multithread safe. Models contained in document components can be safely accessed concurrently by obtaining a TDocumentComponentReadEntry or TDocumentComponentWriteEntry prior to looking up the model from a reference.
Other Considerations:
None.
Member Function: TModel::CreateComponentStore
virtual TDocumentComponentStore * CreateComponentStore (TDocumentStore & theDocStore, const TSequenceOf < TTypeDescription > &)
Interface Category:
API.
Purpose:
Requests the model to create a compatible store in which it stores persistent data. A list of types for existing stores are passed so the model can choose to create a store of an existing type, which can provide implementation sharing between stores if the store supports such behavior.
Calling Context:
Called by the Compound Document Framework when a model is added to the document embedding hierarchy.
Parameters:
- TDocumentStore & theDocStore -The store associated with the document in which this model is embedded.
- const TSequenceOf < TTypeDescription > & -The types of the document component stores currently available in this document.
Return Value:
Returns a compatible store in which this model stores its persistent data.
Exceptions:
Throws no exceptions, passes all exceptions through.
Concurrency:
Not multithread safe. Models contained in document components can be safely accessed concurrently by obtaining a TDocumentComponentReadEntry or TDocumentComponentWriteEntry prior to looking up the model from a reference.
Other Considerations:
None.
Member Function: TModel::StartUsingStorageMechanism
virtual void StartUsingStorageMechanism (TStorageMechanism *)
Interface Category:
API.
Purpose:
Provides the model with a storage mechanism used to save persistent data.
Calling Context:
Called by the Compound Document Framework when a model is added to the embedding hierarchy.
Parameters:
- TStorageMechanism * -A compatible storage mechanism used to store this models persistent data.
Return Value:
None.
Exceptions:
Throws no exceptions, passes all exceptions through.
Concurrency:
Not multithread safe. Models contained in document components can be safely accessed concurrently by obtaining a TDocumentComponentReadEntry or TDocumentComponentWriteEntry prior to looking up the model from a reference.
Other Considerations:
Preconditions:
Assertion (TStorageMechanism * != NIL).
Member Function: TModel::StopUsingStorageMechanism
virtual void StopUsingStorageMechanism (const TStorageMechanism &)
Interface Category:
API.
Purpose:
Informs the model that the storage mechanism is no longer available for use.
Calling Context:
Called by the Compound Document Framework when a model is removed from the embedding hierarchy.
Parameters:
- const TStorageMechanism & -A compatible storage mechanism used to store this models persistent data.
Return Value:
None.
Exceptions:
Throws no exceptions, passes all exceptions through.
Concurrency:
Not multithread safe. Models contained in document components can be safely accessed concurrently by obtaining a TDocumentComponentReadEntry or TDocumentComponentWriteEntry prior to looking up the model from a reference.
Other Considerations:
None.
Member Function: TModel::IsContentEqual
virtual bool IsContentEqual (const TModel &) const
Interface Category:
API.
Purpose:
Compares the contents of this model to those of another.
Calling Context:
Call this function directly.
Parameters:
- const TModel & -The model to be compared to this model.
Return Value:
Returns true if contents of the two models are equal.
Exceptions:
Throws no exceptions, passes all exceptions through.
Concurrency:
Not multithread safe. Models contained in document components can be safely accessed concurrently by obtaining a TDocumentComponentReadEntry or TDocumentComponentWriteEntry prior to looking up the model from a reference.
Other Considerations:
None.
Member Function: TModel::ContentHash
virtual HashResult ContentHash () const
Interface Category:
API.
Purpose:
Speeds content comparison. IsContentEqual does not need to be called if the hash values of two models are not identical.
Calling Context:
Call this function directly.
Parameters:
Return Value:
Returns the hash value for model content.
Exceptions:
Throws no exceptions, passes all exceptions through.
Concurrency:
Not multithread safe. Models contained in document components can be safely accessed concurrently by obtaining a TDocumentComponentReadEntry or TDocumentComponentWriteEntry prior to looking up the model from a reference.
Other Considerations:
None.
Member Function: TModel::GetTimeStamp
TPseudoTimeStamp GetTimeStamp () const
Interface Category:
API.
Purpose:
Provides access to the model's time stamp. This stamp is updated every time data held by the model is modified.
Calling Context:
Call this function directly.
Parameters:
Return Value:
Returns the model's time stamp.
Exceptions:
Throws no exceptions, passes all exceptions through.
Concurrency:
Not multithread safe. Models contained in document components can be safely accessed concurrently by obtaining a TDocumentComponentReadEntry or TDocumentComponentWriteEntry prior to looking up the model from a reference.
Other Considerations:
None.
Member Function: TModel::IsAnchorable
virtual bool IsAnchorable () const
Interface Category:
API.
Purpose:
Queries the model on whether it supports creating anchors on its data.
Calling Context:
Call this function directly.
Parameters:
Return Value:
Returns true if the model supports anchors. true is also returned by default.
Exceptions:
Throws no exceptions, passes all exceptions through.
Concurrency:
Not multithread safe. Models contained in document components can be safely accessed concurrently by obtaining a TDocumentComponentReadEntry or TDocumentComponentWriteEntry prior to looking up the model from a reference.
Other Considerations:
None.
Member Function: TModel::IsReadable
virtual bool IsReadable () const
Interface Category:
API.
Purpose:
Queries the model on whether it allows copying of its data.
Calling Context:
Call this function directly. Typically used by commands that copy data.
Parameters:
Return Value:
Returns true if the model allows data to be copied. It also returns true by default.
Exceptions:
Throws no exceptions, passes all exceptions through.
Concurrency:
Not multithread safe. Models contained in document components can be safely accessed concurrently by obtaining a TDocumentComponentReadEntry or TDocumentComponentWriteEntry prior to looking up the model from a reference.
Other Considerations:
None.
Member Function: TModel::IsWriteable
virtual bool IsWriteable () const
Interface Category:
API.
Purpose:
Queries the model as to whether it allows its data to be modified.
Calling Context:
Call this function directly.
Parameters:
Return Value:
Returns true if model is writable. The default delegates to storage.
Exceptions:
Throws no exceptions, passes all exceptions through.
Concurrency:
Not multithread safe. Models contained in document components can be safely accessed concurrently by obtaining a TDocumentComponentReadEntry or TDocumentComponentWriteEntry prior to looking up the model from a reference.
Other Considerations:
None.
Member Function: TModel::IsAnnotatable
virtual bool IsAnnotatable () const
Interface Category:
API.
Purpose:
Queries the model as to whether annotation is allowed.
Calling Context:
Call this function directly.
Parameters:
Return Value:
Returns true if annotation is allowed. The default returns IsWriteable.
Exceptions:
Throws no exceptions, passes all exceptions through.
Concurrency:
Not multithread safe. Models contained in document components can be safely accessed concurrently by obtaining a TDocumentComponentReadEntry or TDocumentComponentWriteEntry prior to looking up the model from a reference.
Other Considerations:
None.
Member Function: TModel::IsOrphanable
virtual bool IsOrphanable () const
Interface Category:
API.
Purpose:
Queries the model as to whether orphaning of the model data is allowed.
Calling Context:
Call this function directly.
Parameters:
Return Value:
Returns true if orphaning is allowed. The default returns IsOrphanable.
Exceptions:
Throws no exceptions, passes all exceptions through.
Concurrency:
Not multithread safe. Models contained in document components can be safely accessed concurrently by obtaining a TDocumentComponentReadEntry or TDocumentComponentWriteEntry prior to looking up the model from a reference.
Other Considerations:
None.
Member Function: TModel::AdoptAnchor
virtual void AdoptAnchor (TModelAnchor * anAnchor)
Interface Category:
API.
Purpose:
Adopts anAnchor into this model. The anchor must be a sticky selection on data contained in this model. This model takes responsibility for the storage of anAnchor. The notification kAddedAnchor is generated.
Calling Context:
Called from a command.
Parameters:
Return Value:
None.
Exceptions:
Throws TDocumentException::kAnchorAlreadyInModel if this anchor has already been adopted into the model.
Throws TDocumentException::kWrongModelForAnchor if this anchor is for data in another model.
Throws TDocumentException::kNILAnchor if this anchor is NIL.
Concurrency:
Not multithread safe. Models contained in document components can be safely accessed concurrently by obtaining a TDocumentComponentReadEntry or TDocumentComponentWriteEntry prior to looking up the model from a reference.
Other Considerations:
Preconditions:
Assertion (TAnchor* != NIL).
Assertion (LookupAnchor(*TAnchor) ==NIL).
Assertion (GetReference() ==TModelReference(TAnchor->GetReference())).
Postconditions:
Assert (LookupAnchor(*TAnchor) != NIL).
Member Function: TModel::OrphanAnchor
virtual TModelAnchor * OrphanAnchor (const TModelAnchorReference & anAnchor)
Interface Category:
API.
Purpose:
Orphans the anchor specified by anAnchor from this model.The orphaned anchor becomes the responsibility of the caller. The notification kRemovedAnchor is generated.
Calling Context:
Called by a command.
Parameters:
Return Value:
None.
Exceptions:
Throws TCompoundDocumentException::kAnchorDoesNotExist if the anchor does not exist for this model.
Concurrency:
Not multithread safe. Models contained in document components can be safely accessed concurrently by obtaining a TDocumentComponentReadEntry or TDocumentComponentWriteEntry prior to looking up the model from a reference.
Other Considerations:
Preconditions:
Assertion (LookupAnchor(anAnchor) ==true).
Postconditions:
Assertion (LookupAnchor(anAnchor) ==false).
Member Function: TModel::LookupAnchor
virtual TModelAnchor * LookupAnchor (const TModelAnchorReference & anAnchor) const
Interface Category:
API.
Purpose:
Given a TModelAnchorReference to an anchor in this model, returns the real TModelAnchor object that anAnchor is a reference for.
Calling Context:
Call this function directly.
Parameters:
Return Value:
Returns the anchor referred to by the reference.
Exceptions:
Throws TCompoundDocumentException::KAnchorDoesNotExist if the anchor was not found in the model.
Concurrency:
Not multithread safe. Models contained in document components can be safely accessed concurrently by obtaining a TDocumentComponentReadEntry or TDocumentComponentWriteEntry prior to looking up the model from a reference.
Other Considerations:
None.
Member Function: TModel::CreateAnchorIterator
virtual TIteratorOver < TModelAnchor > * CreateAnchorIterator (bool includeInvisibleAnchors =false) const
Interface Category:
API.
Purpose:
Returns an iterator for all the anchors contained in this model.
Calling Context:
Call this function directly.
Parameters:
- bool includeInvisibleAnchors =false -Includes invisible anchors in the iteration if this parameter is true.
Return Value:
Returns an iterator over the anchors in the model.
Exceptions:
Throws no exceptions, passes all exceptions through.
Concurrency:
Not multithread safe. Models contained in document components can be safely accessed concurrently by obtaining a TDocumentComponentReadEntry or TDocumentComponentWriteEntry prior to looking up the model from a reference.
Other Considerations:
None.
Member Function: TModel::GetWholeModelAnchorReference
virtual TModelAnchorReference GetWholeModelAnchorReference ()
Interface Category:
API.
Purpose:
Returns a reference for this model's whole model dynamic anchor. This anchor always contains a selection on the entire contents of the model.
Calling Context:
Call this function directly.
Parameters:
Return Value:
Returns a reference to the whole model anchor for this model.
Exceptions:
Throws no exceptions, passes all exceptions through.
Concurrency:
Not multithread safe. Models contained in document components can be safely accessed concurrently by obtaining a TDocumentComponentReadEntry or TDocumentComponentWriteEntry prior to looking up the model from a reference.
Other Considerations:
None.
Member Function: TModel::AdoptLink
virtual void AdoptLink (TModelLink * aLink)
Interface Category:
API.
Purpose:
Adopts aLink into this model. The link must be out of an anchor contained in this model. The notification kAddedLink is generated.
Calling Context:
Must be called by a command.
Parameters:
Return Value:
None.
Exceptions:
Throws TCompoundDocumentException::kWrongAnchorForLink if the link is not out of an anchor already in this model.
Throws TCompoundDocumentException::kLinkAlreadyInAnchor if the link is already in the anchor.
Throws TCompoundDocumentException::kNILLLink if the link is NIL.
Concurrency:
Not multithread safe. Models contained in document components can be safely accessed concurrently by obtaining a TDocumentComponentReadEntry or TDocumentComponentWriteEntry prior to looking up the model from a reference.
Other Considerations:
Preconditions:
Assertion (LookupAnchor(TModelAnchorReference(*aLink)) != NIL).
Assertion (LookupLink(*aLink) ==NIL).
Postconditions:
Assertion (LookupLink(*aLink) != NIL).
Member Function: TModel::OrphanLink
virtual TModelLink * OrphanLink (const TModelLinkReference & aLink)
Interface Category:
API.
Purpose:
Orphans the link specified by aLink from this model. The orphaned link becomes the responsibility of the caller. The notification kRemovedLink is generated.
Calling Context:
Called by a command.
Parameters:
Return Value:
Returns the orphaned link.
Exceptions:
Throws TCompoundDocumentException::kAnchorDoesNotExist if the link is not out of an anchor already in this model.
Throws TCompoundDocumentException::kLinkDoesNotExist if the link is not in the anchor.
Concurrency:
Not multithread safe. Models contained in document components can be safely accessed concurrently by obtaining a TDocumentComponentReadEntry or TDocumentComponentWriteEntry prior to looking up the model from a reference.
Other Considerations:
Preconditions:
Assertion (LookupAnchor(TModelAnchorReference(*aLink)) != NIL).
Assertion (LookupLink(*aLink) != NIL).
Postconditions:
Assertion (LookupLink(*aLink) ==NIL).
Member Function: TModel::LookupLink
virtual TModelLink * LookupLink (const TModelLinkReference & aLink) const
Interface Category:
API.
Purpose:
Given a TModelLinkReference, returns the real TModelLink object that aLink is a reference for.
Calling Context:
Call this function directly.
Parameters:
Return Value:
Returns the link the aLink refers to.
Exceptions:
Throws TCompoundDocumentException::kAnchorDoesNotExist if the link is not out of an anchor already in this model.
Throws TCompoundDocumentException::kLinkDoesNotExist if the link is not in the anchor.
Concurrency:
Not multithread safe. Models contained in document components can be safely accessed concurrently by obtaining a TDocumentComponentReadEntry or TDocumentComponentWriteEntry prior to looking up the model from a reference.
Other Considerations:
None.
Member Function: TModel::AddStyle
void AddStyle (const TModelStyle & theStyle)
Interface Category:
API.
Purpose:
Adds a style to this model's style set.
Calling Context:
Called by a command.
Parameters:
- const TModelStyle & theStyle -The style to be added.
Return Value:
None.
Exceptions:
Throws no exceptions, passes all exceptions through.
Concurrency:
Not multithread safe. Models contained in document components can be safely accessed concurrently by obtaining a TDocumentComponentReadEntry or TDocumentComponentWriteEntry prior to looking up the model from a reference.
Other Considerations:
None.
Member Function: TModel::DeleteStyle
void DeleteStyle (const TModelStyle & patternToMatch)
Interface Category:
API.
Purpose:
Deletes a style contained in this model if it exists.
Calling Context:
Called by a command.
Parameters:
- const TModelStyle & patternToMatch -Deletes all styles matching this pattern.
Return Value:
None.
Exceptions:
Throws no exceptions, passes all exceptions through.
Concurrency:
Not multithread safe. Models contained in document components can be safely accessed concurrently by obtaining a TDocumentComponentReadEntry or TDocumentComponentWriteEntry prior to looking up the model from a reference.
Other Considerations:
None.
Member Function: TModel::LookupStyle
- const TModelStyle * LookupStyle (const TModelStyle & patternToMatch, bool includeAncestors =false) const
- const TModelStyle * LookupStyle (const TModelStyle & patternToMatch, const TDocumentComponentReference & theChild, bool includeAncestors =false) const
Interface Category:
API.
Purpose:
- Looks up up a style matching the specified pattern in the model's style set.
- Looks up a style matching the specified pattern given a document component reference in the model. The default looks up the style in the model's style set.
Calling Context:
- Call this function directly.
- Call this function directly.
Parameters:
- const TModelStyle & patternToMatch -Looks up a style matching this pattern.
- bool includeAncestors =false -Includes ancestors of models in the search if true.
- const TModelStyle & patternToMatch -Looks up a style matching this pattern.
- const TDocumentComponentReference & theChild -The document component reference context for lookup.
- bool includeAncestors =false -Includes ancestors of models in the search if true.
Return Value:
Returns the style if found, NIL otherwise.
Exceptions:
Throws no exceptions, passes all exceptions through.
Concurrency:
Not multithread safe. Models contained in document components can be safely accessed concurrently by obtaining a TDocumentComponentReadEntry or TDocumentComponentWriteEntry prior to looking up the model from a reference.
Other Considerations:
None.
Member Function: TModel::DeleteAllStyles
void DeleteAllStyles ()
Interface Category:
API.
Purpose:
Deletes all the styles contained in this model's style set.
Calling Context:
Called by a command.
Parameters:
Return Value:
None.
Exceptions:
Throws no exceptions, passes all exceptions through.
Concurrency:
Not multithread safe. Models contained in document components can be safely accessed concurrently by obtaining a TDocumentComponentReadEntry or TDocumentComponentWriteEntry prior to looking up the model from a reference.
Other Considerations:
None.
Member Function: TModel::CreateStyleIterator
TIteratorOver < TModelStyle > * CreateStyleIterator () const
Interface Category:
API.
Purpose:
Creates an iterator over the styles in this model's style set.
Calling Context:
Call this function directly.
Parameters:
Return Value:
Returns an iterator providing iteration over all the styles in the model's style set.
Exceptions:
Throws no exceptions, passes all exceptions through.
Concurrency:
Not multithread safe. Models contained in document components can be safely accessed concurrently by obtaining a TDocumentComponentReadEntry or TDocumentComponentWriteEntry prior to looking up the model from a reference.
Other Considerations:
None.
Member Function: TModel::DeleteStore
virtual void DeleteStore()
Interface Category:
API.
Purpose:
Deletes the TDocumentComponentStore associated with the component that contains this model. The component stores for all children of the component are also deleted. If the model is not contained in a component, the stores of any child components are still deleted.
Calling Context:
This is called when the deletion of a component is committed, and the storage will never be used again.
Parameters:
Return Value:
None.
Exceptions:
Throws no exceptions, passes all exceptions through.
Concurrency:
Not multithread safe. Models contained in document components can be safely accessed concurrently by obtaining a TDocumentComponentReadEntry or TDocumentComponentWriteEntry prior to looking up the model from a reference.
Other Considerations:
None.
Member Function: TModel::GetAddedLinkInterest
TModelInterest GetAddedLinkInterest () const
Interface Category:
API.
Purpose:
Returns an interest in notifications of links added to this model. The notifications are delivered in a TModelLinkNotification object.
Calling Context:
Call this function directly.
Parameters:
Return Value:
Returns the interest.
Exceptions:
Throws no exceptions, passes all exceptions through.
Concurrency:
Not multithread safe. Models contained in document components can be safely accessed concurrently by obtaining a TDocumentComponentReadEntry or TDocumentComponentWriteEntry prior to looking up the model from a reference.
Other Considerations:
None.
Member Function: TModel::GetRemovedLinkInterest
TModelInterest GetRemovedLinkInterest () const
Interface Category:
API.
Purpose:
Returns an interest in notifications of links removed from this model. The notifications are delivered in a TModelLinkNotification object.
Calling Context:
Call this function directly.
Parameters:
Return Value:
Returns the interest.
Exceptions:
Throws no exceptions, passes all exceptions through.
Concurrency:
Not multithread safe. Models contained in document components can be safely accessed concurrently by obtaining a TDocumentComponentReadEntry or TDocumentComponentWriteEntry prior to looking up the model from a reference.
Other Considerations:
None.
Member Function: TModel::GetAddedAnchorInterest
TModelInterest GetAddedAnchorInterest () const
Interface Category:
API.
Purpose:
Returns an interest in notifications of anchors added to this model. This notifications are delivered in a TModelAnchorNotification object.
Calling Context:
Call this function directly.
Parameters:
Return Value:
Returns the interest.
Exceptions:
Throws no exceptions, passes all exceptions through.
Concurrency:
Not multithread safe. Models contained in document components can be safely accessed concurrently by obtaining a TDocumentComponentReadEntry or TDocumentComponentWriteEntry prior to looking up the model from a reference.
Other Considerations:
None.
Member Function: TModel::GetRemovedAnchorInterest
TModelInterest GetRemovedAnchorInterest () const
Interface Category:
API.
Purpose:
Returns an interest in notifications of anchors removed from this model. The notifications are delivered in a TModelAnchorNotification object.
Calling Context:
Call this function directly.
Parameters:
Return Value:
Returns the interest.
Exceptions:
Throws no exceptions, passes all exceptions through.
Concurrency:
Not multithread safe. Models contained in document components can be safely accessed concurrently by obtaining a TDocumentComponentReadEntry or TDocumentComponentWriteEntry prior to looking up the model from a reference.
Other Considerations:
None.
Member Function: TModel::GetAnchorContentsReplacedInterest
TModelInterest GetAnchorContentsReplacedInterest () const
Interface Category:
API.
Purpose:
Returns an interest in notifications on changes to data in this model that result from data exchange through an anchor. Notifications are delivered in a TModelAnchorNotification object.
Calling Context:
Call this function directly.
Parameters:
Return Value:
Returns the interest.
Exceptions:
Throws no exceptions, passes all exceptions through.
Concurrency:
Not multithread safe. Models contained in document components can be safely accessed concurrently by obtaining a TDocumentComponentReadEntry or TDocumentComponentWriteEntry prior to looking up the model from a reference.
Other Considerations:
None.
Member Function: TModel::GetSelectedContentsClearedInterest
TModelInterest GetSelectedContentsClearedInterest () const
Interface Category:
API.
Purpose:
Returns an interest in notifications on data deleted from this model that resulted from data exchange through a selection. Notifications are delivered in a TDualSelectionNotification object.
Calling Context:
Call this function directly.
Parameters:
Return Value:
Returns the interest.
Exceptions:
Throws no exceptions, passes all exceptions through.
Concurrency:
Not multithread safe. Models contained in document components can be safely accessed concurrently by obtaining a TDocumentComponentReadEntry or TDocumentComponentWriteEntry prior to looking up the model from a reference.
Other Considerations:
None.
Member Function: TModel::GetSelectedContentsReplacedInterest
TModelInterest GetSelectedContentsReplacedInterest () const
Interface Category:
API.
Purpose:
Returns an interest in notifications on changes to data in this model that result from data exchange through a selection. Notifications are delivered in a TDualSelectionNotification object.
Calling Context:
Call this function directly.
Parameters:
Return Value:
Returns the interest.
Exceptions:
Throws no exceptions, passes all exceptions through.
Concurrency:
Not multithread safe. Models contained in document components can be safely accessed concurrently by obtaining a TDocumentComponentReadEntry or TDocumentComponentWriteEntry prior to looking up the model from a reference.
Other Considerations:
None.
Member Function: TModel::GetStaleDataOnLinkInterest
TModelInterest GetStaleDataOnLinkInterest () const
Interface Category:
API.
Purpose:
Returns an interest in notifications on data changing at the other end of links contained in this document. Notifications are delivered in a TModelLinkNotification object.
Calling Context:
Call this function directly.
Parameters:
Return Value:
Returns the interest.
Exceptions:
Throws no exceptions, passes all exceptions through.
Concurrency:
Not multithread safe. Models contained in document components can be safely accessed concurrently by obtaining a TDocumentComponentReadEntry or TDocumentComponentWriteEntry prior to looking up the model from a reference.
Other Considerations:
None.
Member Function: TModel::GetAllChangesInterest
TModelInterest GetAllChangesInterest () const
Interface Category:
API.
Purpose:
Returns an interest in all notifications generated by this model. The notifications are delivered with the interest and type of that specified by the specific interest.
Calling Context:
Call this function directly.
Parameters:
Return Value:
Returns the interest.
Exceptions:
Throws no exceptions, passes all exceptions through.
Concurrency:
Not multithread safe. Models contained in document components can be safely accessed concurrently by obtaining a TDocumentComponentReadEntry or TDocumentComponentWriteEntry prior to looking up the model from a reference.
Other Considerations:
None.
Member Function: TModel::NotifyOfChange
virtual void NotifyOfChange (const TNotification &)
Interface Category:
API.
Purpose:
Notifies clients that a change has occurred in this model. The time stamp for this model is updated.
Calling Context:
Called by derived classes and client selections.
Parameters:
- const TNotification & -The notification to be propagated to clients.
Return Value:
None.
Exceptions:
Throws no exceptions, passes all exceptions through.
Concurrency:
Not multithread safe. Models contained in document components can be safely accessed concurrently by obtaining a TDocumentComponentReadEntry or TDocumentComponentWriteEntry prior to looking up the model from a reference.
Other Considerations:
None.
Member Function: TModel::NotifyButNoChange
virtual void NotifyButNoChange (const TNotification &) const
Interface Category:
API.
Purpose:
Notifies clients of the status in this model. This member function should not be used to notify of changes to the model, because it does not update the time stamp. It can be used to notify of the availability of some remotely accessed data.
Calling Context:
Called by derived classes.
Parameters:
- const TNotification & -The notification to be propagated to clients.
Return Value:
None.
Exceptions:
Throws no exceptions, passes all exceptions through.
Concurrency:
Not multithread safe. Models contained in document components can be safely accessed concurrently by obtaining a TDocumentComponentReadEntry or TDocumentComponentWriteEntry prior to looking up the model from a reference.
Other Considerations:
None.
Member Function: TModel::operator=
TModel & operator =(const TModel &)
Interface Category:
API.
Purpose:
Assignment operator.
Calling Context:
Called when an object is assigned to another compatible object.
Parameters:
- TModel & -The right-hand side object.
Return Value:
Returns a reference to the left-hand side object.
Exceptions:
Throws no exceptions, passes all exceptions through.
Concurrency:
Not multithread safe. Models contained in document components can be safely accessed concurrently by obtaining a TDocumentComponentReadEntry or TDocumentComponentWriteEntry prior to looking up the model from a reference.
Other Considerations:
None.
Member Function: TModel::operator>>=
virtual TStream & operator >>=(TStream & towhere) const
Interface Category:
API.
Purpose:
Stream-out operator.
Calling Context:
Called to stream out data.
Parameters:
- TStream & towhere -The stream to which the object streams itself out.
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. Models contained in document components can be safely accessed concurrently by obtaining a TDocumentComponentReadEntry or TDocumentComponentWriteEntry prior to looking up the model from a reference.
Other Considerations:
None.
Member Function: TModel::operator<<=
virtual TStream & operator <<= (TStream & fromwhere)
Interface Category:
API.
Purpose:
Stream-in operator.
Calling Context:
Called to stream in data.
Parameters:
- TStream & fromwhere -The stream from which the object streams itself in.
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. Models contained in document components can be safely accessed concurrently by obtaining a TDocumentComponentReadEntry or TDocumentComponentWriteEntry prior to looking up the model from a reference.
Other Considerations:
None.
- TModel (const TDocumentReference &)
- TModel ()
- TModel (const TModel &)
Interface Category:
API.
Purpose:
- Create a model to be contained in a specific document.
- Default constructor.
- Copy constructor.
Calling Context:
- Called by derived classes.
- Called by derived classes.
- Called by derived classes to copy an object.
Parameters:
- const TDocumentReference & -The document that will contain this model.
- Takes no parameters.
- const TModel & -The model to copy.
Return Value:
None.
Exceptions:
Throws no exceptions, passes all exceptions through.
Concurrency:
Not multithread safe. Models contained in document components can be safely accessed concurrently by obtaining a TDocumentComponentReadEntry or TDocumentComponentWriteEntry prior to looking up the model from a reference.
Other Considerations:
TModel is an abstract base class--all the constructors are protected. Do not instantiate this class.
Member Function: TModel::AddComponent
void AddComponent (TDocumentComponent *)
Interface Category:
API.
Purpose:
Adds an embedded child component for this model. Adds the component to the tree containing this model.
Calling Context:
Called by derived classes that support embedded components.
Parameters:
Return Value:
None.
Exceptions:
Throws no exceptions, passes all exceptions through.
Concurrency:
Not multithread safe. Models contained in document components can be safely accessed concurrently by obtaining a TDocumentComponentReadEntry or TDocumentComponentWriteEntry prior to looking up the model from a reference.
Other Considerations:
None.
Member Function: TModel::RemoveComponent
TDocumentComponent * RemoveComponent (TDocumentComponent &)
Interface Category:
API.
Purpose:
Removes an embedded document component previously added by this model.
Calling Context:
Called by derived classes that support embedded components.
Parameters:
Return Value:
Returns the document component that was removed by this function.
Exceptions:
Throws no exceptions, passes all exceptions through.
Concurrency:
Not multithread safe. Models contained in document components can be safely accessed concurrently by obtaining a TDocumentComponentReadEntry or TDocumentComponentWriteEntry prior to looking up the model from a reference.
Other Considerations:
None.
Member Function: TModel::IncrementTimeStamp
void IncrementTimeStamp ()
Interface Category:
API.
Purpose:
Increments the time stamp for this model. It indicates that the model has changed but does not notify clients. Do not call this function for any client visible changes. Use NotifyOfChange for those changes.
Calling Context:
Called by derived classes.
Parameters:
Return Value:
None.
Exceptions:
Throws no exceptions, passes all exceptions through.
Concurrency:
Not multithread safe. Models contained in document components can be safely accessed concurrently by obtaining a TDocumentComponentReadEntry or TDocumentComponentWriteEntry prior to looking up the model from a reference.
Other Considerations:
None.
Member Function: TModel::HandleLookupStyle
virtual const TModelStyle * HandleLookupStyle (const TModelStyle & patternToMatch, const TDocumentComponentReference & theChild) const
Interface Category:
API.
Purpose:
When a style is looked up on a model in a child component, it is looked up in the child component's model's attribute set. If not found and if the includeAncestors flag is true, then the model's HandleLookupStyle is called with the desired attribute and a reference to the child component. The model can delegate it to the its standard lookup or look up the attribute base on the child component reference.
Calling Context:
Called by derived classes.
Parameters:
- const TModelStyle & patternToMatch -The style to lookup.
- const TDocumentComponentReference & theChild -The child component to use as a context when looking up the style.
Return Value:
None.
Exceptions:
Throws no exceptions, passes all exceptions through.
Concurrency:
Not multithread safe. Models contained in document components can be safely accessed concurrently by obtaining a TDocumentComponentReadEntry or TDocumentComponentWriteEntry prior to looking up the model from a reference.
Other Considerations:
None.
Member Function: TModel::HandleApplyAnchorReferenceFixups
virtual void HandleApplyAnchorReferenceFixups (TDictionaryOf < TModelAnchorReference, TModelAnchorReference >& theFixups)
Interface Category:
API.
Purpose:
Provide derived classes an opportunity to fix up any references they may have to anchors in the model. The base class fixes up all references in anchor selections and links, but no others.
Calling Context:
Called only by TModel.
Parameters:
Return Value:
None.
Exceptions:
Throws no exceptions, passes all exceptions through.
Concurrency:
Not multithread safe. Models contained in document components can be safely accessed concurrently by obtaining a TDocumentComponentReadEntry or TDocumentComponentWriteEntry prior to looking up the model from a reference.
Other Considerations:
None.
Click the icon to mail questions or corrections about this material to Taligent personnel.
Copyright©1995 Taligent,Inc. All rights reserved.