Package pypat :: Package behavioral :: Module command :: Class Command
[hide private]
[frames] | no frames]

Class Command

source code


Abstract Command class as part of the Command pattern.

- External Usage documentation: U{https://github.com/tylerlaberge/PyPatterns/wiki/Behavioral-Pattern-Usage}
- External Command Pattern documentation: U{https://en.wikipedia.org/wiki/Command_pattern}

Instance Methods [hide private]
 
__init__(self, receiver)
Initialize a new command instance.
source code
 
execute(self)
Abstract method for executing an action.
source code
 
unexecute(self)
Abstract method for unexecuting an action.
source code
Method Details [hide private]

__init__(self, receiver)
(Constructor)

source code 

Initialize a new command instance.

Parameters:
  • receiver (Receiver) - The receiver for this command to use.

execute(self)

source code 

Abstract method for executing an action.

Decorators:
  • @abstractmethod

unexecute(self)

source code 

Abstract method for unexecuting an action.

Decorators:
  • @abstractmethod