GRASS Programmer's Manual
6.5.svn(2014)-r66266
|
This class holds the structures needed for filling by the parser. More...
Public Member Functions | |
def | __init__ |
def | define_first |
Define first parameter. More... | |
def | get_error_msg |
Get error message ('' for no error) More... | |
def | get_name |
Get task name. More... | |
def | get_description |
Get module's description. More... | |
def | get_keywords |
Get module's keywords. More... | |
def | get_list_params |
Get list of parameters. More... | |
def | get_list_flags |
Get list of flags. More... | |
def | get_param |
Find and return a param by name. More... | |
def | get_flag |
Find and return a flag by name. More... | |
def | get_cmd_error |
Get error string produced by get_cmd(ignoreErrors = False) More... | |
def | get_cmd |
Produce an array of command name and arguments for feeding into some execve-like command processor. More... | |
def | get_options |
Get options. More... | |
def | has_required |
Check if command has at least one required paramater. More... | |
def | set_param |
Set param value/values. More... | |
def | set_flag |
Enable / disable flag. More... | |
def | set_options |
Set flags and parameters. More... | |
Data Fields | |
path | |
name | |
params | |
description | |
label | |
flags | |
keywords | |
errorMsg | |
firstParam | |
blackList | |
This class holds the structures needed for filling by the parser.
Parameter blackList is a dictionary with fixed structure, eg.
path | full path |
blackList | hide some options in the GUI (dictionary) |
def python.task.grassTask.__init__ | ( | self, | |
path = None , |
|||
blackList = None |
|||
) |
def python.task.grassTask.define_first | ( | self | ) |
Define first parameter.
Definition at line 74 of file task.py.
References python.task.grassTask.firstParam, python.task.grassTask.params, histogram.HistogramFrame.params, and model.ModelParamDialog.params.
def python.task.grassTask.get_cmd | ( | self, | |
ignoreErrors = False , |
|||
ignoreRequired = False , |
|||
ignoreDefault = True |
|||
) |
Produce an array of command name and arguments for feeding into some execve-like command processor.
ignoreErrors | True to return whatever has been built so far, even though it would not be a correct command for GRASS |
ignoreRequired | True to ignore required flags, otherwise '<required>' is shown |
ignoreDefault | True to ignore parameters with default values |
Definition at line 198 of file task.py.
References python.task.grassTask.flags, python.task.grassTask.get_cmd_error(), @1.name, locale.name, _item_.name, ellps_list.name, _pad_.name, COLUMN.name, datum_list.name, table.name, paper.name, python.task.grassTask.name, fileinfo.name, render.Layer.name, statusbar.SbRender.name, statusbar.SbShowRegion.name, statusbar.SbAlignExtent.name, preferences.PropertiesDialog.name, statusbar.SbResolution.name, statusbar.SbMapScale.name, dialogs.DecorationDialog.name, statusbar.SbGoTo.name, statusbar.SbProjection.name, statusbar.SbMask.name, statusbar.SbDisplayGeometry.name, statusbar.SbCoordinates.name, statusbar.SbRegionExtent.name, statusbar.SbCompRegionExtent.name, statusbar.SbProgress.name, statusbar.SbGoToGCP.name, statusbar.SbRMSError.name, frame.VariablePanel.name, python.task.grassTask.params, histogram.HistogramFrame.params, and model.ModelParamDialog.params.
def python.task.grassTask.get_cmd_error | ( | self | ) |
Get error string produced by get_cmd(ignoreErrors = False)
Definition at line 176 of file task.py.
References python.task.grassTask.flags, python.task.grassTask.params, histogram.HistogramFrame.params, and model.ModelParamDialog.params.
Referenced by python.task.grassTask.get_cmd().
def python.task.grassTask.get_description | ( | self, | |
full = True |
|||
) |
Get module's description.
full | True for label + desc |
Definition at line 94 of file task.py.
References python.task.grassTask.description, forms.TaskFrame.description, python.task.grassTask.label, dialogs.ElementDialog.label, statusbar.SbShowRegion.label, statusbar.SbAlignExtent.label, statusbar.SbResolution.label, statusbar.SbMapScale.label, statusbar.SbGoTo.label, statusbar.SbProjection.label, statusbar.SbDisplayGeometry.label, statusbar.SbCoordinates.label, statusbar.SbRegionExtent.label, statusbar.SbCompRegionExtent.label, statusbar.SbGoToGCP.label, and statusbar.SbRMSError.label.
def python.task.grassTask.get_error_msg | ( | self | ) |
Get error message ('' for no error)
Definition at line 84 of file task.py.
References python.task.grassTask.errorMsg.
def python.task.grassTask.get_flag | ( | self, | |
aFlag | |||
) |
Find and return a flag by name.
Raises ValueError when the flag is not found.
aFlag | name of the flag |
Definition at line 164 of file task.py.
References python.task.grassTask.flags.
Referenced by python.task.grassTask.set_flag().
def python.task.grassTask.get_keywords | ( | self | ) |
Get module's keywords.
Definition at line 107 of file task.py.
References python.task.grassTask.keywords.
def python.task.grassTask.get_list_flags | ( | self, | |
element = 'name' |
|||
) |
Get list of flags.
element | element name |
Definition at line 123 of file task.py.
References python.task.grassTask.flags.
def python.task.grassTask.get_list_params | ( | self, | |
element = 'name' |
|||
) |
Get list of parameters.
element | element name |
Definition at line 112 of file task.py.
References python.task.grassTask.params, histogram.HistogramFrame.params, and model.ModelParamDialog.params.
def python.task.grassTask.get_name | ( | self | ) |
Get task name.
Definition at line 89 of file task.py.
References @1.name, locale.name, _item_.name, ellps_list.name, _pad_.name, COLUMN.name, datum_list.name, table.name, paper.name, python.task.grassTask.name, fileinfo.name, render.Layer.name, statusbar.SbRender.name, statusbar.SbShowRegion.name, statusbar.SbAlignExtent.name, preferences.PropertiesDialog.name, statusbar.SbResolution.name, statusbar.SbMapScale.name, dialogs.DecorationDialog.name, statusbar.SbGoTo.name, statusbar.SbProjection.name, statusbar.SbMask.name, statusbar.SbDisplayGeometry.name, statusbar.SbCoordinates.name, statusbar.SbRegionExtent.name, statusbar.SbCompRegionExtent.name, statusbar.SbProgress.name, statusbar.SbGoToGCP.name, statusbar.SbRMSError.name, and frame.VariablePanel.name.
def python.task.grassTask.get_options | ( | self | ) |
Get options.
Definition at line 238 of file task.py.
References python.task.grassTask.flags, python.task.grassTask.params, histogram.HistogramFrame.params, and model.ModelParamDialog.params.
def python.task.grassTask.get_param | ( | self, | |
value, | |||
element = 'name' , |
|||
raiseError = True |
|||
) |
Find and return a param by name.
value | param's value |
element | element name |
raiseError | True for raise on error |
Definition at line 134 of file task.py.
References python.task.grassTask.params, histogram.HistogramFrame.params, model.ModelParamDialog.params, and dialogs.type.
Referenced by python.task.grassTask.set_param().
def python.task.grassTask.has_required | ( | self | ) |
Check if command has at least one required paramater.
Definition at line 244 of file task.py.
References python.task.grassTask.params, histogram.HistogramFrame.params, and model.ModelParamDialog.params.
def python.task.grassTask.set_flag | ( | self, | |
aFlag, | |||
aValue, | |||
element = 'value' |
|||
) |
Enable / disable flag.
Definition at line 263 of file task.py.
References python.task.grassTask.get_flag().
Referenced by python.task.grassTask.set_options().
def python.task.grassTask.set_options | ( | self, | |
opts | |||
) |
Set flags and parameters.
opts | list of flags and parameters |
Definition at line 273 of file task.py.
References python.task.grassTask.set_flag(), and python.task.grassTask.set_param().
def python.task.grassTask.set_param | ( | self, | |
aParam, | |||
aValue, | |||
element = 'value' |
|||
) |
Set param value/values.
Definition at line 253 of file task.py.
References python.task.grassTask.get_param().
Referenced by python.task.grassTask.set_options().
python.task.grassTask.description |
Definition at line 54 of file task.py.
Referenced by python.task.grassTask.get_description().
python.task.grassTask.errorMsg |
Definition at line 58 of file task.py.
Referenced by python.task.grassTask.get_error_msg().
python.task.grassTask.firstParam |
Definition at line 59 of file task.py.
Referenced by python.task.grassTask.define_first().
python.task.grassTask.flags |
Definition at line 56 of file task.py.
Referenced by python.task.grassTask.get_cmd(), python.task.grassTask.get_cmd_error(), python.task.grassTask.get_flag(), python.task.grassTask.get_list_flags(), and python.task.grassTask.get_options().
python.task.grassTask.keywords |
Definition at line 57 of file task.py.
Referenced by python.task.grassTask.get_keywords().
python.task.grassTask.label |
Definition at line 55 of file task.py.
Referenced by python.task.grassTask.get_description().
python.task.grassTask.name |
Definition at line 52 of file task.py.
Referenced by python.task.grassTask.get_cmd(), and python.task.grassTask.get_name().
python.task.grassTask.params |
Definition at line 53 of file task.py.
Referenced by python.task.grassTask.define_first(), python.task.grassTask.get_cmd(), python.task.grassTask.get_cmd_error(), python.task.grassTask.get_list_params(), python.task.grassTask.get_options(), python.task.grassTask.get_param(), frame.MapFrame.GetOptData(), and python.task.grassTask.has_required().