Tizen Native API
5.5
|
Measure object contains an amount of a specified unit, consisting of a number and an unit.
Required Header
#include <utils_i18n.h>
Overview
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 Documentation
typedef void* i18n_measure_h |
Handle to the object that represents an amount of a specified unit.
- Since :
- 3.0
Function Documentation
int i18n_measure_clone | ( | i18n_measure_h | measure, |
i18n_measure_h * | clone | ||
) |
Creates a polymorphic clone of the given clone object.
- Since :
- 2.3.2 and 3.0
- Remarks:
- The
clone
object should be released by the caller with the i18n_measure_destroy() function.
- Parameters:
-
[in] measure The measure object to be cloned [out] clone The created measure object
- Returns:
0
on success, otherwise a negative error value
- Return values:
-
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.
- Since :
- 2.3.2 and 3.0
- Remarks:
- The created object should be released by the caller with the i18n_measure_destroy() function.
- Parameters:
-
[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
- Returns:
0
on success, otherwise a negative error value
- Return values:
-
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.
- Since :
- 2.3.2 and 3.0
- Parameters:
-
[in] measure The measure object to destroy
- Returns:
0
on success, otherwise a negative error value
- Return values:
-
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.
- Since :
- 2.3.2 and 3.0
- Remarks:
- The obtained formattable object should be released by the caller with the i18n_formattable_destroy() function.
- Parameters:
-
[in] measure The measure object [out] formattable The numeric value of the measure object
- Returns:
0
on success, otherwise a negative error value
- Return values:
-
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.
- Since :
- 2.3.2 and 3.0
- Remarks:
- The obtained measure unit object should be released by the caller with the i18n_measure_unit_destroy() function.
- Parameters:
-
[in] measure The measure object [out] measure_unit The unit of the measure object
- Returns:
0
on success, otherwise a negative error value
- Return values:
-
I18N_ERROR_NONE Successful I18N_ERROR_INVALID_PARAMETER Invalid function parameter I18N_ERROR_OUT_OF_MEMORY Out of memory