// $Revision: 1.10 $ // Copyright (C) 1995 Taligent, Inc. All rights reserved. #if 0 --------------------------------------------------------------------------- > Class: | MMoving > Taxonomy Category: | ConcurrentGraphics | Movement Subsystem > Interface Category: | Sample. > Inherits From: | None. > Inherited By: | TAbstractActor > Purpose: | Behavior for objects that are moved by a TMoverThread. MMoving objects move over time rather than discrete steps. > Instantiation: | Allocate on the heap or the stack. > Deriving Classes: | TAbstractActor. > Concurrency: | _Not_ multithread safe. > Resource Use: | MMoving objects should only be controlled by (Added to) one TMoverThread at any given time. --------------------------------------------------------------------------- #endif #if 0 --------------------------------------------------------------------------- > Member Function: MMoving::MMoving ; | MMoving () > Interface Category: | Sample. > Purpose: | Default constructor. > Calling Context: | Called by derived classes. > Parameters: = Takes no parameters. > Return Value: | None. > Exceptions: | Throws no exceptions, passes all exceptions through. > Concurrency: | _Not_ multithread safe. > Other Considerations: | None. --------------------------------------------------------------------------- #endif #if 0 --------------------------------------------------------------------------- > Member Function: MMoving::PreMove ; | virtual void PreMove (const TTime & interval) > Interface Category: | Sample. > Purpose: | Provides opportunity for derived classes to set up a movement operation. > Calling Context: | Called by TMoverThread. > Parameters: = const TTime & interval -Amount of time that has passed since last move. > Return Value: | None. > Exceptions: | Throws no exceptions, passes all exceptions through. > Concurrency: | _Not_ multithread safe. > Other Considerations: | None. --------------------------------------------------------------------------- #endif #if 0 --------------------------------------------------------------------------- > Member Function: MMoving::PostMove ; | virtual void PostMove (const TTime & interval) > Interface Category: | Sample. > Purpose: | Derived classes can override to perform post-movement processing. > Calling Context: | Called by TMoverThread. > Parameters: = const TTime & interval -Amount of time that has passed since last move. _Always_ the same as value passed to PreMove. > Return Value: | None. > Exceptions: | Throws no exceptions, passes all exceptions through. > Concurrency: | _Not_ multithread safe. > Other Considerations: | None. --------------------------------------------------------------------------- #endif #if 0 --------------------------------------------------------------------------- > Member Function: MMoving::Move ; | virtual void Move (const TTime & interval) > Interface Category: | Sample. > Purpose: | Derived classes override to perform move operation. > Calling Context: | Called by TMoverThread. > Parameters: = const TTime & interval -Amount of time that has passed since last move. _Always_ the same as value passed to PreMove. > Return Value: | None. > Exceptions: | Throws no exceptions, passes all exceptions through. > Concurrency: | _Not_ multithread safe. > Other Considerations: | PreMove will _always_ be called before this member function and PostMove will _always_ be called after. However, Move will only be called if needed. --------------------------------------------------------------------------- #endif #if 0 --------------------------------------------------------------------------- > Member Function: MMoving::~ MMoving ; | virtual ~ MMoving () > Interface Category: | Sample. > Purpose: | Destructor. > Calling Context: | Called to destroy an object. > Parameters: = Takes no parameters. > Return Value: | None. > Exceptions: | Throws no exceptions, passes all exceptions through. > Concurrency: | _Not_ multithread safe. > Other Considerations: | None. --------------------------------------------------------------------------- #endif #if 0 --------------------------------------------------------------------------- > Class: | TMoverThread > Taxonomy Category: | ConcurrentGraphics | Movement Subsystem > Interface Category: | Sample. > Inherits From: | TPeriodicThread > Inherited By: | None. > Purpose: | Calls MMoving objects in order for them to perform movement processing when necessary. > Instantiation: | Allocate on the heap or the stack. > Deriving Classes: | None. > Concurrency: | _Not_ multithread safe. Thread _must_ be paused before Add, Remove, or RemoveAll member functions are called. > Resource Use: | MMoving objects are identified by their address, not by their semantic equality (by pointer comparison, not operator==). --------------------------------------------------------------------------- #endif #if 0 --------------------------------------------------------------------------- > Member Function: TMoverThread::Add ; | virtual void Add (MMoving * object) > Interface Category: | Sample. > Purpose: | Thread takes responsibility for the movement of the specified object. > Calling Context: | Called by clients. > Parameters: = MMoving * object -Object for thread to move. > Return Value: | None. > Exceptions: | Throws no exceptions, passes all exceptions through. > Concurrency: | _Not_ multithread safe. Thread _must_ be. > Other Considerations: | Thread _must_ be unstarted or paused before this member function is called. --------------------------------------------------------------------------- #endif #if 0 --------------------------------------------------------------------------- > Member Function: TMoverThread::Remove ; | virtual MMoving * Remove (MMoving & object) > Interface Category: | Sample. > Purpose: | Informs thread that it in not responsible for the movement of the specified object. > Calling Context: | Called by clients. > Parameters: = MMoving & object -Object mover thread should no longer move. > Return Value: | If thread was responsible for object, a pointer to the object is returned. If not, NULL is returned. > Exceptions: | Throws no exceptions, passes all exceptions through. > Concurrency: | _Not_ multithread safe. Thread _must_ be. > Other Considerations: | Thread _must_ be unstarted or paused before this member function is called. --------------------------------------------------------------------------- #endif #if 0 --------------------------------------------------------------------------- > Member Function: TMoverThread::RemoveAll ; | virtual void RemoveAll () > Interface Category: | Sample. > Purpose: | Informs thread that it in not responsible for the movement of any objects. > Calling Context: | Called by clients. > Parameters: = Takes no parameters. > Return Value: | None. > Exceptions: | Throws no exceptions, passes all exceptions through. > Concurrency: | _Not_ multithread safe. Thread _must_ be. > Other Considerations: | Thread _must_ be unstarted or paused before this member function is called. --------------------------------------------------------------------------- #endif #if 0 --------------------------------------------------------------------------- > Member Function: TMoverThread::HandleIntervalPassed ; | virtual void HandleIntervalPassed (const TTime & interval) > Interface Category: | Sample. > Purpose: | Moves objects that need to be moved. > Calling Context: | Called by base class. > Parameters: = const TTime & interval -Amount of time that has passed since last movement operation. > Return Value: | None. > Exceptions: | Throws no exceptions, passes all exceptions through. > Concurrency: | _Not_ multithread safe. Thread _must_ be. > Other Considerations: | None. --------------------------------------------------------------------------- #endif #if 0 --------------------------------------------------------------------------- > Member Function: TMoverThread::GetDelayInterval ; | virtual void GetDelayInterval (TTime & interval) const > Interface Category: | Sample. > Purpose: | Returns amount of time until next object should be moved. > Calling Context: | Called by base class. > Parameters: = TTime & interval -Set to the amount time of that may pass before another object needs to be moved. > Return Value: | None. > Exceptions: | Throws no exceptions, passes all exceptions through. > Concurrency: | _Not_ multithread safe. Thread _must_ be. > Other Considerations: | None. --------------------------------------------------------------------------- #endif #if 0 --------------------------------------------------------------------------- > Member Function: TMoverThread::~ TMoverThread ; | virtual ~ TMoverThread () > Interface Category: | Sample. > Purpose: | Destructor. > Calling Context: | Called to destroy an object. > Parameters: = Takes no parameters. > Return Value: | None. > Exceptions: | Throws no exceptions, passes all exceptions through. > Concurrency: | _Not_ multithread safe. Thread _must_ be. > Other Considerations: | None. --------------------------------------------------------------------------- #endif #if 0 --------------------------------------------------------------------------- > Member Function: TMoverThread::TMoverThread ; | TMoverThread (const TTime & moveInterval =kDefaultMoveInterval) > Interface Category: | Sample. > Purpose: | Creates a mover thread that moves object at most once per specified interval. > Calling Context: | Called by clients. > Parameters: = Takes no parameters. > Return Value: | None. > Exceptions: | Throws no exceptions, passes all exceptions through. > Concurrency: | _Not_ multithread safe. > Other Considerations: | None. --------------------------------------------------------------------------- #endif