-void StateType::popEvent()
-{
- events_.push_back(new StateEvent(issuer_, this, PAJE_PopState, nullptr));
-}
-
-VariableType::VariableType(std::string name, std::string color, Type* father) : Type(name, name, color, father)
-{
- XBT_DEBUG("VariableType %s(%lld), child of %s(%lld)", getCname(), getId(), father->getCname(), father->getId());
- logDefinition(PAJE_DefineVariableType);
-}
-
-VariableType::~VariableType()
-{
- events_.clear();
-}
-
-void VariableType::setEvent(double timestamp, double value)
-{
- events_.push_back(new VariableEvent(timestamp, issuer_, this, PAJE_SetVariable, value));
-}
+ // check if key exists: if it doesn't, set the variable to zero and mark this in the global map.
+ if (platform_variables.find(key) == platform_variables.end()) {
+ set_event(now, 0);
+ platform_variables.insert(key);
+ }