// /*-------------------------------------------------------------------*\
// | Concrete Template : XYZ_OpE_C
// \*-------------------------------------------------------------------*/
#ifndef CT_XYZ_OPE_C
#define CT_XYZ_OPE_C 1
///------------------------------------------------------------------------
/// Global Context --------------------------------------------------------
///------------------------------------------------------------------------
/*!
#include "AT/XYZ/OpE.h"
#include "AT/XYZ/Kernel.h"
!*/
///------------------------------------------------------------------------
/// Interface -------------------------------------------------------------
///------------------------------------------------------------------------
concrete_template <
concrete_instance class Item,
concrete_instance class XYZ_OpE_Base
/*!
implements
abstract_instance XYZ_OpE <Item>,
checks
abstract_instance XYZ_Kernel <Item>
!*/
>
class XYZ_OpE_C :
checks
concrete_instance XYZ_OpE_Base
{
public:
// Because XYZ_OpE_Base is restricted by the formal comments above
// not only to implement abstract_instance XYZ_OpE <Item> but also
// to check abstract_instance XYZ_Kernel <Item>, the only thing
// XYZ_OpE_C needs to do in order to check XYZ_OpE_Base is to
// provide a checking implementation of each of XYZ_OpE's
// contributed operations (but only those that have non-trivial
// preconditions).
procedure_body OpE (
// formal parameters of OpE, if any, with their modes and
// types
)
{
assert (
// The two arguments to "assert" are: a Boolean-valued
// expression that SHOULD be true (i.e., the
// precondition as evaluated here); and a Text-valued
// expression that is literally the precondition
// violated (i.e., the precondition to be reported in
// a "violated assertion" message if the first
// argument is false).
);
self.XYZ_OpE_Base::OpE (/* just the names of the formal
* parameters of OpE, separated
* by commmas */);
}
};
#endif // CT_XYZ_OPE_C
Last modified: Wed Nov 04 14:13:21 EST 2009