Public Member Functions | Private Member Functions | Private Attributes
rtshell.actions.Action Class Reference

Base action function object. More...

Inheritance diagram for rtshell.actions.Action:
Inheritance graph
[legend]

List of all members.

Public Member Functions

def __call__
def __init__
def __str__
def add_callback
def optional

Private Member Functions

def _action_string
def _execute

Private Attributes

 _callbacks

Detailed Description

Base action function object.

Base class for all action function objects.

Action objects should implement the _execute method. This will receive one
argument (a reference to the RTCTree object) and should implement the
action. It must return True for success or False for failure, and a very
brief error message.

All actions must be provided with one or more result callback objects.
These will be called in the order they are set after performing the action
and passed the result of the action's _execute method. Its job is to take
appropriate measures based on the outcome of the action. Typically, the
first should perform a verification that the result meets necessary
criteria, such as a required action succeeding. If no callbacks are
provided, a default (@ref BaseCallback) will be inserted.

Action objects must implement the __str__ method. They should print out a
description of what they will do. This description should include details
specific to that instance of the action (for example, "Will activate
component 'ConsoleIn0.rtc'").

Definition at line 33 of file actions.py.


Constructor & Destructor Documentation

def rtshell.actions.Action.__init__ (   self,
  callbacks = [] 
)

Definition at line 56 of file actions.py.


Member Function Documentation

def rtshell.actions.Action.__call__ (   self,
  rtctree = None 
)

Definition at line 60 of file actions.py.

def rtshell.actions.Action._action_string (   self,
  action_desc 
) [private]

Definition at line 83 of file actions.py.

def rtshell.actions.Action._execute (   self,
  rtctree 
) [private]
def rtshell.actions.Action.add_callback (   self,
  callback 
)

Definition at line 72 of file actions.py.

Is this action optional?

Definition at line 76 of file actions.py.


Member Data Documentation

Definition at line 56 of file actions.py.


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


rtshell
Author(s): Geoffrey Biggs
autogenerated on Fri Aug 28 2015 12:55:12