Salome HOME
Update the doxygen documentation
[modules/shaper.git] / src / Model / Model_Events.h
index f30c447904ecd73694bb3796e5fda090b6297861..d52e7f8caea85a062109f2f4defdc5798b3e1d46 100644 (file)
@@ -1,3 +1,5 @@
+// Copyright (C) 2014-20xx CEA/DEN, EDF R&D
+
 // File:        Model_Events.h
 // Created:     10 Apr 2014
 // Author:      Mikhail PONIKAROV
@@ -8,6 +10,8 @@
 #include <Model.h>
 #include <ModelAPI_Events.h>
 
+#include <memory>
+
 /// Allovs to create ModelAPI messages
 class Model_EventCreator : public ModelAPI_EventCreator
 {
@@ -16,7 +20,7 @@ class Model_EventCreator : public ModelAPI_EventCreator
   virtual void sendUpdated(const ObjectPtr& theObject, const Events_ID& theEvent,
                            const bool isGroupped = true) const;
   /// creates deleted message and sends to the loop
-  virtual void sendDeleted(const boost::shared_ptr<ModelAPI_Document>& theDoc,
+  virtual void sendDeleted(const std::shared_ptr<ModelAPI_Document>& theDoc,
                            const std::string& theGroup) const;
 
   /// must be one per application, the constructor for internal usage only
@@ -39,26 +43,26 @@ class Model_ObjectUpdatedMessage : public ModelAPI_ObjectUpdatedMessage
   virtual const std::set<ObjectPtr>& objects() const;
 
   //! Creates a new empty group (to store it in the loop before flush)
-  virtual boost::shared_ptr<Events_MessageGroup> newEmpty();
+  virtual std::shared_ptr<Events_MessageGroup> newEmpty();
 
   //! Allows to join the given message with the current one
-  virtual void Join(const boost::shared_ptr<Events_MessageGroup>& theJoined);
+  virtual void Join(const std::shared_ptr<Events_MessageGroup>& theJoined);
 };
 
 /// Message that feature was deleted (used for Object Browser update)
 class Model_ObjectDeletedMessage : public ModelAPI_ObjectDeletedMessage
 {
-  boost::shared_ptr<ModelAPI_Document> myDoc;  ///< document owner of the feature
+  std::shared_ptr<ModelAPI_Document> myDoc;  ///< document owner of the feature
   std::set<std::string> myGroups;  ///< group identifiers that contained the deleted feature
 
   /// Use ModelAPI for creation of this event.
-  Model_ObjectDeletedMessage(const boost::shared_ptr<ModelAPI_Document>& theDoc,
+  Model_ObjectDeletedMessage(const std::shared_ptr<ModelAPI_Document>& theDoc,
                              const std::string& theGroup);
 
   friend class Model_EventCreator;
  public:
   /// Returns the feature that has been updated
-  virtual boost::shared_ptr<ModelAPI_Document> document() const
+  virtual std::shared_ptr<ModelAPI_Document> document() const
   {
     return myDoc;
   }
@@ -69,11 +73,14 @@ class Model_ObjectDeletedMessage : public ModelAPI_ObjectDeletedMessage
     return myGroups;
   }
 
-  virtual boost::shared_ptr<Events_MessageGroup> newEmpty();
+  /// Returns the new empty message of this type
+  virtual std::shared_ptr<Events_MessageGroup> newEmpty();
 
+  /// Returns the identifier of this message
   virtual const Events_ID messageId();
 
-  virtual void Join(const boost::shared_ptr<Events_MessageGroup>& theJoined);
+  /// Appends to this message the given one
+  virtual void Join(const std::shared_ptr<Events_MessageGroup>& theJoined);
 };
 
 #endif