Skip to content
Snippets Groups Projects
Commit fa69635b authored by Franck Dary's avatar Franck Dary
Browse files

Removed mvt from transitions

parent f97310f3
No related branches found
No related tags found
No related merge requests found
......@@ -27,15 +27,12 @@ class TransitionMachine
std::string dest;
/// @brief The prefix of the Action name that will trigger the choice of this Transition.
std::string actionPrefix;
/// @brief The relative movement that will be applied to the Config head when taking this transition.
int headMvt;
/// @brief Construct a new Transition.
///
/// @param dest The other end of the Transition.
/// @param prefix The prefix of the Action name that will trigger the choice of this Transition.
/// @param mvt The relative movement that will be applied to the Config head when taking this transition.
Transition(const std::string & dest, const std::string & prefix, int mvt);
Transition(const std::string & dest, const std::string & prefix);
};
/// @brief A State of the TransitionMachine. Can be seen as a graph node.
......
......@@ -80,9 +80,7 @@ TransitionMachine::TransitionMachine(bool trainMode)
if(buffer != std::string("TRANSITIONS"))
badFormatAndAbort(ERRINFO);
// Reading all transitions
int mvt;
while(fscanf(fd, "%s %s %d %[^\n]\n", buffer, buffer2, &mvt, buffer3) == 4)
while(fscanf(fd, "%s %s %[^\n]\n", buffer, buffer2, buffer3) == 3)
{
std::string src(buffer);
std::string dest(buffer2);
......@@ -96,7 +94,7 @@ TransitionMachine::TransitionMachine(bool trainMode)
State * srcState = str2state[src].get();
srcState->transitions.emplace_back(dest, prefix, mvt);
srcState->transitions.emplace_back(dest, prefix);
}
}
......@@ -106,11 +104,10 @@ TransitionMachine::State::State(const std::string & name, const std::string & cl
this->classifier = classifier;
}
TransitionMachine::Transition::Transition(const std::string & dest, const std::string & prefix, int mvt)
TransitionMachine::Transition::Transition(const std::string & dest, const std::string & prefix)
{
this->dest = dest;
this->actionPrefix = prefix;
this->headMvt = mvt;
}
std::string & TransitionMachine::getCurrentState()
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment