SHAPER  9.12.0
ModelAPI_ExpressionInteger Class Referenceabstract

Expression for calculated integer values. More...

Inheritance diagram for ModelAPI_ExpressionInteger:
Inheritance graph

Public Member Functions

virtual void setValue (const int theValue)=0
 Defines the integer value. More...
 
virtual int value ()=0
 Returns the integer value. More...
 
virtual bool isInitialized ()
 Returns true if attribute was initialized by some value. More...
 
virtual void setInitialized ()
 Makes attribute initialized. More...
 
virtual void setText (const std::wstring &theText)=0
 Sets the text of this Expression. More...
 
virtual std::wstring text () const =0
 Returns the text of this Expression. More...
 
virtual void setInvalid (const bool theFlag)=0
 Allows to set expression (text) as invalid (by the parameters listener) More...
 
virtual bool isInvalid ()=0
 Returns true if text is invalid. More...
 
virtual void setError (const std::string &theError)=0
 Allows to set expression (text) error (by the parameters listener) More...
 
virtual std::string error ()=0
 Returns an expression error. More...
 
virtual void setUsedParameters (const std::set< std::wstring > &theUsedParameters)=0
 Defines the used parameters (by the parameters listener) More...
 
virtual std::set< std::wstring > usedParameters () const =0
 Returns the used parameters. More...
 

Static Public Member Functions

static bool isVariable (const std::string &theString)
 Returns True if the given string can be defined as a name of an expression variable. More...
 
static bool isVariable (const std::wstring &theString)
 Returns True if the given string can be defined as a name of an expression variable. More...
 

Protected Member Functions

 ModelAPI_ExpressionInteger ()
 Objects are created for features automatically. More...
 
virtual void reinit ()=0
 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...
 

Protected Attributes

bool myIsInitialized
 is some value assigned to this attribute More...
 

Friends

class Model_Data
 

Detailed Description

Expression for calculated integer values.

Constructor & Destructor Documentation

◆ ModelAPI_ExpressionInteger()

ModelAPI_ExpressionInteger::ModelAPI_ExpressionInteger ( )
protected

Objects are created for features automatically.

Member Function Documentation

◆ setValue()

virtual void ModelAPI_ExpressionInteger::setValue ( const int  theValue)
pure virtual

Defines the integer value.

Implemented in Model_ExpressionInteger.

◆ value()

virtual int ModelAPI_ExpressionInteger::value ( )
pure virtual

Returns the integer value.

Implemented in Model_ExpressionInteger.

◆ isInitialized()

bool ModelAPI_Expression::isInitialized ( )
virtualinherited

Returns true if attribute was initialized by some value.

◆ setInitialized()

void ModelAPI_Expression::setInitialized ( )
virtualinherited

Makes attribute initialized.

◆ setText()

virtual void ModelAPI_Expression::setText ( const std::wstring &  theText)
pure virtualinherited

Sets the text of this Expression.

Implemented in Model_ExpressionInteger, Model_ExpressionDouble, and Model_Expression.

◆ text()

virtual std::wstring ModelAPI_Expression::text ( ) const
pure virtualinherited

Returns the text of this Expression.

Implemented in Model_ExpressionInteger, Model_ExpressionDouble, and Model_Expression.

◆ setInvalid()

virtual void ModelAPI_Expression::setInvalid ( const bool  theFlag)
pure virtualinherited

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

Implemented in Model_ExpressionInteger, and Model_ExpressionDouble.

◆ isInvalid()

virtual bool ModelAPI_Expression::isInvalid ( )
pure virtualinherited

Returns true if text is invalid.

Implemented in Model_ExpressionInteger, and Model_ExpressionDouble.

◆ setError()

virtual void ModelAPI_Expression::setError ( const std::string &  theError)
pure virtualinherited

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

Implemented in Model_ExpressionInteger, Model_ExpressionDouble, and Model_Expression.

◆ error()

virtual std::string ModelAPI_Expression::error ( )
pure virtualinherited

Returns an expression error.

Implemented in Model_ExpressionInteger, Model_ExpressionDouble, and Model_Expression.

◆ setUsedParameters()

virtual void ModelAPI_Expression::setUsedParameters ( const std::set< std::wstring > &  theUsedParameters)
pure virtualinherited

Defines the used parameters (by the parameters listener)

Implemented in Model_ExpressionInteger, Model_ExpressionDouble, and Model_Expression.

◆ usedParameters()

virtual std::set<std::wstring> ModelAPI_Expression::usedParameters ( ) const
pure virtualinherited

Returns the used parameters.

Implemented in Model_ExpressionInteger, Model_ExpressionDouble, and Model_Expression.

◆ isVariable() [1/2]

bool ModelAPI_Expression::isVariable ( const std::string &  theString)
staticinherited

Returns True if the given string can be defined as a name of an expression variable.

◆ isVariable() [2/2]

bool ModelAPI_Expression::isVariable ( const std::wstring &  theString)
staticinherited

Returns True if the given string can be defined as a name of an expression variable.

◆ reinit()

virtual void ModelAPI_Expression::reinit ( )
protectedpure virtualinherited

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

Implemented in Model_ExpressionInteger, and Model_ExpressionDouble.

◆ reset()

virtual void ModelAPI_Expression::reset ( )
inlineprotectedvirtualinherited

Resets attribute to deafult state.

Field Documentation

◆ myIsInitialized

bool ModelAPI_Expression::myIsInitialized
protectedinherited

is some value assigned to this attribute