class ModelAPI_ResultBody;
class ModelAPI_ResultPart;
class ModelAPI_ResultGroup;
+class ModelAPI_ResultField;
class ModelAPI_ResultParameter;
class ModelAPI_Data;
class GeomAPI_Shape;
virtual const std::string& kind() const = 0;
//! Removes document data
- //! \param theForever if it is false, document is just hiden (to keep possibility make it back on Undo/Redo)
+ //! \param theForever if it is false, document is just hiden
+ //! (to keep possibility make it back on Undo/Redo)
virtual void close(const bool theForever = false) = 0;
//! Adds to the document the new feature of the given feature id
//! \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,
+ 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
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,
+ virtual void moveFeature(std::shared_ptr<ModelAPI_Feature> theMoved,
std::shared_ptr<ModelAPI_Feature> theAfterThis) = 0;
///! Returns the id of the document
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 synchronised because all redos performed
+ //! on activation the transactions must be synchronised because all redos performed
//! wihtout this participation
virtual void synchronizeTransactions() = 0;
//! Creates a group result
virtual std::shared_ptr<ModelAPI_ResultGroup> createGroup(
const std::shared_ptr<ModelAPI_Data>& theFeatureData, const int theIndex = 0) = 0;
+ //! Creates a field result
+ virtual std::shared_ptr<ModelAPI_ResultField> createField(
+ const std::shared_ptr<ModelAPI_Data>& theFeatureData, const int theIndex = 0) = 0;
//! Creates a parameter result
virtual std::shared_ptr<ModelAPI_ResultParameter> createParameter(
const std::shared_ptr<ModelAPI_Data>& theFeatureData, const int theIndex = 0) = 0;
const std::shared_ptr<GeomAPI_Shape>& theShape) = 0;
/// Returns true if theLater is in history of features creation later than theCurrent
- virtual bool isLater(std::shared_ptr<ModelAPI_Feature> theLater,
+ virtual bool isLater(std::shared_ptr<ModelAPI_Feature> theLater,
std::shared_ptr<ModelAPI_Feature> theCurrent) const = 0;
//! Internally makes document know that feature was removed or added in history after creation
MODELAPI_EXPORT virtual void updateHistory(const std::string theGroup) = 0;
+ /// Stores in the document boolean flags: states of the nodes in the object browser.
+ /// Normally is called outside of the transaction, just before "save".
+ MODELAPI_EXPORT virtual void storeNodesState(const std::list<bool>& theStates) = 0;
+
+ /// Returns the stored nodes states. Normally it is calles just after "open".
+ /// Appends the values to theStates list.
+ MODELAPI_EXPORT virtual void restoreNodesState(std::list<bool>& theStates) const = 0;
+
protected:
//! Only for SWIG wrapping it is here
MODELAPI_EXPORT ModelAPI_Document();