cppAddSourceVertices

UseCase3



// Iterate through the vertex list, adding each as a source vertex
// to the list of adjacencies in the CDG object.  The actual function call 
// used depends on the vertex type. Just pass the vertex name and leave it
// up to the CDG object to implement the addition.

// This must be done prior to cppAddNeighbors.

*operation* void cppAddSourceVertices(Cd_Graph* cdg)
   *traverse*
      *from* Graph
      *through* -> *,vertices,*
      *to* { ConstVertex, AltVertex }
   *wrapper* ConstVertex
      (@ cdg->cdgAddSourceCVertex(this->GetVName()); @)
   *wrapper* AltVertex
      (@ cdg->cdgAddSourceAVertex(this->GetVName()); @)