Difference between revisions of "DeleteCity"

From CMSC 420
 
Line 4: Line 4:
 
* name
 
* name
  
== Possible <output> ==
+
== Possible ''<output>'' ==
 
If the city is in the spatial data structure, a ''cityUnmapped'' tag will appear as:  
 
If the city is in the spatial data structure, a ''cityUnmapped'' tag will appear as:  
 
<br>
 
<br>
Line 11: Line 11:
 
</code>
 
</code>
  
== Possible <error> types (In priority order) ==
+
== Possible ''<error>'' types (In priority order) ==
 
* cityDoesNotExist
 
* cityDoesNotExist
  
== <success> Example ==
+
== ''<success>'' Example ==
 
<code>
 
<code>
 
     <success>
 
     <success>

Latest revision as of 00:10, 11 September 2013

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>