- container_t container = PJ_container_get (str);
- type_t type = PJ_type_get ("MPI_STATE", container->type);
- const char *color = instr_find_color (operation);
- val_t value = PJ_value_get_or_new (operation, color, type);
- new PushStateEvent (SIMIX_get_clock(), container, type, value, static_cast<void*>(extra));
+ container_t container = simgrid::instr::Container::byName(str);
+ simgrid::instr::Type* state = container->type_->byName("MPI_STATE");
+ state->addEntityValue(operation, instr_find_color(operation));
+ new simgrid::instr::PushStateEvent(SIMIX_get_clock(), container, state, state->getEntityValue(operation),
+ static_cast<void*>(extra));