Taxonomy Categories:
Member Functions:
Interface Category:
Developer Tool Programmer Interface.
Inherits From:
TBaseWellBehavedObjectTest
Inherited By:
None.
Purpose:
A template class derived from TBaseWellBehavedObjectTest. It tests the copying, streaming, and flattening of the target by creating TCopyTestOf, TFlattenResurrectTestOf, and TStreamTestOf tests for the target and running the tests. The test also does all the testing done by TBasePrimitiveComparisonTest by creating a TPrimitiveComparisonTestOf test for the target and running it.
Instantiation:
Allocate on the heap or the stack.
Deriving Classes:
TWellBehavedObjectTestOf should not be used directly. It is best to create a derived class of TWellBehavedObjectTestOf 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. You can also override the CreateEqualTarget and CreateUnequalTarget to create the objects used to check equality and inequality. The TWellBehavedObjectTestOf 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.
virtual ~ TWellBehavedObjectTestOf ()
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.
- TWellBehavedObjectTestOf ()
- TWellBehavedObjectTestOf (const TWellBehavedObjectTestOf < AType > & that)
Interface Category:
Developer Tool Programmer Interface.
Purpose:
- Default constructor.
- Copy constructor.
Calling Context:
- Called by the stream-in operators.
- Called to copy an object.
Parameters:
Return Value:
None.
Exceptions:
Throws no exceptions, passes all exceptions through.
Concurrency:
Not multithread safe.
Other Considerations:
None.
TWellBehavedObjectTestOf < AType > & operator =(const TWellBehavedObjectTestOf < 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.
virtual TStream & operator <<= (TStream & source)
Interface Category:
Developer Tool Programmer Interface.
Purpose:
Stream-in operator.
Calling Context:
Called to stream in data.
Parameters:
- TStream & source -The stream the object is streamed in 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:
The target object for the test is streamed in by the streaming operator.
virtual TStream & operator >>=(TStream & destination) const
Interface Category:
Developer Tool Programmer Interface.
Purpose:
Stream-out operator.
Calling Context:
Called to stream out data.
Parameters:
- TStream & destination -The stream the object is streamed out 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:
The target object for the test is streamed out by the streaming operator.
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.
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:
- void * -The target object.
Return Value:
None.
Exceptions:
Throws no exceptions, passes all exceptions through.
Concurrency:
Not multithread safe.
Other Considerations:
None.
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:
None.
virtual TBaseStreamTest * CreateStreamTest () const
Interface Category:
Developer Tool Programmer Interface.
Purpose:
Creates the stream test for the target class.
Calling Context:
Called by Test framework. Do not call this function directly.
Parameters:
Return Value:
Returns the stream test for the target class.
Exceptions:
Throws no exceptions, passes all exceptions through.
Concurrency:
Not multithread safe.
Other Considerations:
None.
virtual TBaseFlattenResurrectTest * CreateFlattenResurrectTest () const
Interface Category:
Developer Tool Programmer Interface.
Purpose:
Creates the flatten/resurrect test for the target class.
Calling Context:
Do not call this function directly.
Parameters:
Return Value:
Returns the flatten/resurrect test for the target class.
Exceptions:
Throws no exceptions, passes all exceptions through.
Concurrency:
Not multithread safe.
Other Considerations:
None.
virtual TBaseCopyTest * CreateCopyTest () const
Interface Category:
Developer Tool Programmer Interface.
Purpose:
Creates the copy test for the target class.
Calling Context:
Do not call this function directly.
Parameters:
Return Value:
Returns the copy test for the target class.
Exceptions:
Throws no exceptions, passes all exceptions through.
Concurrency:
Not multithread safe.
Other Considerations:
None.
virtual TBasePrimitiveComparisonTest * CreatePrimitiveComparisonTest () const
Interface Category:
Developer Tool Programmer Interface.
Purpose:
Creates the primitive comparison test for the target class.
Calling Context:
Do not call this function directly.
Parameters:
Return Value:
Returns the primitive comparison test for the target class.
Exceptions:
Throws no exceptions, passes all exceptions through.
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.