// /*-------------------------------------------------------------------*\
// | Concrete Template : List_Kernel_C
// \*-------------------------------------------------------------------*/
#ifndef CT_LIST_KERNEL_C
#define CT_LIST_KERNEL_C 1
///---------------------------------------------------------------------
/// Global Context -----------------------------------------------------
///---------------------------------------------------------------------
/*!
#include "AT/List/Kernel.h"
!*/
///---------------------------------------------------------------------
/// Interface ----------------------------------------------------------
///---------------------------------------------------------------------
concrete_template <
concrete_instance class Item,
concrete_instance class List_Base
/*!
implements
abstract_instance List_Kernel <Item>
!*/
>
class List_Kernel_C :
checks
concrete_instance List_Base
{
public:
procedure_body Remove_Right (
produces Item& x
)
{
assert (self.Right_Length () > 0,
"self.right /= empty_string");
self.List_Base::Remove_Right (x);
}
function_body Item& operator [] (
preserves Accessor_Position& current
)
{
assert (self.Right_Length () > 0,
"self.right /= empty_string");
return self.List_Base::operator [] (current);
}
procedure_body Advance ()
{
assert (self.Right_Length () > 0,
"self.right /= empty_string");
self.List_Base::Advance ();
}
};
//----------------------------------------------------------------------
#endif // CT_LIST_KERNEL_C
Last modified: Thu Jan 11 17:05:57 EST 2007