mockpp::TriggeredOutbound< T > Class Template Reference
[Parameter Constraints]

Passes a value back via a reference (Outbound value). More...

Inheritance diagram for mockpp::TriggeredOutbound< T >:
Inheritance graph
[legend]

List of all members.

Public Member Functions

 TriggeredOutbound (const T &retArg)
 Constructs the object.
template<class I >
 TriggeredOutbound (I items, I end)
 Constructs the object base on a list of values.
void addOutboundObject (const T &retArg)
 Adds another return value.
template<class I >
TriggeredOutboundaddOutboundObject (I items, I end)
 Add a sequence of next objects to the end of the list.
virtual ~TriggeredOutbound ()
 Destroys the object.
virtual bool eval (const T &arg) const
 Evaluates the constraint.
virtual bool verify (const T &) const
 Evaluates the constraint at the end.
virtual String describeTo (String &buffer) const
 Appends the description of this object to the buffer.
virtual void trigger ()
 Triggers the defered constraint.

Detailed Description

template<typename T>
class mockpp::TriggeredOutbound< T >

Passes a value back via a reference (Outbound value).

The reference is set in method eval and filled with the according value in trigger. The reference is set to zero immediately after using it. For that reason eval and trigger always come in pairs to avoid using a dangling pointer from a temporary or deleted variable.

Warning:
Be extremely careful when using TriggeredOutbound in conjunction with other contraints using And or Or as side effects might occur.

Definition at line 53 of file TriggeredOutbound.h.


Constructor & Destructor Documentation

template<typename T >
mockpp::TriggeredOutbound< T >::TriggeredOutbound ( const T &  retArg  )  [inline]

Constructs the object.

Parameters:
retArg the first value to return

Definition at line 60 of file TriggeredOutbound.h.

template<typename T >
template<class I >
mockpp::TriggeredOutbound< T >::TriggeredOutbound ( items,
end 
) [inline]

Constructs the object base on a list of values.

Parameters:
items start iterator
end terminating iterator (note: one element "behind" as always with STL)

Definition at line 72 of file TriggeredOutbound.h.


Member Function Documentation

template<typename T >
template<class I >
TriggeredOutbound& mockpp::TriggeredOutbound< T >::addOutboundObject ( items,
end 
) [inline]

Add a sequence of next objects to the end of the list.

Parameters:
items start iterator
end terminating iterator (note: one element "behind" as always with STL)
Returns:
reference to itself for chaining

Definition at line 93 of file TriggeredOutbound.h.

template<typename T >
void mockpp::TriggeredOutbound< T >::addOutboundObject ( const T &  retArg  )  [inline]

Adds another return value.

Parameters:
retArg the next value to return

Definition at line 82 of file TriggeredOutbound.h.

template<typename T >
virtual String mockpp::TriggeredOutbound< T >::describeTo ( String buffer  )  const [inline, virtual]

Appends the description of this object to the buffer.

Parameters:
buffer The buffer that the description is appended to.
Returns:
The current content of the buffer data

Implements mockpp::SelfDescribing.

Definition at line 130 of file TriggeredOutbound.h.

template<typename T >
virtual bool mockpp::TriggeredOutbound< T >::eval ( const T &  arg  )  const [inline, virtual]

Evaluates the constraint.

The value is not actually evaluated but the adresse is stored for later use.

Parameters:
arg the object which is to pass the value later with trigger().
Returns:
always true

Implements mockpp::Constraint< T >.

Definition at line 110 of file TriggeredOutbound.h.

template<typename T >
virtual void mockpp::TriggeredOutbound< T >::trigger (  )  [inline, virtual]

Triggers the defered constraint.

Stores the next available object into the variable.

Implements mockpp::TriggeredConstraint< T >.

Definition at line 141 of file TriggeredOutbound.h.

template<typename T >
virtual bool mockpp::TriggeredOutbound< T >::verify ( const T &   )  const [inline, virtual]

Evaluates the constraint at the end.

Parameters:
arg the object which is passed the value.
Returns:
true: All values must have been consumed.
false: At least one object is still available

Reimplemented from mockpp::Constraint< T >.

Definition at line 121 of file TriggeredOutbound.h.


The documentation for this class was generated from the following file:
 All Classes Namespaces Files Functions Variables Typedefs Friends Defines

Generated on Tue Jan 5 09:49:07 2010 for mockpp by  doxygen 1.6.1