Package sabx10 :: Package oxm :: Module turn
[hide private]
[frames] | no frames]

Module turn

source code

Turn handling.

Classes [hide private]
  Turn
A Turn object sub-classes Point and adds fromto, cue, and comments to describe a turn.
Functions [hide private]
Turn
_parse_turn_xml(xml_turn)
Take the Element for a turn and turn it into a Turn object.
source code
(list of Turn,dict of Turn)
parse_turns(xml_tree)
Get all the turn elements in the given Element tree and create a list of them with Turn objects.
source code
list of Turn
process_ride_turns(ride_segs, xml_ride, xml_turns)
Process the turn references for the given ride and generate a list of Turn objects for it.
source code
Variables [hide private]
  __package__ = 'sabx10.oxm'
Function Details [hide private]

_parse_turn_xml(xml_turn)

source code 

Take the Element for a turn and turn it into a Turn object.

Parameters:
  • xml_turn (Element) - Element for a turn
Returns: Turn
Turn object

parse_turns(xml_tree)

source code 

Get all the turn elements in the given Element tree and create a list of them with Turn objects.

Parameters:
  • xml_tree (Element or ElementTree) - root of Element tree that has turns in it
Returns: (list of Turn,dict of Turn)
Turns in a list and a dictionary

process_ride_turns(ride_segs, xml_ride, xml_turns)

source code 

Process the turn references for the given ride and generate a list of Turn objects for it.

Parameters:
  • ride_segs (list of Segment objects) - list of Segment objects for the ride
  • xml_ride (Element) - Element root of ride data tree
  • xml_turns (list of Elements) - list of Element turn objects
Returns: list of Turn
list of Turn