cppRenVertex
UseCase3
// COM1205 Propagation Pattern for DemDraw Project.
//
// Created by Young Soo Yang (yyang@ccs.neu.edu)
//
// This propagation pattern will traverse all the vertices stored in
// a Graph object to change a name of a vertex. It compares each vertex name
// with argument Labelname and renames one to NewLabelname by calling
// cppCompVertName() & cppSetVertName(), respectively, and it returns 1 if
// renaming done successfully, otherwise returns 0.
//
// Modification History:
//
// 11/25/95 - Young Soo Yang (yyang@ccs.neu.edu)
// Modified to make it more structure shy
//
*operation* int cppRenVertex(char* Labelname, char* NewLabelname)
*init* (@ 0 @)
*traverse*
*from* Graph
*through* -> *,vertices,*
*to* Vertex
*wrapper* Graph
*suffix*
(@
this -> cppDrawVertices();
this -> cppDrawEdges();
@)
*wrapper* Vertex
(@
if (this->cppCompVertName(Labelname)) {
this->cppSetVertName(NewLabelname);
return_val = 1;
}
@)