Package sabx10 :: Package utils :: Module sabx_seg_reverse :: Class RevProcessor
[hide private]
[frames] | no frames]

Class RevProcessor

source code

                          object --+        
                                   |        
templating.generic.TemplateProcessor --+    
                                       |    
           templating.sabx.SabxProcessor --+
                                           |
                                          RevProcessor

Process an SABX 1.0 file and reverse the order of the waypoints in a segment.

Instance Methods [hide private]
 
__init__(self, template_file=None, man=None)
Add optparse options for the usage.
source code
 
process_options(self)
Get the seg id.
source code
 
get_template_data(self)
Reverse the waypoints of the designated segment.
source code

Inherited from templating.sabx.SabxProcessor: process_template

Inherited from templating.generic.TemplateProcessor: process

Inherited from object: __delattr__, __format__, __getattribute__, __hash__, __new__, __reduce__, __reduce_ex__, __repr__, __setattr__, __sizeof__, __str__, __subclasshook__

Instance Variables [hide private]
string seg
id of segment to reverse

Inherited from templating.sabx.SabxProcessor: in_file, sabx

Inherited from templating.generic.TemplateProcessor: args, man, options, out_file, parser, template_data, template_file, template_path

Properties [hide private]

Inherited from object: __class__

Method Details [hide private]

__init__(self, template_file=None, man=None)
(Constructor)

source code 

Add optparse options for the usage.

Parameters:
  • template_file (string) - (optional) file name of template file
  • man (string) - (optional) extended program help
Overrides: object.__init__

process_options(self)

source code 

Get the seg id. It's expected to be the last command-line argument.

Parameters:
  • arg_count - count of non-optional command-line arguments expected
Raises:
  • NotEnoughArgsException - this exception is raised when there is no template file specified on the command-line
Overrides: templating.generic.TemplateProcessor.process_options

get_template_data(self)

source code 

Reverse the waypoints of the designated segment.

Overrides: templating.generic.TemplateProcessor.get_template_data