SHAPER  9.12.0
Model_AttributeRefAttr Class Reference

Attribute that contains reference to an attribute of a feature (located in the same document). More...

Inheritance diagram for Model_AttributeRefAttr:
Inheritance graph

Public Member Functions

virtual bool isObject ()
 Returns true if this attribute references to a object (not to the attribute) More...
 
virtual void setAttr (std::shared_ptr< ModelAPI_Attribute > theAttr)
 Defines the reference to the attribute. More...
 
virtual std::shared_ptr< ModelAPI_Attributeattr ()
 Returns attribute referenced from this attribute. More...
 
virtual void setObject (ObjectPtr theFeature)
 Defines the reference to the object. More...
 
virtual ObjectPtr object ()
 Returns object referenced from this attribute. More...
 
virtual bool isInitialized ()
 Returns true if attribute was initialized by some value. More...
 
virtual void setObject (const std::shared_ptr< ModelAPI_Object > &theObject)
 Sets the owner of this attribute. More...
 
virtual std::string attributeType ()
 Returns the type of this class of attributes, not static method. More...
 
const std::shared_ptr< ModelAPI_Object > & owner () const
 Returns the owner of this attribute. More...
 
void setInitialized ()
 Makes attribute initialized. More...
 
bool blockSetInitialized (const bool theBlock)
 Blocks sending "attribute updated" if theBlock is true. More...
 
void setIsArgument (const bool theFlag)
 Set this attribute is argument for result (change of this attribute requires update of result). More...
 
bool isArgument ()
 Returns true if attribute causes the result change. More...
 
bool setImmutable (const bool theFlag)
 Immutable argument can not be changed programmatically (e.g. More...
 
bool isImmutable ()
 Returns true if can not be changed programmatically. More...
 
const std::string & id () const
 ID of the attribute in Data. More...
 
virtual void reset ()
 Resets attribute to deafult state. More...
 

Static Public Member Functions

static std::string typeId ()
 Returns the type of this class of attributes. More...
 

Protected Member Functions

 Model_AttributeRefAttr (TDF_Label &theLabel)
 Objects are created for features automatically. More...
 
virtual void reinit ()
 Reinitializes the internal state of the attribute (may be needed on undo/redo, abort, etc) More...
 
virtual void setID (const std::string theID)
 Sets the ID of the attribute in Data (called from Data) More...
 

Protected Attributes

bool myIsInitialized
 is some value assigned to this attribute More...
 
bool mySetInitializedBlocked
 is initialized blocked More...
 
bool myIsArgument
 is this attribute used as an argument for execution More...
 
bool myIsImmutable
 is this attribute can be changed programmatically (e.g. by constraint) More...
 

Friends

class Model_Data
 

Detailed Description

Attribute that contains reference to an attribute of a feature (located in the same document).

Constructor & Destructor Documentation

◆ Model_AttributeRefAttr()

Model_AttributeRefAttr::Model_AttributeRefAttr ( TDF_Label &  theLabel)
protected

Objects are created for features automatically.

Member Function Documentation

◆ isObject()

bool Model_AttributeRefAttr::isObject ( )
virtual

Returns true if this attribute references to a object (not to the attribute)

Implements ModelAPI_AttributeRefAttr.

◆ setAttr()

void Model_AttributeRefAttr::setAttr ( std::shared_ptr< ModelAPI_Attribute theAttr)
virtual

Defines the reference to the attribute.

Implements ModelAPI_AttributeRefAttr.

◆ attr()

std::shared_ptr< ModelAPI_Attribute > Model_AttributeRefAttr::attr ( )
virtual

Returns attribute referenced from this attribute.

Implements ModelAPI_AttributeRefAttr.

◆ setObject() [1/2]

void Model_AttributeRefAttr::setObject ( ObjectPtr  theFeature)
virtual

Defines the reference to the object.

Implements ModelAPI_AttributeRefAttr.

◆ object()

ObjectPtr Model_AttributeRefAttr::object ( )
virtual

Returns object referenced from this attribute.

Implements ModelAPI_AttributeRefAttr.

◆ isInitialized()

bool Model_AttributeRefAttr::isInitialized ( )
virtual

Returns true if attribute was initialized by some value.

Reimplemented from ModelAPI_Attribute.

◆ reinit()

void Model_AttributeRefAttr::reinit ( )
protectedvirtual

Reinitializes the internal state of the attribute (may be needed on undo/redo, abort, etc)

Reimplemented from ModelAPI_Attribute.

◆ setObject() [2/2]

void ModelAPI_Attribute::setObject ( const std::shared_ptr< ModelAPI_Object > &  theObject)
virtualinherited

Sets the owner of this attribute.

Reimplemented in Model_AttributeSelection, and Model_AttributeReference.

◆ typeId()

static std::string ModelAPI_AttributeRefAttr::typeId ( )
inlinestaticinherited

Returns the type of this class of attributes.

◆ attributeType()

std::string ModelAPI_AttributeRefAttr::attributeType ( )
virtualinherited

Returns the type of this class of attributes, not static method.

Implements ModelAPI_Attribute.

◆ owner()

const std::shared_ptr< ModelAPI_Object > & ModelAPI_Attribute::owner ( ) const
inherited

Returns the owner of this attribute.

◆ setInitialized()

void ModelAPI_Attribute::setInitialized ( )
inherited

Makes attribute initialized.

◆ blockSetInitialized()

bool ModelAPI_Attribute::blockSetInitialized ( const bool  theBlock)
inherited

Blocks sending "attribute updated" if theBlock is true.

Parameters
theBlocka block value
Returns
the previous block value

◆ setIsArgument()

void ModelAPI_Attribute::setIsArgument ( const bool  theFlag)
inherited

Set this attribute is argument for result (change of this attribute requires update of result).

By default it is true.

◆ isArgument()

bool ModelAPI_Attribute::isArgument ( )
inherited

Returns true if attribute causes the result change.

◆ setImmutable()

bool ModelAPI_Attribute::setImmutable ( const bool  theFlag)
inherited

Immutable argument can not be changed programmatically (e.g.

by constraint) By default it is false. Returns the previous state of the attribute's immutability.

◆ isImmutable()

bool ModelAPI_Attribute::isImmutable ( )
inherited

Returns true if can not be changed programmatically.

◆ id()

const std::string & ModelAPI_Attribute::id ( ) const
inherited

ID of the attribute in Data.

◆ reset()

void ModelAPI_Attribute::reset ( )
virtualinherited

Resets attribute to deafult state.

Reimplemented in Model_AttributeSelection, Model_AttributeDouble, GeomData_Point2D, and GeomData_Dir.

◆ setID()

void ModelAPI_Attribute::setID ( const std::string  theID)
protectedvirtualinherited

Sets the ID of the attribute in Data (called from Data)

Reimplemented in Model_AttributeSelection.

Field Documentation

◆ myIsInitialized

bool ModelAPI_Attribute::myIsInitialized
protectedinherited

is some value assigned to this attribute

◆ mySetInitializedBlocked

bool ModelAPI_Attribute::mySetInitializedBlocked
protectedinherited

is initialized blocked

◆ myIsArgument

bool ModelAPI_Attribute::myIsArgument
protectedinherited

is this attribute used as an argument for execution

◆ myIsImmutable

bool ModelAPI_Attribute::myIsImmutable
protectedinherited

is this attribute can be changed programmatically (e.g. by constraint)