cppCreAEdge

UseCase2



//****************************************************************************
// Date:	November 20, 1995
// 
//****************************************************************************
//
// Changes:
// Date:
//
//****************************************************************************
// 
// This propagation pattern creates an Alternation Edge. It is passed in the  
// Source and Destination Vertex Name.
//
//****************************************************************************



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

*operation* void cppCreAEdge(char* SourceVertexLabelName, 
			     char* DestinationVertexLabelName)
// middle points might not be needed			     char* MiddlePoints)


*wrapper* Graph
(@ AltEdge* tempCEdge = new AltEdge();

   tempCEdge->set_from(cppLookUpVName(new DemIdent (SourceVertexLabelName)));

   tempCEdge->set_to(cppLookUpVName(new DemIdent (DestinationVertexLabelName)));

//   DemString* tempMidLocation = new DemString(MiddlePoints);
//   Coordinates* tempMidPoints = new Coordinates(tempMidLocation);
//   tempCEdge->set_middlepoints(tempMidPoints);

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