cppCreCEdge

UseCase3



//*****************************************************************************
//
// Date Created:	November 20, 1995
//
//*****************************************************************************
//
// Changes:
// Date Changed:
//
//*****************************************************************************
// 
// This propagation pattern will created a new Construction Edge. It is passed
// in the Edge Name, the Source Vertex (from), the Destination Vertex (to), 
// and the Offset. The propagation pattern stores the Edge Name, and makes the
// connection from the Source Vertex to the Destination Vertex in the class 
// dictionary. Also, it stores the Label Box Coordinates (Offset).
//
//*****************************************************************************


(@
#include <iostream.h>
#include <strstream.h>
@)

*operation* void cppCreCEdge(char* EdgeLabelName, 
			     char* SourceVertexLabelName, 
			     char* DestinationVertexLabelName,
			     char* Offset)

*wrapper* Graph
(@ 	ConstEdge* temp = (ConstEdge*) defaultConstEdge->g_copy();
		   temp->fill_in_edge_label(EdgeLabelName);
         	   temp->fill_in_edge_source(SourceVertexLabelName, this);
         	   temp->fill_in_edge_destination(DestinationVertexLabelName,
						   this);
		   temp->fill_in_edge_label_offset(Offset);

  	 	   this->get_edges()->append(temp); 	@)