1 // File: Model_Update.hxx
2 // Created: 25 Jun 2014
3 // Author: Mikhail PONIKAROV
5 #ifndef Model_Update_HeaderFile
6 #define Model_Update_HeaderFile
9 #include "Events_Listener.h"
10 #include <boost/shared_ptr.hpp>
14 class ModelAPI_Feature;
16 /**\class Model_Update
18 * \brief Updates the results of features when it is needed.
20 class Model_Update : public Events_Listener
22 ///< initial set of updated features that must be processed
23 std::set<boost::shared_ptr<ModelAPI_Feature> > myInitial;
24 ///< already updated and processed features and modificated feature flag
25 std::map<boost::shared_ptr<ModelAPI_Feature>, bool> myUpdated;
27 /// Is called only once, on startup of the application
30 /// Processes the feature argument update: executes the results
31 MODEL_EXPORT virtual void processEvent(const Events_Message* theMessage);
34 /// Recoursively checks and updates the feature if needed
35 /// Returns true if feature was updated.
36 bool updateFeature(boost::shared_ptr<ModelAPI_Feature> theFeature);