cppUpdELabel
UseCase2
// This pp will update the offset information for a particular EdgeName
// object. It will be called when the user moves an edge label.
//
// Written by Gary Card
// for COM1205 cd drawing project
// 11/20/95
(@
#include
#include
@)
*operation* void cppUpdELabel(char* LabelName, char* SrcLabelName,
char* DesLabelName, char* OffSetString)
*traverse* *from* Graph
*via* ConstEdge
// *through* -> *,edges,*
// *bypassing* -> *,middlepoints,* , -> *,*,Vertex , => Edge, AltEdge
*to* EdgeName
*carry* *in* DemIdent* From = (@ this->get_from()->GetVName() @) ,
*in* DemIdent* To = (@ this->get_to()->GetVName() @)
*along* *from* Edge *to* EdgeName
*wrapper* EdgeName
(@ if (*this->get_name() == LabelName) cout << "Found it!!!" << From << " " << To << endl;
if (*this->get_name() == LabelName &&
*From == SrcLabelName &&
*To == DesLabelName)
{ Coordinates* old=this->rset_en_offset(new Coordinates(new
DemString(OffSetString) ));
delete old;
cout << "Hey Card! Updating " << this->get_name() << endl; } @)