Resolve/C++ Catalog
CT/XYZ/OpE_1.h
Copyright © 2010, Reusable Software Research Group, The Ohio State University

//  /*-------------------------------------------------------------------*\
//  |   Concrete Template : XYZ_OpE_1
//  \*-------------------------------------------------------------------*/

#ifndef CT_XYZ_OPE_1
#define CT_XYZ_OPE_1 1

///------------------------------------------------------------------------
/// Global Context --------------------------------------------------------
///------------------------------------------------------------------------

#include "AT/XYZ/OpE.h"

/*!
    #include "AT/XYZ/Kernel.h"
!*/

///------------------------------------------------------------------------
/// Interface -------------------------------------------------------------
///------------------------------------------------------------------------

concrete_template <
	concrete_instance class Item,
	concrete_instance class XYZ_Base
	/*!
	    implements
		abstract_instance XYZ_Kernel <Item>
	!*/
    >
class XYZ_OpE_1 :
    implements
	abstract_instance XYZ_OpE <Item>,
    extends
	concrete_instance XYZ_Base
{
private:

    // If this implementation of OpE needs any local operations to do
    // its job, they are declared as below.  The entire "private"
    // section (including the keyword "private") is omitted if there
    // are no such local operations.
    
    local_procedure_body Local_Op (
	    // formal parameters of Local_Op, if any, with their modes
	    // and types
        );
    /*!
	requires
	    [precondition of Local_Op]
	ensures
	    [postcondition of Local_Op]
    !*/
    {
	// This code may mention only the formal parameters of
	// Local_Op and any local objects declared in the body of
	// Local_Op; self should NOT appear in this code.
    }

public:
    
    procedure_body OpE (
	    // formal parameters of OpE, if any, with their modes and
	    // types
	)
    {
	// This code involves only the formal parameters of OpE, the
	// object self, and any local objects declared in the body of
	// OpE.  Local objects that are intended to be the same type
	// as self should be declared to be of type XYZ_OpE_1; this
	// also allows for recursive calls to OpE on those objects.
	// (This is a coding convention even if no such recursive
	// calls are to be made.)  Because self is an object of type
	// XYZ_OpE_1, the body here also may call, on self, the
	// operations of XYZ_Base as well as (recursively) OpE.  Calls
	// to Local_Op should be made as though it were a global
	// operation, i.e., there should be no receiver object in
	// these calls.
    }

};

#endif // CT_XYZ_OPE_1

Last modified: Thu Jan 11 17:05:57 EST 2007