1
2
3
4
5 """ Basic action classes.
6 """
7
8 __all__ = ('BaseAction', 'BaseArgument')
9
11 """ Represents a service action.
12 """
13
14 - def __init__(self, service, name, arguments = []):
15 """ Constructor for the Action class.
16
17 @param service: service which holds this action
18 @param name: action name
19 @param arguments: arguments list
20
21 @type service: Service
22 @type name: string
23 @type arguments: list of Argument
24 """
25 self.service = service
26 self.name = name
27 self.arguments = arguments
28
31
34
35
37 """ Represents an action argument.
38 """
39
40 - def __init__(self, arg_name, arg_direction, arg_state_var):
41 """ Constructor for the Argument class.
42
43 @param arg_name: argument name
44 @param arg_direction: argument direction
45 @param arg_state_var: argument related state variable
46
47 @type arg_name: string
48 @type arg_direction: string
49 @type arg_state_var: string
50 """
51 self.name = arg_name
52 self.direction = arg_direction
53 self.state_var = arg_state_var
54