Skip to content

Commit

Permalink
Improve comment readability
Browse files Browse the repository at this point in the history
  • Loading branch information
dziegel committed Jan 25, 2024
1 parent fee5b61 commit 1f9d1cc
Show file tree
Hide file tree
Showing 6 changed files with 22 additions and 22 deletions.
2 changes: 1 addition & 1 deletion generator/src/generator/DeclarationState.egl
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// State [%=state.name%]
// State [%=state.readable_scoped_name%]
static const [%=state.state_type%] [%=state.variable_name%];
[%
if(state.region.isDefined()) {
Expand Down
2 changes: 1 addition & 1 deletion generator/src/generator/InstanceState.egl
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
handlerTemplate.populate("state", state);
handlerTemplate.populate("statemachine", statemachine);
%]
// State [%=state.name%]
// State [%=state.readable_scoped_name%]
[%=handlerTemplate.process()%]
const [%=statemachine.name%]::[%=state.state_type%] [%=statemachine.name%]::[%=state.variable_name%]("[%=state.readable_scoped_name%]", &[%=state.scoped_name%]Handler, [%=state.parent_variable_pointer%], [%=state.initial_variable_pointer%], [%=state.entry_pointer%], [%=state.exit_pointer%]);
[%
Expand Down
10 changes: 5 additions & 5 deletions test/generated/ScXmlTestDeclaration.hxx
Original file line number Diff line number Diff line change
Expand Up @@ -10,18 +10,18 @@ class ScXmlTest final : public ScXmlTestBase
// State State_1
static const State kState_1;

// State State_2
// State State_1::State_2
static const State kState_1State_2;

// State State_3
// State State_1::State_3
static const State kState_1State_3;

// State State_4
// State State_1::State_4
static const HistoryState kState_1State_4;

// State State_5
// State State_1::State_4::State_5
static const State kState_1State_4State_5;

// State State_6
// State State_1::State_4::State_6
static const State kState_1State_4State_6;
};
10 changes: 5 additions & 5 deletions test/generated/ScXmlTestInstance.hxx
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ static ScXmlTest::Transition State_1Handler(ScXmlTest::ImplPtr impl, ScXmlTest::
}
const ScXmlTest::State ScXmlTest::kState_1("State_1", &State_1Handler, nullptr, &ScXmlTest::kState_1State_2, &ScXmlTest::Impl::State1OnEntry, nullptr);

// State State_2
// State State_1::State_2
static ScXmlTest::Transition State_1State_2Handler(ScXmlTest::ImplPtr impl, ScXmlTest::Event event)
{
(void)impl; // impl parameter is unused when there is no guard function being called in here
Expand Down Expand Up @@ -62,7 +62,7 @@ static ScXmlTest::Transition State_1State_2Handler(ScXmlTest::ImplPtr impl, ScXm
}
const ScXmlTest::State ScXmlTest::kState_1State_2("State_1::State_2", &State_1State_2Handler, &ScXmlTest::kState_1, nullptr, &ScXmlTest::Impl::State2OnEntry, nullptr);

// State State_3
// State State_1::State_3
static ScXmlTest::Transition State_1State_3Handler(ScXmlTest::ImplPtr impl, ScXmlTest::Event event)
{
(void)impl; // impl parameter is unused when there is no guard function being called in here
Expand All @@ -82,7 +82,7 @@ static ScXmlTest::Transition State_1State_3Handler(ScXmlTest::ImplPtr impl, ScXm
}
const ScXmlTest::State ScXmlTest::kState_1State_3("State_1::State_3", &State_1State_3Handler, &ScXmlTest::kState_1, nullptr, &ScXmlTest::Impl::State3OnEntry, &ScXmlTest::Impl::State3OnExit);

// State State_4
// State State_1::State_4
static ScXmlTest::Transition State_1State_4Handler(ScXmlTest::ImplPtr impl, ScXmlTest::Event event)
{
(void)impl; // impl parameter is unused when there is no guard function being called in here
Expand All @@ -102,7 +102,7 @@ static ScXmlTest::Transition State_1State_4Handler(ScXmlTest::ImplPtr impl, ScXm
}
const ScXmlTest::HistoryState ScXmlTest::kState_1State_4("State_1::State_4", &State_1State_4Handler, &ScXmlTest::kState_1, &ScXmlTest::kState_1State_4State_5, &ScXmlTest::Impl::State4OnEntry, &ScXmlTest::Impl::State4OnExit);

// State State_5
// State State_1::State_4::State_5
static ScXmlTest::Transition State_1State_4State_5Handler(ScXmlTest::ImplPtr impl, ScXmlTest::Event event)
{
(void)impl; // impl parameter is unused when there is no guard function being called in here
Expand All @@ -122,7 +122,7 @@ static ScXmlTest::Transition State_1State_4State_5Handler(ScXmlTest::ImplPtr imp
}
const ScXmlTest::State ScXmlTest::kState_1State_4State_5("State_1::State_4::State_5", &State_1State_4State_5Handler, &ScXmlTest::kState_1State_4, nullptr, nullptr, nullptr);

// State State_6
// State State_1::State_4::State_6
static ScXmlTest::Transition State_1State_4State_6Handler(ScXmlTest::ImplPtr impl, ScXmlTest::Event event)
{
(void)impl; // impl parameter is unused when there is no guard function being called in here
Expand Down
10 changes: 5 additions & 5 deletions test/generated/XmiTestDeclaration.hxx
Original file line number Diff line number Diff line change
Expand Up @@ -10,18 +10,18 @@ class XmiTest final : public XmiTestBase
// State State_1
static const State kState_1;

// State StateWithSameName
// State State_1::StateWithSameName
static const State kState_1StateWithSameName;

// State State_2
// State State_1::State_2
static const State kState_1State_2;

// State State_4
// State State_1::State_4
static const HistoryState kState_1State_4;

// State StateWithSameName
// State State_1::State_4::StateWithSameName
static const State kState_1State_4StateWithSameName;

// State State_5
// State State_1::State_4::State_5
static const State kState_1State_4State_5;
};
10 changes: 5 additions & 5 deletions test/generated/XmiTestInstance.hxx
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ static XmiTest::Transition State_1Handler(XmiTest::ImplPtr impl, XmiTest::Event
}
const XmiTest::State XmiTest::kState_1("State_1", &State_1Handler, nullptr, &XmiTest::kState_1State_2, &XmiTest::Impl::State1OnEntry, nullptr);

// State StateWithSameName
// State State_1::StateWithSameName
static XmiTest::Transition State_1StateWithSameNameHandler(XmiTest::ImplPtr impl, XmiTest::Event event)
{
(void)impl; // impl parameter is unused when there is no guard function being called in here
Expand All @@ -46,7 +46,7 @@ static XmiTest::Transition State_1StateWithSameNameHandler(XmiTest::ImplPtr impl
}
const XmiTest::State XmiTest::kState_1StateWithSameName("State_1::StateWithSameName", &State_1StateWithSameNameHandler, &XmiTest::kState_1, nullptr, &XmiTest::Impl::State3OnEntry, &XmiTest::Impl::State3OnExit);

// State State_2
// State State_1::State_2
static XmiTest::Transition State_1State_2Handler(XmiTest::ImplPtr impl, XmiTest::Event event)
{
(void)impl; // impl parameter is unused when there is no guard function being called in here
Expand Down Expand Up @@ -82,7 +82,7 @@ static XmiTest::Transition State_1State_2Handler(XmiTest::ImplPtr impl, XmiTest:
}
const XmiTest::State XmiTest::kState_1State_2("State_1::State_2", &State_1State_2Handler, &XmiTest::kState_1, nullptr, &XmiTest::Impl::State2OnEntry, nullptr);

// State State_4
// State State_1::State_4
static XmiTest::Transition State_1State_4Handler(XmiTest::ImplPtr impl, XmiTest::Event event)
{
(void)impl; // impl parameter is unused when there is no guard function being called in here
Expand All @@ -102,7 +102,7 @@ static XmiTest::Transition State_1State_4Handler(XmiTest::ImplPtr impl, XmiTest:
}
const XmiTest::HistoryState XmiTest::kState_1State_4("State_1::State_4", &State_1State_4Handler, &XmiTest::kState_1, &XmiTest::kState_1State_4State_5, &XmiTest::Impl::State4OnEntry, &XmiTest::Impl::State4OnExit);

// State StateWithSameName
// State State_1::State_4::StateWithSameName
static XmiTest::Transition State_1State_4StateWithSameNameHandler(XmiTest::ImplPtr impl, XmiTest::Event event)
{
(void)impl; // impl parameter is unused when there is no guard function being called in here
Expand All @@ -122,7 +122,7 @@ static XmiTest::Transition State_1State_4StateWithSameNameHandler(XmiTest::ImplP
}
const XmiTest::State XmiTest::kState_1State_4StateWithSameName("State_1::State_4::StateWithSameName", &State_1State_4StateWithSameNameHandler, &XmiTest::kState_1State_4, nullptr, nullptr, nullptr);

// State State_5
// State State_1::State_4::State_5
static XmiTest::Transition State_1State_4State_5Handler(XmiTest::ImplPtr impl, XmiTest::Event event)
{
(void)impl; // impl parameter is unused when there is no guard function being called in here
Expand Down

0 comments on commit 1f9d1cc

Please sign in to comment.