X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=src%2FModelAPI%2FModelAPI_Data.h;h=5d6e36d5f8e7a9293b47180b3f84a85c3c76be23;hb=0c89bf75254d86feded0577ac60d0b8c5c4949e3;hp=f8dd2289673e932f53d9d01a26df8e5acee9c17b;hpb=e3cdcd3e1329acba45cd12baf064345ab94fd98b;p=modules%2Fshaper.git diff --git a/src/ModelAPI/ModelAPI_Data.h b/src/ModelAPI/ModelAPI_Data.h index f8dd22896..5d6e36d5f 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; @@ -14,8 +15,10 @@ class ModelAPI_AttributeDouble; class ModelAPI_AttributeReference; class ModelAPI_AttributeRefAttr; class ModelAPI_AttributeRefList; +class ModelAPI_AttributeBoolean; class ModelAPI_Document; class ModelAPI_Attribute; +class GeomAPI_Shape; /**\class ModelAPI_Data * \ingroup DataModel @@ -43,10 +46,16 @@ public: virtual boost::shared_ptr refattr(const std::string theID) = 0; /// Returns the attribute that contains list of references to features virtual boost::shared_ptr reflist(const std::string theID) = 0; + /// Returns the attribute that contains boolean value + virtual boost::shared_ptr boolean(const std::string theID) = 0; /// 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; @@ -55,12 +64,21 @@ 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() {}