Skip to content

Commit

Permalink
Indent: Use spaces
Browse files Browse the repository at this point in the history
  • Loading branch information
dziegel committed Aug 22, 2024
1 parent 313bc4a commit 1fcf449
Show file tree
Hide file tree
Showing 6 changed files with 41 additions and 41 deletions.
2 changes: 1 addition & 1 deletion generator/src/generator/InstanceHandler.egl
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
static [%=statemachine.name%]::[%=statemachine.transition_type%] [%=state.scoped_name%]Handler([%=statemachine.name%]::ImplPtr impl, [%=statemachine.name%]::Event event)
{
(void)impl; // impl parameter is unused when there is no guard function being called in here
(void)impl; // impl parameter is unused when there is no guard function being called in here

[%
if (not state.all_events.isEmpty()) {
Expand Down
4 changes: 2 additions & 2 deletions generator/src/generator/ScxmlModel.egl
Original file line number Diff line number Diff line change
Expand Up @@ -29,11 +29,11 @@ operation t_state getModel() : Tuple {
result.transitions_for_trigger = new Map();

if (self.e_onentry.isDefined() and self.e_onentry.e_script.isDefined()) {
result.entry = self.e_onentry.e_script.a_src;
result.entry = self.e_onentry.e_script.a_src;
}

if (self.e_onexit.isDefined() and self.e_onexit.e_script.isDefined()) {
result.exit = self.e_onexit.e_script.a_src;
result.exit = self.e_onexit.e_script.a_src;
}

if (not self.c_state.isEmpty()) {
Expand Down
28 changes: 14 additions & 14 deletions generator/src/generator/ScxmlProgram.egx
Original file line number Diff line number Diff line change
@@ -1,23 +1,23 @@
rule StatemachineDeclaration
transform sm : t_scxml {
transform sm : t_scxml {

template : "ScxmlDeclaration.egl"
target : sm.a_name + "Declaration.hxx"
template : "ScxmlDeclaration.egl"
target : sm.a_name + "Declaration.hxx"
}

rule StatemachineInstance
transform sm : t_scxml {
template : "ScxmlInstance.egl"
target : sm.a_name + "Instance.hxx"
transform sm : t_scxml {
template : "ScxmlInstance.egl"
target : sm.a_name + "Instance.hxx"
}

rule StatemachineInterface
transform sm : t_scxml {
template : "ScxmlInterface.egl"
target : "I" + sm.a_name + "Impl.hxx"
transform sm : t_scxml {
template : "ScxmlInterface.egl"
target : "I" + sm.a_name + "Impl.hxx"
}
12 changes: 6 additions & 6 deletions generator/src/generator/Transformations.egl
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ operation Tuple regionCollectStates(statemachine : Tuple, parent_state : Tuple)

if (state.region != null) {
state.region.regionCollectStates(statemachine, state);
}
}
}
}

Expand Down Expand Up @@ -129,17 +129,17 @@ operation Tuple stateTransform(statemachine : Tuple, region : Tuple, parent_stat
transitions.trans_conditional = new List();
transitions.trans_unconditional = new List();

for (transition in self.transitions_for_trigger.get(trigger)) {
for (transition in self.transitions_for_trigger.get(trigger)) {
transition.transitionTransform(statemachine, self, trigger, new List());

if (not transition.guards.isEmpty()) {
transitions.trans_conditional.add(transition);
} else {
transitions.trans_unconditional.add(transition);
}
}
}
if (transitions.trans_unconditional.size() > 1) {
("More than one unconditional transition in state " + self.name + " for trigger " + trigger).println();
("More than one unconditional outgoing transition from state " + self.name + " for trigger " + trigger).println();
}

self.transitions_for_trigger_transformed.put(trigger, transitions);
Expand Down Expand Up @@ -185,7 +185,7 @@ operation Tuple transitionTransform(statemachine : Tuple, state : Tuple, trigger
if(not self.internal and (self.target_state_id != null)) {
var target = statemachine.all_states.get(self.target_state_id);
if (target == null) {
("Unable to find state id " + self.target_state_id).println();
("Unable to find state id " + self.target_state_id).println();
}
self.target_variable_name = target.variable_name;

Expand All @@ -207,7 +207,7 @@ operation Tuple transitionTransform(statemachine : Tuple, state : Tuple, trigger
}
}
if (self.trans_unconditional.size() > 1) {
("More than one unconditional transition in state " + self.name + " for trigger " + trigger).println();
("More than one unconditional outgoing transition from state " + self.name + " for trigger " + trigger).println();
}
}
%]
8 changes: 4 additions & 4 deletions generator/src/generator/XmiModel.egl
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ operation Region getModel(sm : Tuple) : Tuple {
// Initial state
var initial = self.subvertices.select(s | s.isKindOf(Pseudostate) and ((s.kind = PseudostateKind#initial) or (s.kind = PseudostateKind#shallowHistory))).first;
if ((initial == null) or (initial.outgoing.first == null)) {
if (self.state != null) {
if (self.state != null) {
(sm.name + ": Missing initial state in composite state " + self.state.name).println();
}
}
Expand Down Expand Up @@ -53,15 +53,15 @@ operation State getModel(sm : Tuple) : Tuple {

// Parent state
if (self.container.state != null) {
result.parent_state_id = self.container.state.id;
result.parent_state_id = self.container.state.id;
}

// Entry/exit actions
if (self.entry != null) {
result.entry = self.entry.getBody();
result.entry = self.entry.getBody();
}
if (self.exit != null) {
result.exit = self.exit.getBody();
result.exit = self.exit.getBody();
}

// Subregions
Expand Down
28 changes: 14 additions & 14 deletions generator/src/generator/XmiProgram.egx
Original file line number Diff line number Diff line change
@@ -1,23 +1,23 @@
rule StatemachineDeclaration
transform sm : UML!StateMachine {
transform sm : UML!StateMachine {

template : "XmiDeclaration.egl"
target : sm.name + "Declaration.hxx"
template : "XmiDeclaration.egl"
target : sm.name + "Declaration.hxx"
}

rule StatemachineInstance
transform sm : UML!StateMachine {
template : "XmiInstance.egl"
target : sm.name + "Instance.hxx"
transform sm : UML!StateMachine {
template : "XmiInstance.egl"
target : sm.name + "Instance.hxx"
}

rule StatemachineInterface
transform sm : UML!StateMachine {
template : "XmiInterface.egl"
target : "I" + sm.name + "Impl.hxx"
transform sm : UML!StateMachine {
template : "XmiInterface.egl"
target : "I" + sm.name + "Impl.hxx"
}

0 comments on commit 1fcf449

Please sign in to comment.