#include "unicode/utypes.h"
#include "unicode/uobject.h"
+#if !UCONFIG_NO_FORMATTING
+
U_NAMESPACE_BEGIN
class SimplePatternFormatter;
*
*/
class U_I18N_API QuantityFormatter : public UMemory {
-// TODO(Travis Keep): Add test for copy constructor, assignment, and reset.
public:
/**
* Default constructor.
* @param variant "zero", "one", "two", "few", "many", "other"
* @param rawPattern the pattern for the variant e.g "{0} meters"
* @param status any error returned here.
- * @return TRUE on success; FALSE otherwise.
+ * @return TRUE on success; FALSE if status was set to a non zero error.
*/
UBool add(
const char *variant,
*/
UBool isValid() const;
+ /**
+ * Gets the pattern formatter that would be used for a particular variant.
+ * If isValid() returns TRUE, this method is guaranteed to return a
+ * non-NULL value.
+ */
+ const SimplePatternFormatter *getByVariant(const char *variant) const;
+
/**
* Formats a quantity with this object appending the result to appendTo.
* At least the "other" variant must be added to this object for this
U_NAMESPACE_END
#endif
+
+#endif