cppUpdELabel

UseCase3



// 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 <iostream.h>
#include <strstream.h>
@)

*operation* void cppUpdELabel(char* LabelName, char* SrcLabelName,
                              char* DesLabelName, char* OffSetString)
  *traverse* *from* Graph
    *through* -> *,edges,*
    *via* ConstEdge
  *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 &&
       *From == SrcLabelName &&
       *To == DesLabelName)
   	{ Coordinates* old=this->rset_en_offset(new Coordinates(new 
          DemString(OffSetString) ));
          delete old; } @)