// /*-------------------------------------------------------------------*\
// | Concrete Template : Array_Exchange_At_C
// \*-------------------------------------------------------------------*/
#ifndef CT_ARRAY_EXCHANGE_AT_C
#define CT_ARRAY_EXCHANGE_AT_C 1
///------------------------------------------------------------------------
/// Global Context --------------------------------------------------------
///------------------------------------------------------------------------
/*!
#include "AT/Array/Exchange_At.h"
#include "AT/Array/Kernel.h"
!*/
///------------------------------------------------------------------------
/// Interface -------------------------------------------------------------
///------------------------------------------------------------------------
concrete_template <
concrete_instance class Item,
concrete_instance class Array_Exchange_At_Base
/*!
implements
abstract_instance Array_Exchange_At <Item>,
checks
abstract_instance Array_Kernel <Item>
!*/
>
class Array_Exchange_At_C :
checks
concrete_instance Array_Exchange_At_Base
{
public:
procedure_body Exchange_At (
preserves Integer i,
preserves Integer j
)
{
assert (self.Lower_Bound () <= i,
"self.lb <= i");
assert (i <= self.Upper_Bound (),
"i <= self.ub");
assert (self.Lower_Bound () <= j,
"self.lb <= j");
assert (j <= self.Upper_Bound (),
"j <= self.ub");
self.Array_Exchange_At_Base::Exchange_At (i, j);
}
};
#endif // CT_ARRAY_EXCHANGE_AT_C
Last modified: Wed Nov 04 20:09:57 EST 2009