Lines Matching defs:MeasureUnitImpl
39 CharString U_I18N_API getUnitQuantity(const MeasureUnitImpl &baseMeasureUnitImpl, UErrorCode &status);
214 class U_I18N_API MeasureUnitImpl : public UMemory {
216 MeasureUnitImpl() = default;
217 MeasureUnitImpl(MeasureUnitImpl &&other) = default;
218 // No copy constructor, use MeasureUnitImpl::copy() to make it explicit.
219 MeasureUnitImpl(const MeasureUnitImpl &other, UErrorCode &status) = delete;
220 MeasureUnitImpl(const SingleUnitImpl &singleUnit, UErrorCode &status);
222 MeasureUnitImpl &operator=(MeasureUnitImpl &&other) noexcept = default;
224 /** Extract the MeasureUnitImpl from a MeasureUnit. */
225 static inline const MeasureUnitImpl *get(const MeasureUnit &measureUnit) {
230 * Parse a unit identifier into a MeasureUnitImpl.
237 static MeasureUnitImpl forIdentifier(StringPiece identifier, UErrorCode& status);
240 * Extract the MeasureUnitImpl from a MeasureUnit, or parse if it is not present.
243 * @param memory A place to write the new MeasureUnitImpl if parsing is required.
247 static const MeasureUnitImpl& forMeasureUnit(
248 const MeasureUnit& measureUnit, MeasureUnitImpl& memory, UErrorCode& status);
251 * Extract the MeasureUnitImpl from a MeasureUnit, or parse if it is not present.
257 static MeasureUnitImpl forMeasureUnitMaybeCopy(
263 static inline MeasureUnitImpl forCurrencyCode(StringPiece currencyCode) {
264 MeasureUnitImpl result;
271 /** Transform this MeasureUnitImpl into a MeasureUnit, simplifying if possible. */
275 * Create a copy of this MeasureUnitImpl. Don't use copy constructor to make this explicit.
277 MeasureUnitImpl copy(UErrorCode& status) const;
280 * Extracts the list of all the individual units inside the `MeasureUnitImpl` with their indices.
282 * - if the `MeasureUnitImpl` is `foot-per-hour`
284 * - if the `MeasureUnitImpl` is `foot-and-inch`
290 /** Mutates this MeasureUnitImpl to take the reciprocal. */
301 MeasureUnitImpl copyAndSimplify(UErrorCode &status) const;
304 * Mutates this MeasureUnitImpl to append a single unit.
312 * Normalizes a MeasureUnitImpl and generate the identifier string in place.
329 * The full unit identifier. Owned by the MeasureUnitImpl. Empty if not computed.
340 MeasureUnitImpl unitImpl;
342 MeasureUnitImplWithIndex(int32_t index, const MeasureUnitImpl &unitImpl, UErrorCode &status)
346 : index(index), unitImpl(MeasureUnitImpl(singleUnitImpl, status)) {
359 // data member of MeasureUnitImpl.
366 template class U_I18N_API LocalPointerBase<MeasureUnitImpl>;
367 template class U_I18N_API LocalPointer<MeasureUnitImpl>;