Main Page | Namespace List | Class Hierarchy | Class List | File List | Class Members

CCM::StubIterator Class Reference

List of all members.

Detailed Description

Singleton class for managing exhaustive iteration over all stub property and stub method return values.

Stub properties/methods are added lazily to the iteration, i.e. not before they actually appear the first time; this avoids iteration over unused ones.


Static Public Member Functions

void start ()
 Initialize iteration.

bool next ()
 Iterate to next alternative of input values.

Object stubInput (Ref r)
 Return the current value of the stub input field referenced by r.

void stubOutput (Ref r, Object val)
 Output value val to stub output field referenced by r.

Object call (Ref r, List args)
 Call stub method (given as a Ref) and return the current return value.


Static Private Attributes

IList transitionState = new List()
 Stack of transition states; contains Stub(Input/Output/Call)State.

Hashtable stubInputs = new Hashtable()
 Map transition name (string) to StubInputState for fast lookup.

Hashtable stubOutputs = new Hashtable()
 Map stub output field (Ref) to StubOutputState for fast lookup.

Hashtable stubCalls = new Hashtable()
 Map transition name (string) to StubCallState for fast lookup.


Member Function Documentation

Object CCM::StubIterator::call Ref  r,
List  args
[static]
 

Call stub method (given as a Ref) and return the current return value.

Append a MethodCallNode to the current process, if necessary.

bool CCM::StubIterator::next  )  [static]
 

Iterate to next alternative of input values.

Always call this until false is returned.

Returns:
true if there are more possibilities, false if last one was just processed.

void CCM::StubIterator::start  )  [static]
 

Initialize iteration.

Object CCM::StubIterator::stubInput Ref  r  )  [static]
 

Return the current value of the stub input field referenced by r.

Append a ValueInNode to the current process, if necessary.

void CCM::StubIterator::stubOutput Ref  r,
Object  val
[static]
 

Output value val to stub output field referenced by r.

Append a ValueOutNode to the current process, if necessary.


Member Data Documentation

Hashtable CCM::StubIterator::stubCalls = new Hashtable() [static, private]
 

Map transition name (string) to StubCallState for fast lookup.

Hashtable CCM::StubIterator::stubInputs = new Hashtable() [static, private]
 

Map transition name (string) to StubInputState for fast lookup.

Hashtable CCM::StubIterator::stubOutputs = new Hashtable() [static, private]
 

Map stub output field (Ref) to StubOutputState for fast lookup.

IList CCM::StubIterator::transitionState = new List() [static, private]
 

Stack of transition states; contains Stub(Input/Output/Call)State.


The documentation for this class was generated from the following file:
Generated on Mon Jun 21 01:20:50 2004 for cs2ccmb by doxygen 1.3.7