SHAPER  9.12.0
Model_AttributeDouble Class Reference

Attribute that contains real value with double precision. More...

Inheritance diagram for Model_AttributeDouble:
Inheritance graph

Public Member Functions

virtual void setValue (const double theValue)
 Defines the double value. More...
 
virtual double value ()
 Returns the double value. More...
 
virtual void setCalculatedValue (const double theValue)
 Defines the calculated double value. More...
 
virtual void setText (const std::wstring &theText)
 Defines the text value. More...
 
virtual std::wstring text ()
 Returns the text value. More...
 
virtual void setExpressionInvalid (const bool theFlag)
 Allows to set expression (text) as invalid (by the parameters listener) More...
 
virtual bool expressionInvalid ()
 Returns true if text is invalid. More...
 
virtual void setExpressionError (const std::string &theError)
 Allows to set expression (text) error (by the parameters listener) More...
 
virtual std::string expressionError ()
 Returns an expression error. More...
 
virtual void setUsedParameters (const std::set< std::wstring > &theUsedParameters)
 Defines the used parameters. More...
 
virtual std::set< std::wstring > usedParameters () const
 Returns the used parameters. More...
 
virtual MODELAPI_EXPORT std::string attributeType ()
 Returns the type of this class of attributes, not static method. 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...
 

Static Public Member Functions

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

Protected Member Functions

 Model_AttributeDouble (TDF_Label &theLabel)
 Initializes attributes. More...
 
virtual void reinit ()
 Reinitializes the internal state of the attribute (may be needed on undo/redo, abort, etc) More...
 
virtual void reset ()
 Resets attribute to deafult state. 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 real value with double precision.

Constructor & Destructor Documentation

◆ Model_AttributeDouble()

Model_AttributeDouble::Model_AttributeDouble ( TDF_Label &  theLabel)
protected

Initializes attributes.

Member Function Documentation

◆ setValue()

void Model_AttributeDouble::setValue ( const double  theValue)
virtual

Defines the double value.

Implements ModelAPI_AttributeDouble.

◆ value()

double Model_AttributeDouble::value ( )
virtual

Returns the double value.

Implements ModelAPI_AttributeDouble.

◆ setCalculatedValue()

void Model_AttributeDouble::setCalculatedValue ( const double  theValue)
virtual

Defines the calculated double value.

Implements ModelAPI_AttributeDouble.

◆ setText()

void Model_AttributeDouble::setText ( const std::wstring &  theText)
virtual

Defines the text value.

Implements ModelAPI_AttributeDouble.

◆ text()

std::wstring Model_AttributeDouble::text ( )
virtual

Returns the text value.

Implements ModelAPI_AttributeDouble.

◆ setExpressionInvalid()

void Model_AttributeDouble::setExpressionInvalid ( const bool  theFlag)
virtual

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

Implements ModelAPI_AttributeDouble.

◆ expressionInvalid()

bool Model_AttributeDouble::expressionInvalid ( )
virtual

Returns true if text is invalid.

Implements ModelAPI_AttributeDouble.

◆ setExpressionError()

void Model_AttributeDouble::setExpressionError ( const std::string &  theError)
virtual

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

Implements ModelAPI_AttributeDouble.

◆ expressionError()

std::string Model_AttributeDouble::expressionError ( )
virtual

Returns an expression error.

Implements ModelAPI_AttributeDouble.

◆ setUsedParameters()

void Model_AttributeDouble::setUsedParameters ( const std::set< std::wstring > &  theUsedParameters)
virtual

Defines the used parameters.

Implements ModelAPI_AttributeDouble.

◆ usedParameters()

std::set< std::wstring > Model_AttributeDouble::usedParameters ( ) const
virtual

Returns the used parameters.

Implements ModelAPI_AttributeDouble.

◆ reinit()

void Model_AttributeDouble::reinit ( )
protectedvirtual

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

Reimplemented from ModelAPI_Attribute.

◆ reset()

void Model_AttributeDouble::reset ( )
protectedvirtual

Resets attribute to deafult state.

Reimplemented from ModelAPI_Attribute.

◆ typeId()

static MODELAPI_EXPORT std::string ModelAPI_AttributeDouble::typeId ( )
inlinestaticinherited

Returns the type of this class of attributes.

◆ attributeType()

std::string ModelAPI_AttributeDouble::attributeType ( )
virtualinherited

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.

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