cppCreCEdge
UseCase2
//*****************************************************************************
//
// 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
#include
@)
*operation* void cppCreCEdge(char* EdgeLabelName,
char* SourceVertexLabelName,
char* DestinationVertexLabelName,
char* Offset)
// middle points might not be needed char* MiddlePoints)
*wrapper* Graph
(@ ConstEdge* tempCEdge = new ConstEdge();
DemString* tempLocation = new DemString(Offset);
Coordinates* tempCoord = new Coordinates(tempLocation);
DemIdent* tempLabel = new DemIdent(EdgeLabelName);
EdgeName* tempName = new EdgeName(tempLabel, tempCoord);
tempCEdge->set_edgename(tempName);
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); @)