From 46677123bfd639dec818a7766cac9daa3123993b Mon Sep 17 00:00:00 2001 From: Dirk Ziegelmeier Date: Wed, 29 Nov 2023 20:38:19 +0100 Subject: [PATCH] Beautify generated code --- .../src-gen/IoArHandlerMainDeclaration.hxx | 56 ++++---- .../src-gen/IoArHandlerMainInstance.hxx | 134 +++++++++--------- .../site.xml | 2 +- .../gen/cpp/main/StatemachineDeclarations.mtl | 4 +- .../uml/gen/cpp/main/StatemachineInstance.mtl | 8 +- .../uml/gen/cpp/main/StatemachineQueries.mtl | 16 --- 6 files changed, 102 insertions(+), 118 deletions(-) diff --git a/Statemachine Test/src-gen/IoArHandlerMainDeclaration.hxx b/Statemachine Test/src-gen/IoArHandlerMainDeclaration.hxx index 2ae0365..07a2a5b 100644 --- a/Statemachine Test/src-gen/IoArHandlerMainDeclaration.hxx +++ b/Statemachine Test/src-gen/IoArHandlerMainDeclaration.hxx @@ -33,10 +33,10 @@ public: static const Transition::ActionType kOpenToOpenByS_PNS_WriteReqActions[]; static const Transition kOpenToOpenByS_PNS_WriteReq; - static const Transition::ActionType kOpenToOpenByS_PNS_CheckModuleDiffActions[]; - static const Transition kOpenToOpenByS_PNS_CheckModuleDiff; static const Transition::ActionType kOpenToOpenByS_PNS_SwitchoverRequestBackupActions[]; static const Transition kOpenToOpenByS_PNS_SwitchoverRequestBackup; + static const Transition::ActionType kOpenToOpenByS_PNS_CheckModuleDiffActions[]; + static const Transition kOpenToOpenByS_PNS_CheckModuleDiff; static const Transition::ActionType kOpenToOpenByS_PNS_SwitchoverRequestPrimaryActions[]; static const Transition kOpenToOpenByS_PNS_SwitchoverRequestPrimary; static const Transition::ActionType kOpenToOpenByS_PNS_ReadReqActions[]; @@ -118,44 +118,44 @@ public: -// State Closed -static IoArHandlerMain::Transition ClosedHandler(IoArHandlerMain::ImplPtr impl, IoArHandlerMain::Event event); + // State Closed + static IoArHandlerMain::Transition ClosedHandler(ImplPtr impl, Event event); -// State Open -static IoArHandlerMain::Transition OpenHandler(IoArHandlerMain::ImplPtr impl, IoArHandlerMain::Event event); + // State Open + static IoArHandlerMain::Transition OpenHandler(ImplPtr impl, Event event); -// State Parameterizing -static IoArHandlerMain::Transition ParameterizingHandler(IoArHandlerMain::ImplPtr impl, IoArHandlerMain::Event event); + // State Parameterizing + static IoArHandlerMain::Transition ParameterizingHandler(ImplPtr impl, Event event); -// State WaitApplicationReady -static IoArHandlerMain::Transition WaitApplicationReadyHandler(IoArHandlerMain::ImplPtr impl, IoArHandlerMain::Event event); + // State WaitApplicationReady + static IoArHandlerMain::Transition WaitApplicationReadyHandler(ImplPtr impl, Event event); -// State WaitApplicationReadyCnf -static IoArHandlerMain::Transition WaitApplicationReadyCnfHandler(IoArHandlerMain::ImplPtr impl, IoArHandlerMain::Event event); + // State WaitApplicationReadyCnf + static IoArHandlerMain::Transition WaitApplicationReadyCnfHandler(ImplPtr impl, Event event); -// State ApplicationReady -static IoArHandlerMain::Transition ApplicationReadyHandler(IoArHandlerMain::ImplPtr impl, IoArHandlerMain::Event event); + // State ApplicationReady + static IoArHandlerMain::Transition ApplicationReadyHandler(ImplPtr impl, Event event); -// State Ready -static IoArHandlerMain::Transition ReadyHandler(IoArHandlerMain::ImplPtr impl, IoArHandlerMain::Event event); + // State Ready + static IoArHandlerMain::Transition ReadyHandler(ImplPtr impl, Event event); -// State DynamicReconfigurationRunning -static IoArHandlerMain::Transition DynamicReconfigurationRunningHandler(IoArHandlerMain::ImplPtr impl, IoArHandlerMain::Event event); + // State DynamicReconfigurationRunning + static IoArHandlerMain::Transition DynamicReconfigurationRunningHandler(ImplPtr impl, Event event); -// State DrWaitPullCnf -static IoArHandlerMain::Transition DrWaitPullCnfHandler(IoArHandlerMain::ImplPtr impl, IoArHandlerMain::Event event); + // State DrWaitPullCnf + static IoArHandlerMain::Transition DrWaitPullCnfHandler(ImplPtr impl, Event event); -// State DrWaitApplicationReadyCnfPlugSubmodule -static IoArHandlerMain::Transition DrWaitApplicationReadyCnfPlugSubmoduleHandler(IoArHandlerMain::ImplPtr impl, IoArHandlerMain::Event event); + // State DrWaitApplicationReadyCnfPlugSubmodule + static IoArHandlerMain::Transition DrWaitApplicationReadyCnfPlugSubmoduleHandler(ImplPtr impl, Event event); -// State DrWaitApplicationReadyPlugSubmodule -static IoArHandlerMain::Transition DrWaitApplicationReadyPlugSubmoduleHandler(IoArHandlerMain::ImplPtr impl, IoArHandlerMain::Event event); + // State DrWaitApplicationReadyPlugSubmodule + static IoArHandlerMain::Transition DrWaitApplicationReadyPlugSubmoduleHandler(ImplPtr impl, Event event); -// State DrPlugPrmSequence -static IoArHandlerMain::Transition DrPlugPrmSequenceHandler(IoArHandlerMain::ImplPtr impl, IoArHandlerMain::Event event); + // State DrPlugPrmSequence + static IoArHandlerMain::Transition DrPlugPrmSequenceHandler(ImplPtr impl, Event event); -// State DrWaitPlugCnf -static IoArHandlerMain::Transition DrWaitPlugCnfHandler(IoArHandlerMain::ImplPtr impl, IoArHandlerMain::Event event); + // State DrWaitPlugCnf + static IoArHandlerMain::Transition DrWaitPlugCnfHandler(ImplPtr impl, Event event); }; diff --git a/Statemachine Test/src-gen/IoArHandlerMainInstance.hxx b/Statemachine Test/src-gen/IoArHandlerMainInstance.hxx index d4a45db..070cca4 100644 --- a/Statemachine Test/src-gen/IoArHandlerMainInstance.hxx +++ b/Statemachine Test/src-gen/IoArHandlerMainInstance.hxx @@ -51,12 +51,12 @@ const IoArHandlerMain::Transition IoArHandlerMain::kOpenToClosedByS_PNS_ArClosed const IoArHandlerMain::Transition::ActionType IoArHandlerMain::kOpenToOpenByS_PNS_CheckModuleDiffActions[] = {&IoArHandlerMain::Impl::CheckModuleDiff}; const IoArHandlerMain::Transition IoArHandlerMain::kOpenToOpenByS_PNS_CheckModuleDiff(IoArHandlerMain::kNone, IoArHandlerMain::kOpenToOpenByS_PNS_CheckModuleDiffActions); -const IoArHandlerMain::Transition::ActionType IoArHandlerMain::kOpenToOpenByS_PNS_WriteReqActions[] = {&IoArHandlerMain::Impl::Write}; -const IoArHandlerMain::Transition IoArHandlerMain::kOpenToOpenByS_PNS_WriteReq(IoArHandlerMain::kNone, IoArHandlerMain::kOpenToOpenByS_PNS_WriteReqActions); - const IoArHandlerMain::Transition::ActionType IoArHandlerMain::kOpenToOpenByS_PNS_ReadReqActions[] = {&IoArHandlerMain::Impl::Read}; const IoArHandlerMain::Transition IoArHandlerMain::kOpenToOpenByS_PNS_ReadReq(IoArHandlerMain::kNone, IoArHandlerMain::kOpenToOpenByS_PNS_ReadReqActions); +const IoArHandlerMain::Transition::ActionType IoArHandlerMain::kOpenToOpenByS_PNS_WriteReqActions[] = {&IoArHandlerMain::Impl::Write}; +const IoArHandlerMain::Transition IoArHandlerMain::kOpenToOpenByS_PNS_WriteReq(IoArHandlerMain::kNone, IoArHandlerMain::kOpenToOpenByS_PNS_WriteReqActions); + const IoArHandlerMain::Transition::ActionType IoArHandlerMain::kOpenToOpenByS_PNS_SwitchoverRequestPrimaryActions[] = {&IoArHandlerMain::Impl::PrimarySwitchover}; const IoArHandlerMain::Transition IoArHandlerMain::kOpenToOpenByS_PNS_SwitchoverRequestPrimary(IoArHandlerMain::kNone, IoArHandlerMain::kOpenToOpenByS_PNS_SwitchoverRequestPrimaryActions); @@ -202,64 +202,64 @@ const IoArHandlerMain::State IoArHandlerMain::kDrWaitPlugCnf("DrWaitPlugCnf", const IoArHandlerMain::Transition IoArHandlerMain::kDrWaitPlugCnfToDrPlugPrmSequenceByS_PNS_PlugSubmodule_cnf(kDrPlugPrmSequence); // State Closed -IoArHandlerMain::Transition IoArHandlerMain::ClosedHandler(IoArHandlerMain::ImplPtr impl, IoArHandlerMain::Event event) +IoArHandlerMain::Transition IoArHandlerMain::ClosedHandler(ImplPtr impl, Event event) { (void)impl; // impl parameter is unused when there is no guard function being called in here switch(IoArHandlerMain_GET_INSTANCE_EVENT_ID(event)) { - case IoArHandlerMain_GET_STATIC_EVENT_ID(S_PNS_ReadReq): - return IoArHandlerMain::kClosedToClosedByS_PNS_ReadReq; + case IoArHandlerMain_GET_STATIC_EVENT_ID(S_PNS_ArOpend_ind): + return kClosedToOpenByS_PNS_ArOpend_ind; - case IoArHandlerMain_GET_STATIC_EVENT_ID(S_PNS_WriteReq): - return IoArHandlerMain::kClosedToClosedByS_PNS_WriteReq; + case IoArHandlerMain_GET_STATIC_EVENT_ID(S_PNS_SwitchoverRequestPrimary): + return kClosedToClosedByS_PNS_SwitchoverRequestPrimary; - case IoArHandlerMain_GET_STATIC_EVENT_ID(S_PNS_SwitchoverRequestBackup): - return IoArHandlerMain::kClosedToClosedByS_PNS_SwitchoverRequestBackup; + case IoArHandlerMain_GET_STATIC_EVENT_ID(S_PNS_ReadReq): + return kClosedToClosedByS_PNS_ReadReq; - case IoArHandlerMain_GET_STATIC_EVENT_ID(S_PNS_ArOpend_ind): - return IoArHandlerMain::kClosedToOpenByS_PNS_ArOpend_ind; + case IoArHandlerMain_GET_STATIC_EVENT_ID(S_PNS_SwitchoverRequestBackup): + return kClosedToClosedByS_PNS_SwitchoverRequestBackup; - case IoArHandlerMain_GET_STATIC_EVENT_ID(S_PNS_SwitchoverRequestPrimary): - return IoArHandlerMain::kClosedToClosedByS_PNS_SwitchoverRequestPrimary; + case IoArHandlerMain_GET_STATIC_EVENT_ID(S_PNS_WriteReq): + return kClosedToClosedByS_PNS_WriteReq; default: - return IoArHandlerMain::UnhandledEvent(); + return UnhandledEvent(); } } // State Open -IoArHandlerMain::Transition IoArHandlerMain::OpenHandler(IoArHandlerMain::ImplPtr impl, IoArHandlerMain::Event event) +IoArHandlerMain::Transition IoArHandlerMain::OpenHandler(ImplPtr impl, Event event) { (void)impl; // impl parameter is unused when there is no guard function being called in here switch(IoArHandlerMain_GET_INSTANCE_EVENT_ID(event)) { - case IoArHandlerMain_GET_STATIC_EVENT_ID(S_PNS_ReadReq): - return IoArHandlerMain::kOpenToOpenByS_PNS_ReadReq; + case IoArHandlerMain_GET_STATIC_EVENT_ID(S_PNS_CheckModuleDiff): + return kOpenToOpenByS_PNS_CheckModuleDiff; - case IoArHandlerMain_GET_STATIC_EVENT_ID(S_PNS_WriteReq): - return IoArHandlerMain::kOpenToOpenByS_PNS_WriteReq; + case IoArHandlerMain_GET_STATIC_EVENT_ID(S_PNS_SwitchoverRequestPrimary): + return kOpenToOpenByS_PNS_SwitchoverRequestPrimary; + + case IoArHandlerMain_GET_STATIC_EVENT_ID(S_PNS_ReadReq): + return kOpenToOpenByS_PNS_ReadReq; case IoArHandlerMain_GET_STATIC_EVENT_ID(S_PNS_SwitchoverRequestBackup): - return IoArHandlerMain::kOpenToOpenByS_PNS_SwitchoverRequestBackup; + return kOpenToOpenByS_PNS_SwitchoverRequestBackup; - case IoArHandlerMain_GET_STATIC_EVENT_ID(S_PNS_SwitchoverRequestPrimary): - return IoArHandlerMain::kOpenToOpenByS_PNS_SwitchoverRequestPrimary; + case IoArHandlerMain_GET_STATIC_EVENT_ID(S_PNS_WriteReq): + return kOpenToOpenByS_PNS_WriteReq; case IoArHandlerMain_GET_STATIC_EVENT_ID(S_PNS_ArClosed_ind): - return IoArHandlerMain::kOpenToClosedByS_PNS_ArClosed_ind; - - case IoArHandlerMain_GET_STATIC_EVENT_ID(S_PNS_CheckModuleDiff): - return IoArHandlerMain::kOpenToOpenByS_PNS_CheckModuleDiff; + return kOpenToClosedByS_PNS_ArClosed_ind; default: - return IoArHandlerMain::UnhandledEvent(); + return UnhandledEvent(); } } // State Parameterizing -IoArHandlerMain::Transition IoArHandlerMain::ParameterizingHandler(IoArHandlerMain::ImplPtr impl, IoArHandlerMain::Event event) +IoArHandlerMain::Transition IoArHandlerMain::ParameterizingHandler(ImplPtr impl, Event event) { (void)impl; // impl parameter is unused when there is no guard function being called in here @@ -268,17 +268,17 @@ IoArHandlerMain::Transition IoArHandlerMain::ParameterizingHandler(IoArHandlerMa case IoArHandlerMain_GET_STATIC_EVENT_ID(S_PNS_ParamEndInd): if (impl->FirstInArSetOrPrimary(event)) { - return IoArHandlerMain::kParameterizingToWaitApplicationReadyByS_PNS_ParamEndInd; + return kParameterizingToWaitApplicationReadyByS_PNS_ParamEndInd; } - return IoArHandlerMain::kParameterizingToWaitApplicationReadyCnfByS_PNS_ParamEndInd; + return kParameterizingToWaitApplicationReadyCnfByS_PNS_ParamEndInd; default: - return IoArHandlerMain::UnhandledEvent(); + return UnhandledEvent(); } } // State WaitApplicationReady -IoArHandlerMain::Transition IoArHandlerMain::WaitApplicationReadyHandler(IoArHandlerMain::ImplPtr impl, IoArHandlerMain::Event event) +IoArHandlerMain::Transition IoArHandlerMain::WaitApplicationReadyHandler(ImplPtr impl, Event event) { (void)impl; // impl parameter is unused when there is no guard function being called in here @@ -287,17 +287,17 @@ IoArHandlerMain::Transition IoArHandlerMain::WaitApplicationReadyHandler(IoArHan case IoArHandlerMain_GET_STATIC_EVENT_ID(SPnpbAppTimeout): if (impl->CheckApplicationReady(event)) { - return IoArHandlerMain::kWaitApplicationReadyToWaitApplicationReadyCnfBySPnpbAppTimeout; + return kWaitApplicationReadyToWaitApplicationReadyCnfBySPnpbAppTimeout; } - return IoArHandlerMain::kWaitApplicationReadyToWaitApplicationReadyBySPnpbAppTimeout; + return kWaitApplicationReadyToWaitApplicationReadyBySPnpbAppTimeout; default: - return IoArHandlerMain::UnhandledEvent(); + return UnhandledEvent(); } } // State WaitApplicationReadyCnf -IoArHandlerMain::Transition IoArHandlerMain::WaitApplicationReadyCnfHandler(IoArHandlerMain::ImplPtr impl, IoArHandlerMain::Event event) +IoArHandlerMain::Transition IoArHandlerMain::WaitApplicationReadyCnfHandler(ImplPtr impl, Event event) { (void)impl; // impl parameter is unused when there is no guard function being called in here @@ -306,93 +306,93 @@ IoArHandlerMain::Transition IoArHandlerMain::WaitApplicationReadyCnfHandler(IoAr case IoArHandlerMain_GET_STATIC_EVENT_ID(S_PNS_ApplicationReady_cnf): if (impl->success(event)) { - return IoArHandlerMain::kWaitApplicationReadyCnfToApplicationReadyByS_PNS_ApplicationReady_cnf; + return kWaitApplicationReadyCnfToApplicationReadyByS_PNS_ApplicationReady_cnf; } - return IoArHandlerMain::kWaitApplicationReadyCnfToWaitApplicationReadyCnfByS_PNS_ApplicationReady_cnf; + return kWaitApplicationReadyCnfToWaitApplicationReadyCnfByS_PNS_ApplicationReady_cnf; default: - return IoArHandlerMain::UnhandledEvent(); + return UnhandledEvent(); } } // State ApplicationReady -IoArHandlerMain::Transition IoArHandlerMain::ApplicationReadyHandler(IoArHandlerMain::ImplPtr impl, IoArHandlerMain::Event event) +IoArHandlerMain::Transition IoArHandlerMain::ApplicationReadyHandler(ImplPtr impl, Event event) { (void)impl; // impl parameter is unused when there is no guard function being called in here switch(IoArHandlerMain_GET_INSTANCE_EVENT_ID(event)) { default: - return IoArHandlerMain::UnhandledEvent(); + return UnhandledEvent(); } } // State Ready -IoArHandlerMain::Transition IoArHandlerMain::ReadyHandler(IoArHandlerMain::ImplPtr impl, IoArHandlerMain::Event event) +IoArHandlerMain::Transition IoArHandlerMain::ReadyHandler(ImplPtr impl, Event event) { (void)impl; // impl parameter is unused when there is no guard function being called in here switch(IoArHandlerMain_GET_INSTANCE_EVENT_ID(event)) { - case IoArHandlerMain_GET_STATIC_EVENT_ID(S_PNS_DynReconfPlug): - return IoArHandlerMain::kReadyToDrWaitPlugCnfByS_PNS_DynReconfPlug; - case IoArHandlerMain_GET_STATIC_EVENT_ID(S_PNS_DynReconfPull): - return IoArHandlerMain::kReadyToDrWaitPullCnfByS_PNS_DynReconfPull; + return kReadyToDrWaitPullCnfByS_PNS_DynReconfPull; + + case IoArHandlerMain_GET_STATIC_EVENT_ID(S_PNS_DynReconfPlug): + return kReadyToDrWaitPlugCnfByS_PNS_DynReconfPlug; default: - return IoArHandlerMain::UnhandledEvent(); + return UnhandledEvent(); } } // State DynamicReconfigurationRunning -IoArHandlerMain::Transition IoArHandlerMain::DynamicReconfigurationRunningHandler(IoArHandlerMain::ImplPtr impl, IoArHandlerMain::Event event) +IoArHandlerMain::Transition IoArHandlerMain::DynamicReconfigurationRunningHandler(ImplPtr impl, Event event) { (void)impl; // impl parameter is unused when there is no guard function being called in here switch(IoArHandlerMain_GET_INSTANCE_EVENT_ID(event)) { case IoArHandlerMain_GET_STATIC_EVENT_ID(SPnioAppTimeoutDynReconf): - return IoArHandlerMain::kDynamicReconfigurationRunningToDynamicReconfigurationRunningBySPnioAppTimeoutDynReconf; + return kDynamicReconfigurationRunningToDynamicReconfigurationRunningBySPnioAppTimeoutDynReconf; default: - return IoArHandlerMain::UnhandledEvent(); + return UnhandledEvent(); } } // State DrWaitPullCnf -IoArHandlerMain::Transition IoArHandlerMain::DrWaitPullCnfHandler(IoArHandlerMain::ImplPtr impl, IoArHandlerMain::Event event) +IoArHandlerMain::Transition IoArHandlerMain::DrWaitPullCnfHandler(ImplPtr impl, Event event) { (void)impl; // impl parameter is unused when there is no guard function being called in here switch(IoArHandlerMain_GET_INSTANCE_EVENT_ID(event)) { case IoArHandlerMain_GET_STATIC_EVENT_ID(S_PNS_PullSubmodule_cnf): - return IoArHandlerMain::kDrWaitPullCnfToReadyByS_PNS_PullSubmodule_cnf; + return kDrWaitPullCnfToReadyByS_PNS_PullSubmodule_cnf; default: - return IoArHandlerMain::UnhandledEvent(); + return UnhandledEvent(); } } // State DrWaitApplicationReadyCnfPlugSubmodule -IoArHandlerMain::Transition IoArHandlerMain::DrWaitApplicationReadyCnfPlugSubmoduleHandler(IoArHandlerMain::ImplPtr impl, IoArHandlerMain::Event event) +IoArHandlerMain::Transition IoArHandlerMain::DrWaitApplicationReadyCnfPlugSubmoduleHandler(ImplPtr impl, Event event) { (void)impl; // impl parameter is unused when there is no guard function being called in here switch(IoArHandlerMain_GET_INSTANCE_EVENT_ID(event)) { case IoArHandlerMain_GET_STATIC_EVENT_ID(S_PNS_PlugApplicationReady_cnf): - return IoArHandlerMain::kDrWaitApplicationReadyCnfPlugSubmoduleToReadyByS_PNS_PlugApplicationReady_cnf; + return kDrWaitApplicationReadyCnfPlugSubmoduleToReadyByS_PNS_PlugApplicationReady_cnf; default: - return IoArHandlerMain::UnhandledEvent(); + return UnhandledEvent(); } } // State DrWaitApplicationReadyPlugSubmodule -IoArHandlerMain::Transition IoArHandlerMain::DrWaitApplicationReadyPlugSubmoduleHandler(IoArHandlerMain::ImplPtr impl, IoArHandlerMain::Event event) +IoArHandlerMain::Transition IoArHandlerMain::DrWaitApplicationReadyPlugSubmoduleHandler(ImplPtr impl, Event event) { (void)impl; // impl parameter is unused when there is no guard function being called in here @@ -401,42 +401,42 @@ IoArHandlerMain::Transition IoArHandlerMain::DrWaitApplicationReadyPlugSubmodule case IoArHandlerMain_GET_STATIC_EVENT_ID(SPnpbAppTimeout): if (impl->CheckApplicationReady(event)) { - return IoArHandlerMain::kDrWaitApplicationReadyPlugSubmoduleToDrWaitApplicationReadyCnfPlugSubmoduleBySPnpbAppTimeout; + return kDrWaitApplicationReadyPlugSubmoduleToDrWaitApplicationReadyCnfPlugSubmoduleBySPnpbAppTimeout; } - return IoArHandlerMain::kDrWaitApplicationReadyPlugSubmoduleToDrWaitApplicationReadyPlugSubmoduleBySPnpbAppTimeout; + return kDrWaitApplicationReadyPlugSubmoduleToDrWaitApplicationReadyPlugSubmoduleBySPnpbAppTimeout; default: - return IoArHandlerMain::UnhandledEvent(); + return UnhandledEvent(); } } // State DrPlugPrmSequence -IoArHandlerMain::Transition IoArHandlerMain::DrPlugPrmSequenceHandler(IoArHandlerMain::ImplPtr impl, IoArHandlerMain::Event event) +IoArHandlerMain::Transition IoArHandlerMain::DrPlugPrmSequenceHandler(ImplPtr impl, Event event) { (void)impl; // impl parameter is unused when there is no guard function being called in here switch(IoArHandlerMain_GET_INSTANCE_EVENT_ID(event)) { case IoArHandlerMain_GET_STATIC_EVENT_ID(S_PNS_PlugParamEndInd): - return IoArHandlerMain::kDrPlugPrmSequenceToDrWaitApplicationReadyPlugSubmoduleByS_PNS_PlugParamEndInd; + return kDrPlugPrmSequenceToDrWaitApplicationReadyPlugSubmoduleByS_PNS_PlugParamEndInd; default: - return IoArHandlerMain::UnhandledEvent(); + return UnhandledEvent(); } } // State DrWaitPlugCnf -IoArHandlerMain::Transition IoArHandlerMain::DrWaitPlugCnfHandler(IoArHandlerMain::ImplPtr impl, IoArHandlerMain::Event event) +IoArHandlerMain::Transition IoArHandlerMain::DrWaitPlugCnfHandler(ImplPtr impl, Event event) { (void)impl; // impl parameter is unused when there is no guard function being called in here switch(IoArHandlerMain_GET_INSTANCE_EVENT_ID(event)) { case IoArHandlerMain_GET_STATIC_EVENT_ID(S_PNS_PlugSubmodule_cnf): - return IoArHandlerMain::kDrWaitPlugCnfToDrPlugPrmSequenceByS_PNS_PlugSubmodule_cnf; + return kDrWaitPlugCnfToDrPlugPrmSequenceByS_PNS_PlugSubmodule_cnf; default: - return IoArHandlerMain::UnhandledEvent(); + return UnhandledEvent(); } } diff --git a/net.ziegelmeier.statemachine.uml.gen.cpp.updatesite/site.xml b/net.ziegelmeier.statemachine.uml.gen.cpp.updatesite/site.xml index 9cc20d4..2d35a09 100644 --- a/net.ziegelmeier.statemachine.uml.gen.cpp.updatesite/site.xml +++ b/net.ziegelmeier.statemachine.uml.gen.cpp.updatesite/site.xml @@ -3,7 +3,7 @@ - + diff --git a/net.ziegelmeier.statemachine.uml.gen.cpp/src/net/ziegelmeier/statemachine/uml/gen/cpp/main/StatemachineDeclarations.mtl b/net.ziegelmeier.statemachine.uml.gen.cpp/src/net/ziegelmeier/statemachine/uml/gen/cpp/main/StatemachineDeclarations.mtl index 0c6019c..16b0a8f 100644 --- a/net.ziegelmeier.statemachine.uml.gen.cpp/src/net/ziegelmeier/statemachine/uml/gen/cpp/main/StatemachineDeclarations.mtl +++ b/net.ziegelmeier.statemachine.uml.gen.cpp/src/net/ziegelmeier/statemachine/uml/gen/cpp/main/StatemachineDeclarations.mtl @@ -70,8 +70,8 @@ public: [/template] [template private generateVertex(aState : State, aStatemachine : StateMachine)] -// State [aState.name/] -static [aStatemachine.getTransitionType()/] [aState.name/]Handler([aStatemachine.getImplPtrType()/] impl, [aStatemachine.getEventType()/] event); + // State [aState.name/] + static [aStatemachine.getTransitionType()/] [aState.name/]Handler(ImplPtr impl, Event event); [aState.eContents(Region).generateHandlerPrototypes(aStatemachine)/] [/template] diff --git a/net.ziegelmeier.statemachine.uml.gen.cpp/src/net/ziegelmeier/statemachine/uml/gen/cpp/main/StatemachineInstance.mtl b/net.ziegelmeier.statemachine.uml.gen.cpp/src/net/ziegelmeier/statemachine/uml/gen/cpp/main/StatemachineInstance.mtl index dad8923..459d7e1 100644 --- a/net.ziegelmeier.statemachine.uml.gen.cpp/src/net/ziegelmeier/statemachine/uml/gen/cpp/main/StatemachineInstance.mtl +++ b/net.ziegelmeier.statemachine.uml.gen.cpp/src/net/ziegelmeier/statemachine/uml/gen/cpp/main/StatemachineInstance.mtl @@ -134,7 +134,7 @@ const [aStatemachine.getTransitionType()/] [aStatemachine.name/]::[aTransition.g [template private generateHandlersVertex(aState : State, aStatemachine : StateMachine)] // State [aState.name/] [let aFunctionName : String = aState.name + 'Handler'] -[aStatemachine.getTransitionType()/] [aStatemachine.name/]::[aFunctionName/]([aStatemachine.getImplPtrType()/] impl, [aStatemachine.getEventType()/] event) +[aStatemachine.getTransitionType()/] [aStatemachine.name/]::[aFunctionName/](ImplPtr impl, Event event) { (void)impl; // impl parameter is unused when there is no guard function being called in here @@ -151,7 +151,7 @@ const [aStatemachine.getTransitionType()/] [aStatemachine.name/]::[aTransition.g [/for] [/let] default: - return [aStatemachine.name/]::UnhandledEvent(); + return UnhandledEvent(); } } [/let] @@ -162,11 +162,11 @@ const [aStatemachine.getTransitionType()/] [aStatemachine.name/]::[aTransition.g [template private generateTransition(aTransition : Transition, aStartTransition : Transition, aStatemachine : StateMachine)] [if (aTransition.target.oclIsKindOf(State))] [if (aTransition.guard.oclIsUndefined() or (aTransition.guard.name = 'else'))] -return [aStatemachine.name/]::[aTransition.getTransitionVariable(aStartTransition)/]; +return [aTransition.getTransitionVariable(aStartTransition)/]; [else] if (impl->[aTransition.guard.name/](event)) { - return [aStatemachine.name/]::[aTransition.getTransitionVariable(aStartTransition)/]; + return [aTransition.getTransitionVariable(aStartTransition)/]; } [/if] [elseif (aTransition.target.oclIsTypeOf(Pseudostate) and aTransition.target.oclAsType(Pseudostate).kind = PseudostateKind::choice)] diff --git a/net.ziegelmeier.statemachine.uml.gen.cpp/src/net/ziegelmeier/statemachine/uml/gen/cpp/main/StatemachineQueries.mtl b/net.ziegelmeier.statemachine.uml.gen.cpp/src/net/ziegelmeier/statemachine/uml/gen/cpp/main/StatemachineQueries.mtl index dc09a95..db29fb5 100644 --- a/net.ziegelmeier.statemachine.uml.gen.cpp/src/net/ziegelmeier/statemachine/uml/gen/cpp/main/StatemachineQueries.mtl +++ b/net.ziegelmeier.statemachine.uml.gen.cpp/src/net/ziegelmeier/statemachine/uml/gen/cpp/main/StatemachineQueries.mtl @@ -23,30 +23,14 @@ k[aState.name/] [/template] -[template public getStateType(aStatemachine : StateMachine) post(trim())] -[aStatemachine.name/]::State -[/template] - [template public getStatePtrType(aStatemachine : StateMachine) post(trim())] [aStatemachine.name/]::StatePtr [/template] -[template public getImplPtrType(aStatemachine : StateMachine) post(trim())] -[aStatemachine.name/]::ImplPtr -[/template] - -[template public getStateRefType(aStatemachine : StateMachine) post(trim())] -[aStatemachine.name/]::StateRef -[/template] - [template public getTransitionType(aStatemachine : StateMachine) post(trim())] [aStatemachine.name/]::Transition [/template] -[template public getEventType(aStatemachine : StateMachine) post(trim())] -[aStatemachine.name/]::Event -[/template] - [template public getTransitionVariable(aTransition : Transition, aStartTransition : Transition) post(trim())] k[aStartTransition.source.name/]To[aTransition.target.name/]By[aStartTransition.getEvent().name/] [/template]