20 #ifndef ModelAPI_Attribute_H_
21 #define ModelAPI_Attribute_H_
36 std::shared_ptr<ModelAPI_Object> myObject;
54 MODELAPI_EXPORT
virtual void setObject(
const std::shared_ptr<ModelAPI_Object>& theObject);
57 MODELAPI_EXPORT
const std::shared_ptr<ModelAPI_Object>&
owner()
const;
87 MODELAPI_EXPORT
const std::string&
id()
const;
90 MODELAPI_EXPORT
virtual void reset();
97 MODELAPI_EXPORT
virtual void setID(
const std::string theID);
100 MODELAPI_EXPORT
virtual void reinit();
107 typedef std::shared_ptr<ModelAPI_Attribute> AttributePtr;
Generic attribute of the Object.
Definition: ModelAPI_Attribute.h:34
bool myIsArgument
is this attribute used as an argument for execution
Definition: ModelAPI_Attribute.h:42
virtual void setID(const std::string theID)
Sets the ID of the attribute in Data (called from Data)
Definition: ModelAPI_Attribute.cpp:95
virtual std::string attributeType()=0
Returns the type of this class of attributes, not static method.
ModelAPI_Attribute()
Objects are created for features automatically.
Definition: ModelAPI_Attribute.cpp:86
virtual void reset()
Resets attribute to deafult state.
Definition: ModelAPI_Attribute.cpp:102
bool myIsImmutable
is this attribute can be changed programmatically (e.g. by constraint)
Definition: ModelAPI_Attribute.h:43
virtual bool isInitialized()
Returns true if attribute was initialized by some value.
Definition: ModelAPI_Attribute.cpp:39
bool blockSetInitialized(const bool theBlock)
Blocks sending "attribute updated" if theBlock is true.
Definition: ModelAPI_Attribute.cpp:50
virtual void reinit()
Reinitializes the internal state of the attribute (may be needed on undo/redo, abort,...
Definition: ModelAPI_Attribute.cpp:100
bool isArgument()
Returns true if attribute causes the result change.
Definition: ModelAPI_Attribute.cpp:64
bool myIsInitialized
is some value assigned to this attribute
Definition: ModelAPI_Attribute.h:40
bool isImmutable()
Returns true if can not be changed programmatically.
Definition: ModelAPI_Attribute.cpp:76
bool mySetInitializedBlocked
is initialized blocked
Definition: ModelAPI_Attribute.h:41
const std::shared_ptr< ModelAPI_Object > & owner() const
Returns the owner of this attribute.
Definition: ModelAPI_Attribute.cpp:33
virtual void setObject(const std::shared_ptr< ModelAPI_Object > &theObject)
Sets the owner of this attribute.
Definition: ModelAPI_Attribute.cpp:27
const std::string & id() const
ID of the attribute in Data.
Definition: ModelAPI_Attribute.cpp:81
void setInitialized()
Makes attribute initialized.
Definition: ModelAPI_Attribute.cpp:44
bool setImmutable(const bool theFlag)
Immutable argument can not be changed programmatically (e.g.
Definition: ModelAPI_Attribute.cpp:69
virtual ~ModelAPI_Attribute()
To virtually destroy the fields of successors.
Definition: ModelAPI_Attribute.cpp:22
void setIsArgument(const bool theFlag)
Set this attribute is argument for result (change of this attribute requires update of result).
Definition: ModelAPI_Attribute.cpp:59
Represents any object in the data model and in the object browser.
Definition: ModelAPI_Object.h:45
General object of the application that allows to get/set attributes from the document and compute res...
Definition: Model_Data.h:61
Manager of objects of the document.
Definition: Model_Objects.h:46