Taxonomy Categories:
Member Functions:
Interface Category:
Developer Tool Programmer Interface.
Inherits From:
TTest
Inherited By:
None.
Purpose:
A derived class of TTest that supports the model of multiple decisions functions applied to a single test target. Derive TTestMultiplexer when you want to test many functions on a single target object without creating a TTest derived class for each test.
Instantiation:
Allocate on the heap or the stack.
Deriving Classes:
This is a framework class. To use it, derive it and override the LoadDecisions function. Derived classes should not override any other function (not even the Test function). Derived classes should declare a new decision function for each test, define a key for each decision function, and register each key-decision function pair in LoadDecisions. LoadDecisions should call AddDecision for each key-decision function pair.
Concurrency:
Not multithread safe.
Resource Use:
No special requirements.
TTestMultiplexer & operator =(const TTestMultiplexer & copyIn)
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 ~ TTestMultiplexer ()
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.
virtual TStream & operator <<= (TStream & fromWhere)
Interface Category:
Developer Tool Programmer Interface.
Purpose:
Stream-in operator.
Calling Context:
Called to stream in data.
Parameters:
- TStream & fromWhere -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:
None.
virtual TStream & operator >>=(TStream & toWhere) const
Interface Category:
Developer Tool Programmer Interface.
Purpose:
Stream-out operator.
Calling Context:
Called to stream out data.
Parameters:
- TStream & toWhere -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:
None.
Member Function: TTestMultiplexer::CopyDecisionKeys
virtual void CopyDecisionKeys (TCollectionOf<TText>& textsToWhere) const
Interface Category:
Developer Tool Programmer Interface.
Purpose:
Adds all legal keys in the key-decision table to the given collection.
Calling Context:
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: TTestMultiplexer::SetDecisionKey
virtual bool SetDecisionKey (const TText & key)
Interface Category:
Developer Tool Programmer Interface.
Purpose:
Sets the key that is used in subsequent calls to Test.
Calling Context:
Call this function directly.
Parameters:
- const TText & key -The current key to be set to the given key.
Return Value:
Returns true if the current key is set to the given key. Returns false is the key is invalid.
Exceptions:
Throws no exceptions, passes all exceptions through.
Concurrency:
Not multithread safe.
Other Considerations:
None.
Member Function: TTestMultiplexer::GetDecisionKey
virtual void GetDecisionKey (TText & dest) const
Interface Category:
Developer Tool Programmer Interface.
Purpose:
Returns the current key in the given key.
Calling Context:
Call this function directly.
Parameters:
- TText & dest -The current key to be copied to dest.
Return Value:
None.
Exceptions:
Throws no exceptions, passes all exceptions through.
Concurrency:
Not multithread safe.
Other Considerations:
None.
Member Function: TTestMultiplexer::SetInputsAsKeys
virtual void SetInputsAsKeys (unsigned int howMany)
Interface Category:
Developer Tool Programmer Interface.
Purpose:
Allows the client to specify how many of the TTest input arguments, starting with the first one, are interpreted as keys.
Calling Context:
Call this function directly.
Parameters:
- unsigned int howMany -The number of input arguments to be interpreted as input arguments.
Return Value:
None.
Exceptions:
Throws no exceptions, passes all exceptions through.
Concurrency:
Not multithread safe.
Other Considerations:
None.
Member Function: TTestMultiplexer::GetInputsAsKeys
virtual unsigned int GetInputsAsKeys () const
Interface Category:
Developer Tool Programmer Interface.
Purpose:
Returns the number of input arguments that are interpreted as keys.
Calling Context:
Call this function directly.
Parameters:
Return Value:
Returns the number of input arguments that are interpreted as keys.
Exceptions:
Throws no exceptions, passes all exceptions through.
Concurrency:
Not multithread safe.
Other Considerations:
None.
- TTestMultiplexer ()
- TTestMultiplexer (const TText & theKey, unsigned int howManyInputsAsKeys =0)
- TTestMultiplexer (const TTestMultiplexer &)
Interface Category:
Developer Tool Programmer Interface.
Purpose:
- Default constructor.
- Constructor taking the key and the number of inputs as keys.
- Copy constructor.
Calling Context:
- Called by the stream-in operators and RunTest.
- Call this function directly.
- Called to copy an object.
Parameters:
- Takes no parameters.
- const TText & theKey -The decision key used for the current key.
- unsigned int howManyInputsAsKeys =0 -The number of inputs that are interpreted as keys.
- const TTestMultiplexer & -The object to copy.
Return Value:
None.
Exceptions:
Throws no exceptions, passes all exceptions through.
Concurrency:
Not multithread safe.
Other Considerations:
None.
virtual void LoadDecisions (TDictionaryOf < TText, TDecisionFnWrapper >& coln) const
Interface Category:
Developer Tool Programmer Interface.
Purpose:
A framework function that derived classes must override. Inside LoadDecisions, derived classes should register each key-decision function pair by calling AddDecision.
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.
virtual void AddDecision (TDictionaryOf < TText, TDecisionFnWrapper >& coln, const TText & key, TTestDecisionFn fun) const
Interface Category:
Developer Tool Programmer Interface.
Purpose:
Adds a key-function pair to the given collection. Derived classes should call AddDecision in their LoadDecisions function to register each decision function that they have defined or overridden.
Calling Context:
Called by the client in LoadDecisions.
Parameters:
- TDictionaryOf < TText, TDecisionFnWrapper >& coln -The table where the key-function pair is added.
- const TText & key -The key used in the key-function pair.
- TTestDecisionFn fun -The function used in the key-function pair.
Return Value:
None.
Exceptions:
Throws no exceptions, passes all exceptions through.
Concurrency:
Not multithread safe.
Other Considerations:
None.
virtual void Test ()
Interface Category:
Developer Tool Programmer Interface.
Purpose:
Runs whatever decision functions have previously been specified by their keys and calls SetSuccess with the logical AND of the results.
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: TTestMultiplexer::AndAllDecisions
virtual bool AndAllDecisions ()
Interface Category:
Developer Tool Programmer Interface.
Purpose:
The decision function that TTest calls if the key kAllDecisions is in effect.
Calling Context:
Called by Test framework. Do not call this function directly.
Parameters:
Return Value:
Returns true if the results of all decision functions are true.
Exceptions:
Throws no exceptions, passes all exceptions through.
Concurrency:
Not multithread safe.
Other Considerations:
None.
virtual void Print (TTieredTextBuffer &)
Interface Category:
Developer Tool Programmer Interface.
Purpose:
Prints the keys used in running the test to the given tiered text buffer.
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.
Click the icon to mail questions or corrections about this material to Taligent personnel.
Copyright©1995 Taligent,Inc. All rights reserved.