cdgAddANeighbor
UseCase3
// Look for the source vertex in the list of adjacencies.
// If found, add the given adjacency based on the type of
// the neighbor list. For instance, if the source is a
// construction vertex, this command is illegal and should
// be disregarded.
*operation* void cdgAddANeighbor(DemIdent* SrcVert,
DemIdent* DesVert)
*traverse*
*from* Cd_Graph
*through* -> *,ns,*, => Cd_Neighbors, Cd_Alternat
*to* Cd_V_BarList
*carry* *in* Cd_Vertex* S_Chk_Vert = (@ this -> get_source() @)
*along* *from* Cd_Adjacency
*through* -> *,ns,*, => Cd_Neighbors, Cd_Alternat
*to* Cd_V_BarList
*wrapper* Cd_V_BarList
(@
if (SrcVert->g_equal(S_Chk_Vert->get_vertex_name())) {
this->append(new Cd_Vertex((DemIdent*)DesVert->g_copy()));
}
@)