Public Types
Public Member Functions
Static Public Member Functions
Detailed Description
Identifies a set of values as integer values and an associated set of optional attributes (for instance minimum and maximum value). It provides conversion routines between floating point and string representation. See also ValueTypeManager for Script example usage.Constructor is private, use the create() method to create new instances as a shared resource.
Member Function Documentation
__str__()
inherited
Function to allow printing instances of this class in python.
Returns
The unique name of this ValueType
attribute() [1/2]
inherited
Returns the value of the given attribute. An attribute is a named value, to specify the behavior of the ValueType. For instance min/max. See ValueType derived classes for documentation of available attributes.
Parameters
Exceptions
attribute() [2/2]
inherited
Returns the value of the given attribute. Default value is returned if the attribute is undefined. An attribute is a named value, to specify the behavior of the ValueType. For instance min/max. See ValueType derived classes for documentation of available attributes.
Parameters
create()
static
Default destructor.
Create a new instances as a shared resources, which is stored at the ValueTypeManager. Static method, access in script: value_type = sos.ValueTypeInt.create(manager, “my_int_value_type”)
Parameters
Returns
Shared resource of ValueType base class.
eraseAttribute()
inherited
Removes an attribute.
Parameters
Returns
True if the attribute was removed. False if the attribute was undefined.
setAttribute()
inherited
Define an attribute. Existing attributes are overwritten.
Parameters
toDouble()
override virtual
Convert string to floating point value.
Parameters
Returns
The converted value
Exceptions
Implements ValueType.
toString()
override virtual
Convert number value to its string representation Double value is casted to integer before conversion to string. 1.6 -> “1”.
Parameters
Returns
The string representation of the converted value
Implements ValueType.