cppCreCVertex

UseCase2



//***************************************************************************
//
// Date Created:	November 20, 1995
//
//***************************************************************************
//
// Changes:
// Date Changed:
//
//***************************************************************************
//
// This propagation pattern creates a new Construction Vertex. It takes in
// the Vertex Name, its Location and the Offset (the distance from the vertex
// that the vertex name is drawn). The propagation pattern stores the three
// parameter of the Construction Vertex (Vertex Name, Location and Offset).
//
//***************************************************************************


(@
#include <iostream.h>
#include <strstream.h>
// #include "tclexec.h"
@)

*operation* void cppCreCVertex(char* Labelname, 
			       char* Location, 
			       char* Offset)


*wrapper* Graph
(@ ConstVertex* tempCVert = new ConstVertex();
   DemString* tempLocation = new DemString(Location);
   Coordinates* tempCoord = new Coordinates(tempLocation);
   tempCVert->set_position(tempCoord);
   DemIdent* tempLabel = new DemIdent(Labelname);  
   tempLocation = new DemString(Offset);
   tempCoord = new Coordinates(tempLocation);
   VertexName* tempName = new VertexName(tempLabel, tempCoord);
   tempCVert->set_vertexname(tempName);
   this->get_vertices()->append(tempCVert); @)