========================= Double (hwx.inspire.core) ========================= Store float value with units. Units can be None, length, mass, force, ... Values are get/set in base units unless under inspire.usingUnits(...). A value's units can be specified using a string like: "5 mm". -------------- Public Methods -------------- +---------------------------------------+ | castForGet_ (self, obj, value) | +---------------------------------------+ | castForSet_ (self, obj, value) | +---------------------------------------+ | create_ (self, obj) | +---------------------------------------+ | getGuiValue_ (self, obj, format='%g') | +---------------------------------------+ | getInCoreValue_ (self, obj) | +---------------------------------------+ | getUnits_ (self, obj) | +---------------------------------------+ | getValue_ (self, obj) | +---------------------------------------+ | setInCoreValue_ (self, obj, value) | +---------------------------------------+ | setValue_ (self, obj, value) | +---------------------------------------+ -------------- Method Details -------------- .. _castForGet: .. method:: castForGet(self, obj, value) Converts and returns the double value to gui units. .. _castForSet: .. method:: castForSet(self, obj, value) Converts and validates the double value before setting. :param obj: Object this attribute belongs to. :type obj: GeneralObject :param value: Value of the attribute to set. :type value: str, double :returns: Validated and converted value. :rtype: Double .. _create: .. method:: create(self, obj) Creates a double attribute for the specified object. .. _getGuiValue: .. method:: getGuiValue(self, obj, format='%g') Returns the formatted double value, as shown in the Property Editor. .. _getInCoreValue: .. method:: getInCoreValue(self, obj) Calls the incore get method (defined in C++) of the attribute. :param obj: Object this attribute belongs to. :type obj: GeneralObject :param value: Value of the attribute to get. :type value: double :returns: Value returned by the incore get method. :rtype: Double .. _getUnits: .. method:: getUnits(self, obj) Returns the units of the attribute. .. _getValue: .. method:: getValue(self, obj) Returns the double value for the specified object. .. _setInCoreValue: .. method:: setInCoreValue(self, obj, value) Calls the incore set method (defined in C++) of the attribute. :param obj: Object this attribute belongs to. :type obj: GeneralObject :param value: Value of the attribute to set. :type value: double .. _setValue: .. method:: setValue(self, obj, value) Sets the double value for the specified object.