Class: TStreamTestOf

Declaration: NewStreamTest.h

Taxonomy Categories:

Member Functions:


Interface Category:

Developer Tool Programmer Interface.

Inherits From:

TBaseStreamTest

Inherited By:

None.

Purpose:

TStreamTestOf is a template class derived from TBaseStreamTest. It tests the flattening and resurrecting of the target using the streaming of the target object using a streamer (TAbstractStreamer).

Instantiation:

Allocate on the heap or the stack.

Deriving Classes:

TStreamTestOf can be used directly only if the target, comparator, and streamer are set outside the test before running the test. Otherwise, create a derived class of TStreamTestOf and overload the SetupComparator function to specify which comparator to use for the test, the SetupStreamer function to specify which streamer to use for the test, and the CreateNewTarget function to create the target. The TStreamTestOf macros can be used to create your derived class and define all the functions you need to override.

Concurrency:

Not multithread safe.

Resource Use:

No special requirements.

Member Function: TStreamTestOf::TStreamTestOf

  1. TStreamTestOf ()
  2. TStreamTestOf (const TStreamTestOf < AType > & that)

Interface Category:

Developer Tool Programmer Interface.

Purpose:

  1. Default constructor.
  2. Copy constructor.

Calling Context:

  1. Called by the stream-in operators and RunTest.
  2. Called to copy an object.

Parameters:

Return Value:

None.

Exceptions:

Throws no exceptions, passes all exceptions through.

Concurrency:

Not multithread safe.

Other Considerations:

None.

Member Function: TStreamTestOf::~TStreamTestOf

virtual ~ TStreamTestOf ()

Interface Category:

Developer Tool Programmer Interface.

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.

Other Considerations:

None.

Member Function: TStreamTestOf::operator=

TStreamTestOf < AType > & operator =(const TStreamTestOf < AType > & that)

Interface Category:

Developer Tool Programmer Interface.

Purpose:

Assignment operator.

Calling Context:

Called when an object is assigned to another compatible object.

Parameters:

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.

Member Function: TStreamTestOf::GetTargetClassNameAsString

virtual const char * GetTargetClassNameAsString () const

Interface Category:

Developer Tool Programmer Interface.

Purpose:

Returns the name of the target class.

Calling Context:

Called by Test framework. Do not call this function directly.

Parameters:

Return Value:

Returns the name of the target class.

Exceptions:

Throws no exceptions, passes all exceptions through.

Concurrency:

Not multithread safe.

Other Considerations:

None.

Member Function: TStreamTestOf::CreateNewTarget

virtual void * CreateNewTarget () const

Interface Category:

Developer Tool Programmer Interface.

Purpose:

Returns a NIL pointer. Derived classes must overload CreateNewTarget to create the target object.

Calling Context:

Called by Test framework. Do not call this function directly.

Parameters:

Return Value:

Returns a NIL pointer.

Exceptions:

Throws no exceptions, passes all exceptions through.

Concurrency:

Not multithread safe.

Other Considerations:

Derived classes must overload CreateNewTarget to create the target object.

Member Function: TStreamTestOf::DeleteTarget

virtual void DeleteTarget (void *) const

Interface Category:

Developer Tool Programmer Interface.

Purpose:

Deletes the given target object after casting it to the target class to invoke the correct destructor.

Calling Context:

Called by Test framework. Do not 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: TStreamTestOf::StreamTarget

virtual void * StreamTarget ()

Interface Category:

Developer Tool Programmer Interface.

Purpose:

Streams the target object to the test stream using the streamer, rewinds the stream, streams the target back in, and returns the streamed in object.

Calling Context:

Called by Test framework. Do not call this function directly.

Parameters:

Return Value:

Returns the streamed in target object.

Exceptions:

Throws no exceptions, passes all exceptions through.

Concurrency:

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