@@ -97,11 +97,11 @@ BGSIZE Connections911::getEdgeToClosestResponder(const Call &call, BGSIZE vertex
9797
9898 vertexType requiredType;
9999 if (call.type == " Law" )
100- requiredType = LAW;
100+ requiredType = vertexType:: LAW;
101101 else if (call.type == " EMS" )
102- requiredType = EMS;
102+ requiredType = vertexType:: EMS;
103103 else if (call.type == " Fire" )
104- requiredType = FIRE;
104+ requiredType = vertexType:: FIRE;
105105
106106 // loop over the outgoing edges looking for the responder with the shortest
107107 // Euclidean distance to the call's location.
@@ -145,7 +145,7 @@ bool Connections911::erasePSAP(AllVertices &vertices, Layout &layout)
145145
146146 // Find all psaps
147147 for (int i = 0 ; i < numVertices; i++) {
148- if (layout.vertexTypeMap_ [i] == PSAP) {
148+ if (layout.vertexTypeMap_ [i] == vertexType:: PSAP) {
149149 psaps.push_back (i);
150150 }
151151 }
@@ -189,13 +189,13 @@ bool Connections911::erasePSAP(AllVertices &vertices, Layout &layout)
189189 edges_->eraseEdge (destVertex, iEdg);
190190
191191 // Identify all psap-less callers
192- if (layout.vertexTypeMap_ [srcVertex] == CALR) {
192+ if (layout.vertexTypeMap_ [srcVertex] == vertexType:: CALR) {
193193 callersToReroute.push_back (srcVertex);
194194 }
195195
196196 // Identify all psap-less responders
197- if (layout.vertexTypeMap_ [destVertex] == LAW || layout.vertexTypeMap_ [destVertex] == FIRE
198- || layout.vertexTypeMap_ [destVertex] == EMS) {
197+ if (layout.vertexTypeMap_ [destVertex] == vertexType:: LAW || layout.vertexTypeMap_ [destVertex] == vertexType:: FIRE
198+ || layout.vertexTypeMap_ [destVertex] == vertexType:: EMS) {
199199 respsToReroute.push_back (destVertex);
200200 }
201201 }
@@ -204,7 +204,7 @@ bool Connections911::erasePSAP(AllVertices &vertices, Layout &layout)
204204 if (changesMade) {
205205 // This is here so that we don't delete the vertex if we can't find any edges
206206 verticesErased.push_back (randPSAP);
207- layout.vertexTypeMap_ [randPSAP] = VTYPE_UNDEF;
207+ layout.vertexTypeMap_ [randPSAP] = vertexType:: VTYPE_UNDEF;
208208 }
209209
210210 // Failsafe
@@ -230,13 +230,13 @@ bool Connections911::erasePSAP(AllVertices &vertices, Layout &layout)
230230
231231 // Insert Caller to PSAP edge
232232 BGSIZE iEdg
233- = edges_->addEdge (CP, srcVertex, closestPSAP, Simulator::getInstance ().getDeltaT ());
233+ = edges_->addEdge (edgeType:: CP, srcVertex, closestPSAP, Simulator::getInstance ().getDeltaT ());
234234
235235 // Record added edge
236236 ChangedEdge addedEdge;
237237 addedEdge.srcV = srcVertex;
238238 addedEdge.destV = closestPSAP;
239- addedEdge.eType = CP;
239+ addedEdge.eType = edgeType:: CP;
240240 edgesAdded.push_back (addedEdge);
241241 }
242242
@@ -258,13 +258,13 @@ bool Connections911::erasePSAP(AllVertices &vertices, Layout &layout)
258258
259259 // Insert PSAP to Responder edge
260260 BGSIZE iEdg
261- = edges_->addEdge (PR, closestPSAP, destVertex, Simulator::getInstance ().getDeltaT ());
261+ = edges_->addEdge (edgeType:: PR, closestPSAP, destVertex, Simulator::getInstance ().getDeltaT ());
262262
263263 // Record added edge
264264 ChangedEdge addedEdge;
265265 addedEdge.srcV = closestPSAP;
266266 addedEdge.destV = destVertex;
267- addedEdge.eType = PR;
267+ addedEdge.eType = edgeType:: PR;
268268 edgesAdded.push_back (addedEdge);
269269 }
270270
@@ -281,8 +281,8 @@ bool Connections911::eraseRESP(AllVertices &vertices, Layout &layout)
281281
282282 // Find all resps
283283 for (int i = 0 ; i < numVertices; i++) {
284- if (layout.vertexTypeMap_ [i] == LAW || layout.vertexTypeMap_ [i] == FIRE
285- || layout.vertexTypeMap_ [i] == EMS) {
284+ if (layout.vertexTypeMap_ [i] == vertexType:: LAW || layout.vertexTypeMap_ [i] == vertexType:: FIRE
285+ || layout.vertexTypeMap_ [i] == vertexType:: EMS) {
286286 resps.push_back (i);
287287 }
288288 }
@@ -325,7 +325,7 @@ bool Connections911::eraseRESP(AllVertices &vertices, Layout &layout)
325325 if (changesMade) {
326326 // This is here so that we don't delete the vertex if we can't find any edges
327327 verticesErased.push_back (randRESP);
328- layout.vertexTypeMap_ [randRESP] = VTYPE_UNDEF;
328+ layout.vertexTypeMap_ [randRESP] = vertexType:: VTYPE_UNDEF;
329329 }
330330
331331 return changesMade;
@@ -339,22 +339,22 @@ string Connections911::ChangedEdge::toString()
339339 string type_s;
340340
341341 switch (eType) {
342- case CP:
342+ case edgeType:: CP:
343343 type_s = " CP" ;
344344 break ;
345- case PR:
345+ case edgeType:: PR:
346346 type_s = " PR" ;
347347 break ;
348- case PP:
348+ case edgeType:: PP:
349349 type_s = " PP" ;
350350 break ;
351- case PC:
351+ case edgeType:: PC:
352352 type_s = " PC" ;
353353 break ;
354- case RP:
354+ case edgeType:: RP:
355355 type_s = " RP" ;
356356 break ;
357- case RC:
357+ case edgeType:: RC:
358358 type_s = " RC" ;
359359 break ;
360360 default :
0 commit comments