Tizen Native API
5.5
|
Measure object contains an amount of a specified unit, consisting of a number and an unit.
#include <utils_i18n.h>
Functions | |
int | i18n_measure_create (const i18n_formattable_h formattable, i18n_measure_unit_h measure_unit, i18n_measure_h *measure) |
Creates an object with the given numeric amount and the given unit. | |
int | i18n_measure_clone (i18n_measure_h measure, i18n_measure_h *clone) |
Creates a polymorphic clone of the given clone object. | |
int | i18n_measure_destroy (i18n_measure_h measure) |
Destroys the measure object. | |
int | i18n_measure_get_number (i18n_measure_h measure, i18n_formattable_h *formattable) |
Gets a reference to the numeric value of the measure object. | |
int | i18n_measure_get_unit (i18n_measure_h measure, i18n_measure_unit_h *measure_unit) |
Gets a reference to the unit of the measure object. | |
Typedefs | |
typedef void * | i18n_measure_h |
Handle to the object that represents an amount of a specified unit. |
typedef void* i18n_measure_h |
Handle to the object that represents an amount of a specified unit.
int i18n_measure_clone | ( | i18n_measure_h | measure, |
i18n_measure_h * | clone | ||
) |
Creates a polymorphic clone of the given clone object.
clone
object should be released by the caller with the i18n_measure_destroy() function.[in] | measure | The measure object to be cloned |
[out] | clone | The created measure object |
0
on success, otherwise a negative error value I18N_ERROR_NONE | Successful |
I18N_ERROR_INVALID_PARAMETER | Invalid function parameter |
I18N_ERROR_OUT_OF_MEMORY | Out of memory |
int i18n_measure_create | ( | const i18n_formattable_h | formattable, |
i18n_measure_unit_h | measure_unit, | ||
i18n_measure_h * | measure | ||
) |
Creates an object with the given numeric amount and the given unit.
After this call, the caller must not delete the given measure unit object.
[in] | formattable | A numeric object; The i18n_formattable_is_numeric() function must return true for this object. |
[in] | measure_unit | The unit object, which must not be NULL |
[out] | measure | The created measure object |
0
on success, otherwise a negative error value I18N_ERROR_NONE | Successful |
I18N_ERROR_INVALID_PARAMETER | Invalid function parameter |
I18N_ERROR_OUT_OF_MEMORY | Out of memory |
int i18n_measure_destroy | ( | i18n_measure_h | measure | ) |
Destroys the measure object.
[in] | measure | The measure object to destroy |
0
on success, otherwise a negative error value I18N_ERROR_NONE | Successful |
I18N_ERROR_INVALID_PARAMETER | Invalid function parameter |
int i18n_measure_get_number | ( | i18n_measure_h | measure, |
i18n_formattable_h * | formattable | ||
) |
Gets a reference to the numeric value of the measure object.
[in] | measure | The measure object |
[out] | formattable | The numeric value of the measure object |
0
on success, otherwise a negative error value I18N_ERROR_NONE | Successful |
I18N_ERROR_INVALID_PARAMETER | Invalid function parameter |
I18N_ERROR_OUT_OF_MEMORY | Out of memory |
int i18n_measure_get_unit | ( | i18n_measure_h | measure, |
i18n_measure_unit_h * | measure_unit | ||
) |
Gets a reference to the unit of the measure object.
[in] | measure | The measure object |
[out] | measure_unit | The unit of the measure object |
0
on success, otherwise a negative error value I18N_ERROR_NONE | Successful |
I18N_ERROR_INVALID_PARAMETER | Invalid function parameter |
I18N_ERROR_OUT_OF_MEMORY | Out of memory |