X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=src%2FModelAPI%2FModelAPI_Data.h;h=eea1d1ae87ac75bbc9f4c614edb2907467d4cc14;hb=388c833ce58fe2991881c9a66d529d805fa84bd5;hp=76967d18143f6e50c00374755a0ad13fa5f6f110;hpb=38f16bcc8fd21226cd50a3d73457c139159ea4ec;p=modules%2Fshaper.git diff --git a/src/ModelAPI/ModelAPI_Data.h b/src/ModelAPI/ModelAPI_Data.h index 76967d181..eea1d1ae8 100644 --- a/src/ModelAPI/ModelAPI_Data.h +++ b/src/ModelAPI/ModelAPI_Data.h @@ -7,6 +7,7 @@ #include "ModelAPI.h" #include +#include #include class ModelAPI_AttributeDocRef; @@ -30,7 +31,7 @@ class MODELAPI_EXPORT ModelAPI_Data public: /// Returns the name of the feature visible by the user in the object browser - virtual std::string getName() = 0; + virtual std::string name() = 0; /// Defines the name of the feature visible by the user in the object browser virtual void setName(std::string theName) = 0; @@ -51,6 +52,10 @@ public: /// Returns the generic attribute by identifier /// \param theID identifier of the attribute virtual boost::shared_ptr attribute(const std::string theID) = 0; + /// Returns all attributes ofthe feature of the given type + /// or all attributes if "theType" is empty + virtual std::list > + attributes(const std::string theType) = 0; /// Identifier by the id (not fast, iteration by map) /// \param theAttr attribute already created in this data virtual const std::string& id(const boost::shared_ptr theAttr) = 0; @@ -59,17 +64,16 @@ public: /// Returns true if it is correctly connected t othe data model virtual bool isValid() = 0; - /// Stores the shape (called by the execution method). - virtual void store(const boost::shared_ptr& theShape) = 0; - /// Returns the shape-result produced by this feature - virtual boost::shared_ptr shape() = 0; - /// Initializes object by the attributes: must be called just after the object is created /// for each attribute of the object /// \param theID identifier of the attribute that can be referenced by this ID later /// \param theAttrType type of the created attribute (received from the type method) virtual void addAttribute(std::string theID, std::string theAttrType) = 0; + /// Useful method for "set" methods of the attributes: sends an UPDATE event and + /// makes attribute initialized + virtual void sendAttributeUpdated(ModelAPI_Attribute* theAttr) = 0; + /// To virtually destroy the fields of successors virtual ~ModelAPI_Data() {}