+ //! \param theID creates feature and puts it in the document (if it is not action)
+ //! \param theMakeCurrent to make current this new feature in this document
+ virtual std::shared_ptr<ModelAPI_Feature> addFeature(std::string theID,
+ const bool theMakeCurrent = true) = 0;
+
+ //! Return a list of features, which refers to the feature
+ //! \param theFeature a feature
+ //! \param theRefs a list of features
+ //! \param isSendError a flag whether the error message should be send
+ virtual void refsToFeature(std::shared_ptr<ModelAPI_Feature> theFeature,
+ std::set<std::shared_ptr<ModelAPI_Feature> >& theRefs,
+ const bool isSendError = true) = 0;
+
+ //! Removes the feature from the document
+ //! \param theFeature a feature to be removed
+ virtual void removeFeature(std::shared_ptr<ModelAPI_Feature> theFeature) = 0;
+
+ //! Moves the feature to make it after the given one in the history.
+ virtual void moveFeature(std::shared_ptr<ModelAPI_Feature> theMoved,
+ std::shared_ptr<ModelAPI_Feature> theAfterThis,
+ const bool theSplit = false) = 0;
+
+ ///! Returns the id of the document
+ virtual const int id() const = 0;
+
+ //! Returns the object in the group by the index (started from zero)
+ //! \param theGroupID group that contains an object
+ //! \param theIndex zero-based index of feature in the group
+ //! \param theAllowFolder take into account grouping feature by folders
+ virtual std::shared_ptr<ModelAPI_Object> object(const std::string& theGroupID,
+ const int theIndex,
+ const bool theAllowFolder = false) = 0;
+
+ //! Returns the first found object in the group by the object name
+ //! \param theGroupID group that contains an object
+ //! \param theName name of the object to search
+ //! \returns null if such object is not found
+ virtual std::shared_ptr<ModelAPI_Object> objectByName(const std::string& theGroupID,
+ const std::wstring& theName) = 0;
+
+ //! Returns the object index in the group. Object must be visible. Otherwise returns -1.
+ //! \param theObject object of this document
+ //! \param theAllowFolder take into account grouping feature by folders
+ //! \returns index started from zero, or -1 if object is invisible or belongs to another document
+ virtual const int index(std::shared_ptr<ModelAPI_Object> theObject,
+ const bool theAllowFolder = false) = 0;
+
+ //! Returns the number of objects in the group of objects
+ //! \param theGroupID group of objects
+ //! \param theAllowFolder take into account grouping feature by folders
+ virtual int size(const std::string& theGroupID, const bool theAllowFolder = false) = 0;
+
+ //! Returns the parent object of this child. This may be result or feature, parent of a
+ //! top result. Fast method, that uses internal data structure specifics.
+ virtual std::shared_ptr<ModelAPI_Object> parent(
+ const std::shared_ptr<ModelAPI_Object> theChild) = 0;
+
+ //! Returns the feature that is currently edited in this document, normally
+ //! this is the latest created feature
+ //! \param theVisible use visible features only: flag is true for Object Browser functionality
+ //! \returns null if next created feature must be the first
+ virtual std::shared_ptr<ModelAPI_Feature> currentFeature(const bool theVisible) = 0;
+
+ //! Sets the current feature: all features below will be disabled, new features
+ //! will be appended after this one. This method does not flushes the events appeared:
+ //! it will be done by the finishOperation, or direct flushes
+ //! \param theCurrent the selected feature as current: blow it everything become disabled
+ //! \param theVisible use visible features only: flag is true for Object Browser functionality
+ virtual void setCurrentFeature(std::shared_ptr<ModelAPI_Feature> theCurrent,
+ const bool theVisible) = 0;
+ //! Makes the current feature one feature upper
+ virtual void setCurrentFeatureUp() = 0;
+
+ //! Returns the number of all features: in the history or not
+ virtual int numInternalFeatures() = 0;
+ //! Returns the feature by zero-based index: features in the history or not
+ virtual std::shared_ptr<ModelAPI_Feature> internalFeature(const int theIndex) = 0;
+ //! Performs synchronization of transactions with the module document:
+ //! If some document is not active (by undo of activation) but in memory,
+ //! on activation the transactions must be synchronized because all redo-s performed
+ //! without this participation
+ virtual void synchronizeTransactions() = 0;