GRASS Programmer's Manual  6.5.svn(2014)-r66266
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
model.Model Class Reference

Class representing the model. More...

Inheritance diagram for model.Model:
Collaboration diagram for model.Model:

Public Member Functions

def __init__
def GetCanvas
 Get canvas or None. More...
def GetItems
 Get list of model items. More...
def GetItem
 Get item of given id. More...
def GetNumItems
 Get number of items. More...
def GetNextId
 Get next id (data ignored) More...
def GetProperties
 Get model properties. More...
def GetVariables
 Get model variables. More...
def SetVariables
 Set model variables. More...
def Reset
 Reset model. More...
def RemoveItem
 Remove item from model. More...
def FindAction
 Find action by id. More...
def GetData
 Get list of data items. More...
def FindData
 Find data item in the model. More...
def LoadModel
 Load model definition stored in GRASS Model XML file (gxm) More...
def AddItem
 Add item to the list. More...
def IsValid
def Validate
 Validate model, return None if model is valid otherwise error string. More...
def OnPrepare
def RunAction
 Run given action. More...
def Run
 Run model. More...
def DeleteIntermediateData
 Detele intermediate data. More...
def GetIntermediateData
 Get info about intermediate data. More...
def Update
 Update model. More...
def IsParameterized
 Return True if model is parameterized. More...
def Parameterize
 Return parameterized options. More...

Data Fields


Detailed Description

Class representing the model.

Definition at line 52 of file

Constructor & Destructor Documentation

def model.Model.__init__ (   self,
  canvas = None 

Definition at line 54 of file

Member Function Documentation

def model.Model.AddItem (   self,

Add item to the list.

Definition at line 340 of file

References model.Model.items.

Referenced by gselect.TreeCtrlComboPopup.GetAdjustedSize(), and model.Model.LoadModel().

def model.Model.DeleteIntermediateData (   self,

Detele intermediate data.

Definition at line 632 of file

References model.Model.GetIntermediateData().

Referenced by model.Model.Run().

def model.Model.FindAction (   self,
def model.Model.FindData (   self,

Find data item in the model.

ModelData instance
None if not found

Definition at line 205 of file

References model.Model.GetData(), dialogs.VariableListCtrl.GetData(), and dialogs.ItemListCtrl.GetData().

def model.Model.GetCanvas (   self)

Get canvas or None.

Definition at line 67 of file

References model.Model.canvas, and frame.ModelFrame.canvas.

def model.Model.GetData (   self)
def model.Model.GetIntermediateData (   self)

Get info about intermediate data.

Definition at line 643 of file

References model.Model.GetData(), dialogs.VariableListCtrl.GetData(), and dialogs.ItemListCtrl.GetData().

Referenced by model.Model.DeleteIntermediateData().

def model.Model.GetItems (   self,
  objType = None 
def model.Model.GetNextId (   self)

Get next id (data ignored)

next id to be used (default: 1)

Definition at line 108 of file

References model.Model.items.

def model.Model.GetNumItems (   self,
  actionOnly = False 
def model.Model.GetProperties (   self)

Get model properties.

Definition at line 122 of file


def model.Model.GetVariables (   self,
  params = False 

Get model variables.

Definition at line 126 of file

References model.Model.variables, and model.Model.variablesParams.

Referenced by model.Model.Run(), and model.Model.Validate().

def model.Model.IsParameterized (   self)

Return True if model is parameterized.

Definition at line 678 of file

References model.Model.Parameterize().

def model.Model.IsValid (   self)
Return True if model is valid

Definition at line 353 of file

References model.Model.Validate().

def model.Model.LoadModel (   self,

Load model definition stored in GRASS Model XML file (gxm)

Validate against DTD

Raise exception on error.

Definition at line 221 of file

References model.Model.AddItem(), model.Model.canvas, frame.ModelFrame.canvas, model.Model.FindAction(), model.Model.GetItem(),, and model.Model.variables.

def model.Model.OnPrepare (   self,

Definition at line 464 of file

References model.Model._substituteFile().

Referenced by model.Model.RunAction().

def model.Model.RemoveItem (   self,

Remove item from model.

list of related items to remove/update

Definition at line 141 of file

References model.Model.GetItems(), dialogs.ModelLoopDialog.GetItems(), dialogs.ModelConditionDialog.GetItems(), and dialogs.ItemCheckListCtrl.GetItems().

def model.Model.Reset (   self)

Reset model.

Definition at line 137 of file

References model.Model.items.

def model.Model.Run (   self,
  parent = None 
def model.Model.RunAction (   self,
  onPrepare = None,
  statusbar = None 

Run given action.

itemaction item
paramsparameters dict
loglogging window
onDoneon-done method
onPrepareon-prepare method
statusbarwx.StatusBar instance or None

Definition at line 467 of file

References model.Model.OnPrepare().

Referenced by model.Model.Run().

def model.Model.SetVariables (   self,

Set model variables.

Definition at line 133 of file

References model.Model.variables.

def model.Model.Validate (   self)

Field Documentation


Definition at line 65 of file

Referenced by gprint.MapPrint.__init__(), model.Model.GetCanvas(), and model.Model.LoadModel().


Definition at line 403 of file


Definition at line 63 of file

Referenced by model.Model.GetVariables(), and model.Model.Parameterize().

The documentation for this class was generated from the following file: