Skip to content
Snippets Groups Projects
Commit 2c9ea7de authored by Jeremie Deray's avatar Jeremie Deray
Browse files

rename Notification::UPDATE -> Notification::STATE_UPDATE

parent ab69e89e
No related branches found
No related tags found
No related merge requests found
......@@ -26,7 +26,7 @@ void SolverManager::update()
state->notify(StateBlock::Notification::ENABLED);
break;
}
case StateBlock::Notification::UPDATE:
case StateBlock::Notification::STATE_UPDATE:
{
state_blocks_[state] = state->getState();
state->notify(StateBlock::Notification::ENABLED);
......@@ -54,7 +54,7 @@ void SolverManager::update()
}
default:
throw std::runtime_error("SolverManager::update: State Block notification "
"must be ADD, UPDATE, FIX_UPDATE, REMOVE or ENABLED.");
"must be ADD, STATE_UPDATE, FIX_UPDATE, REMOVE or ENABLED.");
}
}
......
......@@ -34,7 +34,7 @@ public:
{
ADD = 0,
REMOVE,
UPDATE,
STATE_UPDATE,
FIX_UPDATE,
ENABLED
};
......@@ -230,7 +230,7 @@ inline void StateBlock::notify(const StateBlock::Notification n)
{
case Notification::ADD:
case Notification::FIX_UPDATE:
case Notification::UPDATE: break; // if any of those 3, do nothing
case Notification::STATE_UPDATE: break; // if any of those 3, do nothing
case Notification::ENABLED:
case Notification::REMOVE: // if any of those 2, change notif
{
......@@ -248,7 +248,7 @@ inline void StateBlock::notify(const StateBlock::Notification n)
case Notification::ENABLED: break;
case Notification::REMOVE:
case Notification::FIX_UPDATE:
case Notification::UPDATE:
case Notification::STATE_UPDATE:
{
notification_ = n;
break;
......@@ -262,7 +262,7 @@ inline void StateBlock::notify(const StateBlock::Notification n)
{
case Notification::ADD: //throw std::runtime_error("Tried to ADD again an existing StateBlock !"); break;
case Notification::FIX_UPDATE: break;
case Notification::UPDATE: // We should have UPDATE & FIX_UPDATE !
case Notification::STATE_UPDATE: // We should have STATE_UPDATE & STATE_UPDATE !
case Notification::REMOVE:
case Notification::ENABLED:
{
......@@ -282,18 +282,18 @@ inline void StateBlock::notify(const StateBlock::Notification n)
break;
}
case Notification::ENABLED: throw std::runtime_error("Tried to ENABLED a StateBlock marked for REMOVE!"); break;
case Notification::FIX_UPDATE: // We should have UPDATE & FIX_UPDATE !
case Notification::UPDATE:
case Notification::FIX_UPDATE: // We should have STATE_UPDATE & FIX_UPDATE !
case Notification::STATE_UPDATE:
case Notification::REMOVE: break;
}
break;
}
case Notification::UPDATE:
case Notification::STATE_UPDATE:
{
switch (n)
{
case Notification::ADD: //throw std::runtime_error("Tried to ADD again an existing StateBlock !"); break;
case Notification::UPDATE: break;
case Notification::STATE_UPDATE: break;
case Notification::FIX_UPDATE:
case Notification::REMOVE:
case Notification::ENABLED:
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment