]> git.saurik.com Git - apple/icu.git/blobdiff - icuSources/common/unicode/localebuilder.h
ICU-66108.tar.gz
[apple/icu.git] / icuSources / common / unicode / localebuilder.h
index 03b9eca5c5b655136a984d61469e22d7ad0d5507..19e10f1c0709240ae5cfb7a7df8bed244a5087c9 100644 (file)
@@ -3,11 +3,14 @@
 #ifndef __LOCALEBUILDER_H__
 #define __LOCALEBUILDER_H__
 
+#include "unicode/utypes.h"
+
+#if U_SHOW_CPLUSPLUS_API
+
 #include "unicode/locid.h"
+#include "unicode/localematcher.h"
 #include "unicode/stringpiece.h"
 #include "unicode/uobject.h"
-#include "unicode/utypes.h"
-
 
 #ifndef U_HIDE_DRAFT_API
 /**
@@ -15,7 +18,6 @@
  * \brief C++ API: Builder API for Locale
  */
 
-#if U_SHOW_CPLUSPLUS_API
 U_NAMESPACE_BEGIN
 class CharString;
 
@@ -277,7 +279,24 @@ public:
      */
     Locale build(UErrorCode& status);
 
+#ifndef U_HIDE_DRAFT_API
+    /**
+     * Sets the UErrorCode if an error occurred while recording sets.
+     * Preserves older error codes in the outErrorCode.
+     * @param outErrorCode Set to an error code that occurred while setting subtags.
+     *                  Unchanged if there is no such error or if outErrorCode
+     *                  already contained an error.
+     * @return TRUE if U_FAILURE(outErrorCode)
+     * @draft ICU 65
+     */
+    UBool copyErrorTo(UErrorCode &outErrorCode) const;
+#endif  /* U_HIDE_DRAFT_API */
+
 private:
+    friend class LocaleMatcher::Result;
+
+    void copyExtensionsFrom(const Locale& src, UErrorCode& errorCode);
+
     UErrorCode status_;
     char language_[9];
     char script_[5];
@@ -288,7 +307,9 @@ private:
 };
 
 U_NAMESPACE_END
-#endif // U_SHOW_CPLUSPLUS_API
 
 #endif  // U_HIDE_DRAFT_API
+
+#endif /* U_SHOW_CPLUSPLUS_API */
+
 #endif  // __LOCALEBUILDER_H__