cppUpdVLabel

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 cppUpdVLabel(char* LabelName, char* OffSetString)
  *traverse* *from* Graph
    *through* -> *,vertices,*
    *bypassing* -> Vertex,position,Coordinates
  *to* Coordinates
  *carry* *in* DemIdent* test = (@ new DemIdent( LabelName ) @)
    *along* *from* Graph *to* Coordinates
  *carry* *in* DemIdent* Vert = (@ this->get_name() @)
    *along* *from* VertexName *to* Coordinates
*wrapper* Coordinates
(@ if ( test->g_equal(Vert) ) 
   { DemString* old=this->rset_coords( new DemString( OffSetString ) );
     delete old; } @)