1 // Copyright (C) 2014-20xx CEA/DEN, EDF R&D
3 // File: ModelAPI_Attribute.cpp
5 // Author: Mikhail PONIKAROV
7 #include <ModelAPI_Attribute.h>
9 ModelAPI_Attribute::~ModelAPI_Attribute()
13 /// Sets the owner of this attribute
14 void ModelAPI_Attribute::setObject(const std::shared_ptr<ModelAPI_Object>& theObject)
19 /// Returns the owner of this attribute
20 const std::shared_ptr<ModelAPI_Object>& ModelAPI_Attribute::owner() const
25 /// Returns true if attribute was initialized by some value
26 bool ModelAPI_Attribute::isInitialized()
28 return myIsInitialized;
31 void ModelAPI_Attribute::setInitialized()
33 if (!mySetInitializedBlocked)
34 myIsInitialized = true;
37 bool ModelAPI_Attribute::blockSetInitialized(const bool theBlock)
39 bool aBlocked = mySetInitializedBlocked;
41 mySetInitializedBlocked = theBlock;
46 void ModelAPI_Attribute::setIsArgument(const bool theFlag)
48 myIsArgument = theFlag;
51 bool ModelAPI_Attribute::isArgument()
56 bool ModelAPI_Attribute::setImmutable(const bool theFlag)
58 bool aResult = myIsImmutable;
59 myIsImmutable = theFlag;
63 bool ModelAPI_Attribute::isImmutable()
68 const std::string& ModelAPI_Attribute::id() const
73 ModelAPI_Attribute::ModelAPI_Attribute()
75 mySetInitializedBlocked = false;
76 myIsInitialized = false;
78 myIsImmutable = false;
81 /// Sets the ID of the attribute in Data (called from Data)
82 void ModelAPI_Attribute::setID(const std::string theID)
87 void ModelAPI_Attribute::reinit() {}
89 void ModelAPI_Attribute::reset()
91 myIsInitialized = false;