Package svs_simulation :: Package terrain :: Module paths :: Class PathStore
[show private | hide private]
[frames | no frames]

Class PathStore


Maintains a list of paths, which can be accessed via start and destination.
Method Summary
  __init__(self)
  addNamedPath(self, path, listByNodes)
Adds path to list by name.
  addPath(self, path, listByName)
Adds path to list.
  getAllPaths(self)
Returns a list of all paths in store.
  getPath(self, name, start, destination)
Returns path.
  getPathNamed(self, pathName)
Returns path with specified name.
  getPathWithNodes(self, start, destination)
Returns path between start and destination.

Method Details

addNamedPath(self, path, listByNodes=True)

Adds path to list by name.

If listByNodes is True adds to main path list as well. This means it can also be searched by the names of its first and last nodes. If listByNodes is False, then it can only be saerched by its name.

addPath(self, path, listByName=True)

Adds path to list. Each path is listed by the names of its first and last nodes.

If listByName is True adds to named path list as well. If listByName is False, then it can only be searched by its start and destination nodes.

getAllPaths(self)

Returns a list of all paths in store.

getPath(self, name=None, start=None, destination=None)

Returns path. If name given tries that first, then, if start and destination given tries these. Alternatively, can just be called with start and destination.

getPathNamed(self, pathName)

Returns path with specified name.

If no path exists, returns None.

getPathWithNodes(self, start, destination)

Returns path between start and destination.

If no path exists, returns None.

Generated by Epydoc 2.1 on Thu Oct 20 15:30:31 2005 http://epydoc.sf.net