DeleteCity

From CMSC 420
Revision as of 00:10, 11 September 2013 by Rforsythe (talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

Removes a city with the specified name from data dictionary and the adjacency list. The criteria for success here is simply that the city exists. Note that if the city has been mapped, then it must be removed from the PR quadtree first, and then deleted.

Parameters[edit]

  • name

Possible <output>[edit]

If the city is in the spatial data structure, a cityUnmapped tag will appear as:

   <cityUnmapped name="city1" x="coordx" y="coordy" color="color1" radius="radius1"/> 

Possible <error> types (In priority order)[edit]

  • cityDoesNotExist

<success> Example[edit]

   <success>
       <command name="deleteCity"/>
       <parameters>
           <name value="Annapolis"/>
       </parameters>
       <output/>
   </success>