//! Loads the OCAF document from the file.
//! \param theFileName full name of the file to load
- //! \param theStudyID identifier of the SALOME study to associate with loaded file
//! \returns true if file was loaded successfully
MODEL_EXPORT virtual bool load(const char* theFileName);
//! Starts a new operation (opens a tansaction)
MODEL_EXPORT virtual void startOperation();
//! Finishes the previously started operation (closes the transaction)
- //! Returns true if transaction in this document is not empty and really was performed
- MODEL_EXPORT virtual void finishOperation();
+ //! \returns true if transaction in this document is not empty and really was performed
+ MODEL_EXPORT virtual bool finishOperation();
//! Aborts the operation
MODEL_EXPORT virtual void abortOperation();
//! Returns true if operation has been started, but not yet finished or aborted
MODEL_EXPORT virtual void redo();
//! Adds to the document the new feature of the given feature id
- //! \param creates feature and puts it in the document
+ //! \param theID creates feature and puts it in the document
MODEL_EXPORT virtual FeaturePtr addFeature(std::string theID);
+ //! Return a list of features, which refers to the feature
+ //! \param theFeature a feature
+ //! \param theRefs a list of reference features
+ //! \param isSendError a flag whether the error message should be send
+ MODEL_EXPORT virtual void refsToFeature(FeaturePtr theFeature,
+ std::set<FeaturePtr>& theRefs,
+ const bool isSendError = true);
+
//! Removes the feature from the document (with result)
- //! \param theCheck if it is false, do not check the references
- MODEL_EXPORT virtual void removeFeature(FeaturePtr theFeature, const bool theCheck = true);
+ //! \param theFeature a removed feature
+ MODEL_EXPORT virtual void removeFeature(FeaturePtr theFeature);
//! Returns the existing feature by the label
//! \param theLabel base label of the feature
//! Returns the feature in the group by the index (started from zero)
//! \param theGroupID group that contains a feature
//! \param theIndex zero-based index of feature in the group
- //! \param isOperation if it is true, returns feature (not Object)
//! \param theHidden if it is true, it counts also the features that are not in tree
MODEL_EXPORT virtual ObjectPtr object(const std::string& theGroupID, const int theIndex,
const bool theHidden = false);
//! Creates new document with binary file format
Model_Document(const std::string theID, const std::string theKind);
+ //! Returns the internal OCCT document of this interface
Handle_TDocStd_Document document()
{
return myDoc;
const std::set<std::string> subDocuments(const bool theActivatedOnly) const;
//! The implementation of undo: with or without recoursive calls in the sub-documents
- void undoInternal(const bool theWithSubs);
+ void undoInternal(const bool theWithSubs, const bool theSynchronize);
friend class Model_Application;
friend class Model_Session;