// event: feature is added
static Events_ID anEvent = Events_Loop::eventByName(EVENT_OBJECT_CREATED);
ModelAPI_EventCreator::get()->sendUpdated(aFeature, anEvent);
+ } else { // feature must be executed
+ // no creation event => updater not working, problem with remove part
+ aFeature->execute();
}
}
return aFeature;
#include "ModelAPI_AttributeRefList.h"
#include "ModelAPI_Result.h"
#include "ModelAPI_ResultConstruction.h"
+ #include "ModelAPI_ResultBody.h"
+ #include "ModelAPI_ResultPart.h"
template<class T> boost::shared_ptr<T> castTo(boost::shared_ptr<ModelAPI_Result> theObject)
{
%shared_ptr(ModelAPI_AttributeRefList)
%shared_ptr(ModelAPI_Result)
%shared_ptr(ModelAPI_ResultConstruction)
+%shared_ptr(ModelAPI_ResultBody)
+%shared_ptr(ModelAPI_ResultPart)
// all supported interfaces
%include "GeomAPI_Interface.h"
%include "ModelAPI_AttributeRefList.h"
%include "ModelAPI_Result.h"
%include "ModelAPI_ResultConstruction.h"
+%include "ModelAPI_ResultBody.h"
+%include "ModelAPI_ResultPart.h"
%template(ObjectList) std::list<boost::shared_ptr<ModelAPI_Object> >;
%template(ResultList) std::list<boost::shared_ptr<ModelAPI_Result> >;
template<class T> boost::shared_ptr<T> castTo(boost::shared_ptr<ModelAPI_Result> theObject);
%template(modelAPI_ResultConstruction) castTo<ModelAPI_ResultConstruction>;
+%template(modelAPI_ResultBody) castTo<ModelAPI_ResultBody>;
+%template(modelAPI_ResultPart) castTo<ModelAPI_ResultPart>;
virtual ~ModelAPI_Validator()
{
}
-
- /// Returns true if feature and/or attributes are valid
- /// \param theFeature the validated feature
- /// \param theAttr the validated attribute ID, empty string of feature is validated
- /// \param theArguments list of string, feature attribute names: dependent attributes
- //virtual bool validate(const boost::shared_ptr<ModelAPI_Feature>& theFeature,
- // const std::string theAttr, std::list<std::string> theArguments) const = 0;
};
typedef boost::shared_ptr<ModelAPI_Validator> ValidatorPtr;