Peano
Loading...
Searching...
No Matches
UserActionSet.py
Go to the documentation of this file.
1# This file is part of the Peano project. For conditions of distribution and
2# use, please see the copyright notice at www.peano-framework.org
3from .ActionSet import ActionSet
4
5
7 """!
8
9 User action set, i.e. action set that's there for the users to inject their code manually
10
11 This class is barely every used, as most people nowadays do not program
12 Peano in pure C++ anymore. The class is there to give you a stub for a
13 code that you then fill out with your own code.
14
15 To understand how this class fits into the big picture, it is worth studying the namespace
16 documentation, where we host a good overview in the form of an UML diagram.
17
18 ## Important links
19
20 - @ref page_peano_action_sets
21 - @ref peano4.api.taskgraph
22
23
24 """
25 def __init__(self,name,descend_invocation_order = 0, parallel = True):
26 super(UserActionSet,self).__init__(descend_invocation_order,parallel)
27 self.name = name
28 pass
29
30
32 return True
33
34
36 return "// @todo Please implement\n"
37
38
40 return "// @todo Please implement\n"
41
42
44 return "// @todo Please implement\nreturn std::vector< peano4::grid::GridControlEvent >();\n"
45
46
47 def get_body_of_operation(self,operation_name):
48 return """
49// Feel free to comment in and to add arguments if you want to trace them.
50// Ensure the logTraceOut is activated, too, if you switch on traceIn.
51// logTraceIn( \"""" + operation_name + """()" );
52// @todo Please implement
53// logTraceOut( \"""" + operation_name + """()" );
54"""
55
56
58 """
59 Returns a description (word) for the mapping which is also used as class name
60 for the generated type. As a consequence, the result should be one word (if
61 possible) and uppercase. Also, every subclass should overwrite this routine.
62 """
63 return self.name
64
65
66 def get_attributes(self):
67 return "// @todo Please implement\n"
68
69
70 def get_includes(self):
71 return "// @todo Please implement\n"
72
Action set (reactions to events)
Definition ActionSet.py:6
get_body_of_operation(self, operation_name)
Return actual C++ code snippets to be inserted into C++ code.
get_includes(self)
Return include statements that you need.
get_action_set_name(self)
Returns a description (word) for the mapping which is also used as class name for the generated type.
get_attributes(self)
Return attributes as copied and pasted into the generated class.
user_should_modify_template(self)
Is the user allowed to modify the output.
get_body_of_createGridControlEventsForNextTraversal(self)
Return the grid control events that this action set wants to trigger.
__init__(self, name, descend_invocation_order=0, parallel=True)
get_constructor_body(self)
Define a tailored constructor body.