1 // File: ModelAPI_Object.hxx
2 // Created: 21 Mar 2014
3 // Author: Mikhail PONIKAROV
5 #ifndef ModelAPI_Object_HeaderFile
6 #define ModelAPI_Object_HeaderFile
12 class ModelAPI_AttributeDocRef;
14 /**\class ModelAPI_Object
16 * \brief General object of the application that allows
17 * to get/set attributes from the document and compute result of an operation.
20 class MODELAPI_EXPORT ModelAPI_Object
24 /// Returns the name of the feature visible by the user in the object browser
25 virtual std::string getName() = 0;
27 /// Defines the name of the feature visible by the user in the object browser
28 virtual void setName(std::string theName) = 0;
30 /// Returns the attribute that references to another document
31 virtual std::shared_ptr<ModelAPI_AttributeDocRef> docRef(const std::string theID) = 0;
33 /// Initializes object by the attributes: must be called just after the object is created
34 /// for each attribute of the object
35 /// \param theID identifier of the attribute that can be referenced by this ID later
36 /// \param theAttrType type of the created attribute (received from the type method)
37 virtual void addAttribute(std::string theID, std::string theAttrType) = 0;
40 /// Objects are created for features automatically