Difference between revisions of "MapCity"
From CMSC 420
(Created page with "Inserts the named city into the spatial map. == Parameters == * name == Possible <output> == * (None) == Possible <error> types == * nameNotInDictionary * cityAlreadyMapped...") |
|||
(One intermediate revision by the same user not shown) | |||
Line 1: | Line 1: | ||
− | + | Maps an isolated city that is not an endpoint of any roads, i.e., the city is not connected to any roads. An isolated city cannot be turned into a normal city and vice versa without being unmapped from the spatial structure first. Thus, when trying to map an isolated city to the endpoints of a road, cityAlreadyMapped error should be returned. | |
== Parameters == | == Parameters == | ||
* name | * name | ||
− | == Possible <output> == | + | == Possible ''<output>'' == |
* (None) | * (None) | ||
− | == Possible <error> types == | + | == Possible ''<error>'' types == |
* nameNotInDictionary | * nameNotInDictionary | ||
* cityAlreadyMapped | * cityAlreadyMapped | ||
* cityOutOfBounds | * cityOutOfBounds | ||
− | == <success> Example == | + | == ''<success>'' Example == |
<code> | <code> | ||
<success> | <success> | ||
− | <command name="mapCity"/> | + | <command name="mapCity" id="4"/> |
<parameters> | <parameters> | ||
− | <name value=" | + | <name value="Baltimore"/> |
</parameters> | </parameters> | ||
<output/> | <output/> | ||
</success> | </success> | ||
</code> | </code> |
Latest revision as of 16:10, 30 September 2013
Maps an isolated city that is not an endpoint of any roads, i.e., the city is not connected to any roads. An isolated city cannot be turned into a normal city and vice versa without being unmapped from the spatial structure first. Thus, when trying to map an isolated city to the endpoints of a road, cityAlreadyMapped error should be returned.
Parameters[edit]
- name
Possible <output>[edit]
- (None)
Possible <error> types[edit]
- nameNotInDictionary
- cityAlreadyMapped
- cityOutOfBounds
<success> Example[edit]
<success>
<command name="mapCity" id="4"/>
<parameters>
<name value="Baltimore"/>
</parameters>
<output/>
</success>