#include <GeomAPI_Pnt.h>
#include <ModelAPI_Feature.h>
#include <ModelAPI_Data.h>
+#include <ModelAPI_Events.h>
using namespace std;
myTextArray->SetValue(1, aY);
myTextArray->SetValue(2, aZ);
owner()->data()->sendAttributeUpdated(this);
+ // Send it to evaluator to convert into the double and store in the attribute
+ static Events_ID anId = ModelAPI_AttributeEvalMessage::eventId();
+ std::shared_ptr<ModelAPI_AttributeEvalMessage> aMessage =
+ std::shared_ptr<ModelAPI_AttributeEvalMessage>(new ModelAPI_AttributeEvalMessage(anId, this));
+ aMessage->setAttribute(owner()->data()->attribute(id())); // to get shared pointer to this
+ Events_Loop::loop()->send(aMessage);
}
}
GEOMDATA_EXPORT virtual std::string textZ();
/// Allows to set expression (text) as invalid (by the parameters listener)
- GEOMDATA_EXPORT virtual void setExpressionInvalid(int, bool theFlag);
+ GEOMDATA_EXPORT virtual void setExpressionInvalid(int, const bool theFlag);
/// Returns true if text is invalid
GEOMDATA_EXPORT virtual bool expressionInvalid(int);
#include <GeomAPI_Pnt2d.h>
#include <ModelAPI_Feature.h>
#include <ModelAPI_Data.h>
+#include <ModelAPI_Events.h>
using namespace std;
myTextArray->SetValue(0, aX);
myTextArray->SetValue(1, aY);
owner()->data()->sendAttributeUpdated(this);
+ // Send it to evaluator to convert into the double and store in the attribute
+ static Events_ID anId = ModelAPI_AttributeEvalMessage::eventId();
+ std::shared_ptr<ModelAPI_AttributeEvalMessage> aMessage =
+ std::shared_ptr<ModelAPI_AttributeEvalMessage>(new ModelAPI_AttributeEvalMessage(anId, this));
+ aMessage->setAttribute(owner()->data()->attribute(id())); // to get shared pointer to this
+ Events_Loop::loop()->send(aMessage);
}
}