anjana_sreekumar@infosys.com | 991c206 | 2020-01-08 11:42:57 +0530 | [diff] [blame^] | 1 | [%- BLOCK %] |
| 2 | [%- actionList = [] %] |
| 3 | [%- PYTHON %] |
| 4 | procedure = [% TemplateInputVar %] |
| 5 | actionNames = [] |
| 6 | import utils |
| 7 | for state in procedure['States']: |
| 8 | for event in state['Events']: |
| 9 | for action in event['Actions']: |
| 10 | rc = utils.searchWordInDir(utils.outputDir, action.lower()) |
| 11 | if rc is False: |
| 12 | actionNames.append(action.lower()) |
| 13 | flag = utils.isFileEmpty(utils.outputDir, utils.outputFileName) |
| 14 | stash.set('actionList', actionNames) |
| 15 | stash.set('includeHeader', flag) |
| 16 | [%- END %] |
| 17 | [%- END %] |
| 18 | [%- IF includeHeader == 1 -%] |
| 19 | /* |
| 20 | * Copyright 2019-present Infosys Limited |
| 21 | * |
| 22 | * SPDX-License-Identifier: Apache-2.0 |
| 23 | */ |
| 24 | |
| 25 | /****************************************************************************** |
| 26 | * |
| 27 | * This is an auto generated file. |
| 28 | * Please do not edit this file. |
| 29 | * All edits to be made through template source file |
| 30 | * <TOP-DIR/scripts/SMCodeGen/templates/stateMachineTmpls/actionHandlers.cpp.tt> |
| 31 | ******************************************************************************/ |
| 32 | #include "actionHandlers/actionHandlers.h" |
| 33 | #include "controlBlock.h" |
| 34 | |
| 35 | using namespace mme; |
| 36 | using namespace SM; |
| 37 | |
| 38 | [% END %] |
| 39 | [%- FOREACH action = actionList -%] |
| 40 | /*************************************** |
| 41 | * Action handler : [% action %] |
| 42 | ***************************************/ |
| 43 | ActStatus ActionHandlers::[% action %](ControlBlock& cb) |
| 44 | { |
| 45 | return ActStatus::PROCEED; |
| 46 | } |
| 47 | |
| 48 | [% END -%] |