SHAPER  9.12.0
ModelAPI_AttributeInteger Class Referenceabstract

API for the attribute that contains integer (int). More...

Inheritance diagram for ModelAPI_AttributeInteger:
Inheritance graph

Public Member Functions

virtual MODELAPI_EXPORT void setValue (const int theValue)=0
 Defines the integer value. More...
 
virtual MODELAPI_EXPORT int value ()=0
 Returns the integer value. More...
 
virtual MODELAPI_EXPORT void setCalculatedValue (const int theValue)=0
 Defines the calculated value. More...
 
virtual MODELAPI_EXPORT void setText (const std::wstring &theText)=0
 Defines the text value. More...
 
virtual MODELAPI_EXPORT std::wstring text ()=0
 Returns the text value. More...
 
virtual MODELAPI_EXPORT void setExpressionInvalid (const bool theFlag)=0
 Allows to set expression (text) as invalid (by the parameters listener) More...
 
virtual MODELAPI_EXPORT bool expressionInvalid ()=0
 Returns true if text is invalid. More...
 
virtual MODELAPI_EXPORT void setExpressionError (const std::string &theError)=0
 Allows to set expression (text) error (by the parameters listener) More...
 
virtual MODELAPI_EXPORT std::string expressionError ()=0
 Returns an expression error. More...
 
virtual MODELAPI_EXPORT void setUsedParameters (const std::set< std::wstring > &theUsedParameters)=0
 Defines the used parameters. More...
 
virtual MODELAPI_EXPORT std::set< std::wstring > usedParameters () const =0
 Returns the used parameters. More...
 
virtual MODELAPI_EXPORT std::string attributeType ()
 Returns the type of this class of attributes, not static method. More...
 
virtual MODELAPI_EXPORT ~ModelAPI_AttributeInteger ()
 To virtually destroy the fields of successors. More...
 
virtual void setObject (const std::shared_ptr< ModelAPI_Object > &theObject)
 Sets the owner of this attribute. More...
 
const std::shared_ptr< ModelAPI_Object > & owner () const
 Returns the owner of this attribute. More...
 
virtual bool isInitialized ()
 Returns true if attribute was initialized by some value. 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 MODELAPI_EXPORT std::string typeId ()
 Returns the type of this class of attributes. More...
 

Protected Member Functions

MODELAPI_EXPORT ModelAPI_AttributeInteger ()
 Objects are created for features automatically. More...
 
virtual void setID (const std::string theID)
 Sets the ID of the attribute in Data (called from Data) More...
 
virtual void reinit ()
 Reinitializes the internal state of the attribute (may be needed on undo/redo, abort, etc) 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...
 

Detailed Description

API for the attribute that contains integer (int).

Constructor & Destructor Documentation

◆ ~ModelAPI_AttributeInteger()

ModelAPI_AttributeInteger::~ModelAPI_AttributeInteger ( )
virtual

To virtually destroy the fields of successors.

◆ ModelAPI_AttributeInteger()

ModelAPI_AttributeInteger::ModelAPI_AttributeInteger ( )
protected

Objects are created for features automatically.

Member Function Documentation

◆ setValue()

virtual MODELAPI_EXPORT void ModelAPI_AttributeInteger::setValue ( const int  theValue)
pure virtual

Defines the integer value.

Implemented in Model_AttributeInteger.

◆ value()

virtual MODELAPI_EXPORT int ModelAPI_AttributeInteger::value ( )
pure virtual

Returns the integer value.

Implemented in Model_AttributeInteger.

◆ setCalculatedValue()

virtual MODELAPI_EXPORT void ModelAPI_AttributeInteger::setCalculatedValue ( const int  theValue)
pure virtual

Defines the calculated value.

Implemented in Model_AttributeInteger.

◆ setText()

virtual MODELAPI_EXPORT void ModelAPI_AttributeInteger::setText ( const std::wstring &  theText)
pure virtual

Defines the text value.

Implemented in Model_AttributeInteger.

◆ text()

virtual MODELAPI_EXPORT std::wstring ModelAPI_AttributeInteger::text ( )
pure virtual

Returns the text value.

Implemented in Model_AttributeInteger.

◆ setExpressionInvalid()

virtual MODELAPI_EXPORT void ModelAPI_AttributeInteger::setExpressionInvalid ( const bool  theFlag)
pure virtual

Allows to set expression (text) as invalid (by the parameters listener)

Implemented in Model_AttributeInteger.

◆ expressionInvalid()

virtual MODELAPI_EXPORT bool ModelAPI_AttributeInteger::expressionInvalid ( )
pure virtual

Returns true if text is invalid.

Implemented in Model_AttributeInteger.

◆ setExpressionError()

virtual MODELAPI_EXPORT void ModelAPI_AttributeInteger::setExpressionError ( const std::string &  theError)
pure virtual

Allows to set expression (text) error (by the parameters listener)

Implemented in Model_AttributeInteger.

◆ expressionError()

virtual MODELAPI_EXPORT std::string ModelAPI_AttributeInteger::expressionError ( )
pure virtual

Returns an expression error.

Implemented in Model_AttributeInteger.

◆ setUsedParameters()

virtual MODELAPI_EXPORT void ModelAPI_AttributeInteger::setUsedParameters ( const std::set< std::wstring > &  theUsedParameters)
pure virtual

Defines the used parameters.

Implemented in Model_AttributeInteger.

◆ usedParameters()

virtual MODELAPI_EXPORT std::set<std::wstring> ModelAPI_AttributeInteger::usedParameters ( ) const
pure virtual

Returns the used parameters.

Implemented in Model_AttributeInteger.

◆ typeId()

static MODELAPI_EXPORT std::string ModelAPI_AttributeInteger::typeId ( )
inlinestatic

Returns the type of this class of attributes.

◆ attributeType()

std::string ModelAPI_AttributeInteger::attributeType ( )
virtual

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

Implements ModelAPI_Attribute.

◆ setObject()

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.

◆ owner()

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

Returns the owner of this attribute.

◆ isInitialized()

bool ModelAPI_Attribute::isInitialized ( )
virtualinherited

◆ 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.

◆ reinit()

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)