Package svs_simulation :: Package terrain :: Module linkpaths :: Class LinkPathGraph
[show private | hide private]
[frames | no frames]

Class LinkPathGraph


Stores all link paths, and enable high-level paths to be constructed from them.
Method Summary
  __init__(self, name)
  addLinkPath(self, path)
Adds path to graph.
  decode(self, data)
Sets self to encoded values.
  encode(self)
Returns encoded description of self.
  getAllPaths(self)
  getClosestPathBetween(self, startStructure, endStructure, x, y)
Returns path that has start node closest to specified position.
  getPathsBetween(self, startStructureName, endStructureName)
Returns list of link paths between two structures.
  resolveLinkPaths(self, terrain)
Resolves all paths in LinkPathGraph.unresolvedLinkPaths and adds them to main list.

Method Details

addLinkPath(self, path)

Adds path to graph.

decode(self, data)

Sets self to encoded values.

@type data:dict

encode(self)

Returns encoded description of self.

@rtype:dict

getClosestPathBetween(self, startStructure, endStructure, x, y)

Returns path that has start node closest to specified position.

getPathsBetween(self, startStructureName, endStructureName)

Returns list of link paths between two structures.

resolveLinkPaths(self, terrain)

Resolves all paths in LinkPathGraph.unresolvedLinkPaths and adds them to main list. LinkPathGraph.unresolvedLinkPaths is then cleared.

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