X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=src%2FModelAPI%2FModelAPI_Attribute.h;h=55cbb7cfd9c1d8fc82b2c3ee3ccff5980db91c46;hb=388c833ce58fe2991881c9a66d529d805fa84bd5;hp=d00bbc76a4d8132db951fd9f71a2440384d82e12;hpb=c52423b158d7e2bae396c62e4fe62e7e8f78c381;p=modules%2Fshaper.git diff --git a/src/ModelAPI/ModelAPI_Attribute.h b/src/ModelAPI/ModelAPI_Attribute.h index d00bbc76a..55cbb7cfd 100644 --- a/src/ModelAPI/ModelAPI_Attribute.h +++ b/src/ModelAPI/ModelAPI_Attribute.h @@ -9,7 +9,7 @@ #include #include -class ModelAPI_Feature; +class ModelAPI_Object; /**\class ModelAPI_Attribute * \ingroup DataModel @@ -18,7 +18,9 @@ class ModelAPI_Feature; class ModelAPI_Attribute { ///< needed here to emit signal that feature changed on change of the attribute - boost::shared_ptr myFeature; + boost::shared_ptr myObject; +protected: // accessible from the attributes + bool myIsInitialized; public: /// Returns the type of this class of attributes, not static method @@ -28,15 +30,22 @@ public: MODELAPI_EXPORT virtual ~ModelAPI_Attribute() {} /// Sets the owner of this attribute - MODELAPI_EXPORT void setFeature(const boost::shared_ptr& theFeature) - {myFeature = theFeature;} + MODELAPI_EXPORT void setObject(const boost::shared_ptr& theObject) + {myObject = theObject;} /// Returns the owner of this attribute - MODELAPI_EXPORT const boost::shared_ptr& feature() - {return myFeature;} + MODELAPI_EXPORT const boost::shared_ptr& owner() + {return myObject;} + + /// Returns true if attribute was initialized by some value + MODELAPI_EXPORT bool isInitialized() {return myIsInitialized;} + + /// Makes attribute initialized + MODELAPI_EXPORT void setInitialized() {myIsInitialized = true;} + protected: /// Objects are created for features automatically - ModelAPI_Attribute(){} + ModelAPI_Attribute() {myIsInitialized = false;} };