// $Revision: 1.10 $ // Copyright (C) 1995 Taligent, Inc. All rights reserved. #if 0 --------------------------------------------------------------------------- > Class: | TCollisionNotification > Taxonomy Category: | ConcurrentGraphics | Collision Subsystem > Interface Category: | Sample. > Inherits From: | TNotification > Inherited By: | None. > Purpose: | Sends notification to clients who connected to interest created by MColliding::CreateCollisionInterest. > Instantiation: | Allocate on the heap or the stack. > Deriving Classes: | None. > Concurrency: | _Not_ multithread safe. > Resource Use: | TCollisionNotification objects do not own the object returned by GetObject and should not be streamed because they cannot safely flatten and resurrect that object. --------------------------------------------------------------------------- #endif #if 0 --------------------------------------------------------------------------- > Member Function: TCollisionNotification::Hash ; | virtual long Hash () const > Interface Category: | Sample. > Purpose: | Hash function. > Calling Context: | Called by clients. > Parameters: = Takes no parameters. > Return Value: | Hash value. > Exceptions: | Throws no exceptions, passes all exceptions through. > Concurrency: | _Not_ multithread safe. > Other Considerations: | None. --------------------------------------------------------------------------- #endif #if 0 --------------------------------------------------------------------------- > Member Function: TCollisionNotification::GetObject ; | virtual MColliding * GetObject () const > Interface Category: | Sample. > Purpose: | Returns object that might have caused a collision. > Calling Context: | Called by clients. > Parameters: = Takes no parameters. > Return Value: | Object that might have caused a collision. > Exceptions: | Throws no exceptions, passes all exceptions through. > Concurrency: | _Not_ multithread safe. > Other Considerations: | None. --------------------------------------------------------------------------- #endif #if 0 --------------------------------------------------------------------------- > Member Function: TCollisionNotification::~ TCollisionNotification ; | virtual ~ TCollisionNotification () > 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 --------------------------------------------------------------------------- > Member Function: TCollisionNotification::TCollisionNotification ; | 1. TCollisionNotification (const TInterest & interest, MColliding * object) | 2. TCollisionNotification (TInterest * interestToAdopt, MColliding * object) | 3. TCollisionNotification (const TCollisionNotification & source) > Interface Category: | Sample. > Purpose: | 1. Copies interest and keeps a reference to the MColliding object. | 2. Adopts the interest and keeps a reference to the MColliding object. | 3. Copy constructor. > Calling Context: | 1. Called by clients. | 2. Called by clients and MColliding::NotifiyCollisionPossible. | 3. Called to copy an object. > Parameters: = 1. const TInterest & interest -Interest to copy. = 1. MColliding * object -Object that caused collision. = 2. TInterest * interestToAdopt -Interest to adopt. = 2. MColliding * object -Object that caused collision. = 3. const TCollisionNotification & source -Interest to copy. > Return Value: | None. > Exceptions: | Throws no exceptions, passes all exceptions through. > Concurrency: | _Not_ multithread safe. > Other Considerations: | None. --------------------------------------------------------------------------- #endif #if 0 --------------------------------------------------------------------------- > Member Function: TCollisionNotification::IsEqual ; | virtual bool IsEqual (const MCollectible * other) const > Interface Category: | Sample. > Purpose: | Compares this to another object for semantic equality. > Calling Context: | Called by clients. > Parameters: = const MCollectible * other -Object to compare to this. > Return Value: | Returns true if other and this are semantically equal. > Exceptions: | Throws no exceptions, passes all exceptions through. > Concurrency: | _Not_ multithread safe. > Other Considerations: | This is an obsolete interface. --------------------------------------------------------------------------- #endif #if 0 --------------------------------------------------------------------------- > Member Function: TCollisionNotification::operator =; | TCollisionNotification & operator =(const TCollisionNotification & source) > Interface Category: | Sample. > Purpose: | Assignment operator. > Calling Context: | Called when an object is assigned to another compatible object. > Parameters: = const TCollisionNotification & source -The object to copy. > Return Value: | A non-const reference to the left-hand side object. > Exceptions: | Throws no exceptions, passes all exceptions through. > Concurrency: | _Not_ multithread safe. > Other Considerations: | None. --------------------------------------------------------------------------- #endif #if 0 --------------------------------------------------------------------------- > Class: | MColliding > Taxonomy Category: | ConcurrentGraphics | Collision Subsystem > Interface Category: | Sample. > Inherits From: | None. > Inherited By: | TAbstractActor > Purpose: | Defined abstract protocol for use by TCollisionBehavior class and its derived classes. This class is derived classed and derived classes should call NotifyCollisionPossible when a collision might have occurred. > Instantiation: | Allocate on the heap or the stack. > Deriving Classes: | TAbstractActor. > Concurrency: | _Not_ multithread safe. > Resource Use: | No special requirements. --------------------------------------------------------------------------- #endif #if 0 --------------------------------------------------------------------------- > Member Function: MColliding::MColliding ; | MColliding () > Interface Category: | Sample. > Purpose: | Default constructor. > Calling Context: | Called by the stream-in operators and 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: MColliding::CreateCollisionInterest ; | virtual TInterest * CreateCollisionInterest () > Interface Category: | Sample. > Purpose: | Creates interest for collision notification. > Calling Context: | Called by clients, usually TCollisionBehavior. > Parameters: = Takes no parameters. > Return Value: | TInterest used to connect for notification. > Exceptions: | Throws no exceptions, passes all exceptions through. > Concurrency: | _Not_ multithread safe. > Other Considerations: | None. --------------------------------------------------------------------------- #endif #if 0 --------------------------------------------------------------------------- > Member Function: MColliding::NotifyCollisionPossible ; | virtual void NotifyCollisionPossible () > Interface Category: | Sample. > Purpose: | Notifies clients that a collision may have occurred. A TCollisionNotification is sent. > 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: MColliding::GetNotifier ; | virtual TNotifier & GetNotifier () const > Interface Category: | Sample. > Purpose: | Returns notifier used to send collision notification. > Calling Context: | Called by NotifyCollisionPossible. > Parameters: = Takes no parameters. > Return Value: | Notifier used to send collision notification. > Exceptions: | Throws no exceptions, passes all exceptions through. > Concurrency: | _Not_ multithread safe. > Other Considerations: | None. --------------------------------------------------------------------------- #endif #if 0 --------------------------------------------------------------------------- > Member Function: MColliding::~ MColliding ; | virtual ~ MColliding () > 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 --------------------------------------------------------------------------- > Member Function: MColliding::IsA ; | virtual bool IsA (const TType & type) const > Interface Category: | Sample. > Purpose: | Tests if a derived class of MColliding inherits from another class. > Calling Context: | Called by clients, usually TCollisionBehavior. > Parameters: = const TType & type -TType representing the class whose inheritance you wish to test for. > Return Value: | Returns true if derived class inherits from specified class. By default true is only returned for a value of TType(static_type_info(MColliding)); > Exceptions: | Throws no exceptions, passes all exceptions through. > Concurrency: | _Not_ multithread safe. > Other Considerations: | Derived classes should _always_ override this member function as follows: | bool TMyClass :: IsA(const TType& type) const | static const TType kType(static_type_info(TMyClass)); | return type ==kType ||baseClass::IsA(type); --------------------------------------------------------------------------- #endif #if 0 --------------------------------------------------------------------------- > Class: | TCollisionBehavior > Taxonomy Category: | Documented Samples | ConcurrentActors > Interface Category: | Sample. > Inherits From: | None. > Inherited By: | TBoundingBoxBehavior | TExplosionBehavior > Purpose: | Abstract behavior for interactions between actors. > Instantiation: | Allocate on the heap or the stack. > Deriving Classes: | TBoundingBoxBehavior, TExplosionBehavior. > Concurrency: | _Not_ multithread safe. > Resource Use: | No special requirements. --------------------------------------------------------------------------- #endif #if 0 --------------------------------------------------------------------------- > Member Function: TCollisionBehavior::DisconnectFrom ; | virtual void DisconnectFrom (MColliding & colliding) > Interface Category: | Sample. > Purpose: | Abstract function called to inform behavior that an MColliding object will no longer cause collisions. > Calling Context: | Called by clients. > Parameters: = MColliding & colliding -Object that won't cause collisions. > Return Value: | None. > Exceptions: | Throws no exceptions, passes all exceptions through. > Concurrency: | _Not_ multithread safe. > Other Considerations: | None. --------------------------------------------------------------------------- #endif #if 0 --------------------------------------------------------------------------- > Member Function: TCollisionBehavior::ConnectTo ; | virtual void ConnectTo (MColliding * colliding) > Interface Category: | Sample. > Purpose: | Abstract function called to inform behavior that an MColliding object may cause collision in the future. > Calling Context: | Called by clients. > Parameters: = MColliding * colliding -MColliding object that may cause collisions. > Return Value: | None. > Exceptions: | Throws no exceptions, passes all exceptions through. > Concurrency: | _Not_ multithread safe. > Other Considerations: | None. --------------------------------------------------------------------------- #endif #if 0 --------------------------------------------------------------------------- > Member Function: TCollisionBehavior::operator =; | TCollisionBehavior & operator =(const TCollisionBehavior & source) > Interface Category: | Sample. > Purpose: | Assignment operator. > Calling Context: | Called when an object is assigned to another compatible object. > Parameters: = const TCollisionBehavior & source -Behavior to copy. > Return Value: | A non-const reference to the left-hand side object. > Exceptions: | Throws no exceptions, passes all exceptions through. > Concurrency: | _Not_ multithread safe. > Other Considerations: | None. --------------------------------------------------------------------------- #endif #if 0 --------------------------------------------------------------------------- > Member Function: TCollisionBehavior::~ TCollisionBehavior ; | virtual ~ TCollisionBehavior () > 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 --------------------------------------------------------------------------- > Member Function: TCollisionBehavior::TCollisionBehavior ; | 1. TCollisionBehavior () | 2. TCollisionBehavior (const TCollisionBehavior & source) > Interface Category: | Sample. > Purpose: | 1. Default constructor. | 2. Copy constructor. > Calling Context: | 1. Called by the stream-in operators and derived classes. | 2. Called to copy an object. > Parameters: = 1. Takes no parameters. = 2. const TCollisionBehavior & source -Behavior to copy. > Return Value: | None. > Exceptions: | Throws no exceptions, passes all exceptions through. > Concurrency: | _Not_ multithread safe. > Other Considerations: | None. --------------------------------------------------------------------------- #endif #if 0 --------------------------------------------------------------------------- > Member Function: TCollisionBehavior::operator <<= ; | virtual TStream & operator <<= (TStream & fromStream) > Interface Category: | Document Samples ConcurrentActors > Purpose: | Stream-in operator. > Calling Context: | Called to stream in data. > Parameters: = TStream & fromStream -Stream to read data from. > Return Value: | Returns a reference to the stream the object streams itself in from. > Exceptions: | Throws no exceptions, passes all exceptions through. > Concurrency: | _Not_ multithread safe. > Other Considerations: | None. --------------------------------------------------------------------------- #endif #if 0 --------------------------------------------------------------------------- > Member Function: TCollisionBehavior::operator >>=; | virtual TStream & operator >>=(TStream & toStream) const > Interface Category: | Sample. > Purpose: | Stream-out operator. > Calling Context: | Called to stream out data. > Parameters: = TStream & toStream -Stream to write data to. > 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 --------------------------------------------------------------------------- #endif