tor-browser

The Tor Browser
git clone https://git.dasho.dev/tor-browser.git
Log | Files | Refs | README | LICENSE

RegionDisplayNames.d.hpp (3127B)


      1 #ifndef icu4x_RegionDisplayNames_D_HPP
      2 #define icu4x_RegionDisplayNames_D_HPP
      3 
      4 #include <stdio.h>
      5 #include <stdint.h>
      6 #include <stddef.h>
      7 #include <stdbool.h>
      8 #include <memory>
      9 #include <functional>
     10 #include <optional>
     11 #include <cstdlib>
     12 #include "../diplomat_runtime.hpp"
     13 
     14 namespace icu4x {
     15 namespace capi { struct DataProvider; }
     16 class DataProvider;
     17 namespace capi { struct Locale; }
     18 class Locale;
     19 namespace capi { struct RegionDisplayNames; }
     20 class RegionDisplayNames;
     21 struct DisplayNamesOptionsV1;
     22 class DataError;
     23 class LocaleParseError;
     24 }
     25 
     26 
     27 namespace icu4x {
     28 namespace capi {
     29    struct RegionDisplayNames;
     30 } // namespace capi
     31 } // namespace
     32 
     33 namespace icu4x {
     34 /**
     35 * See the [Rust documentation for `RegionDisplayNames`](https://docs.rs/icu/latest/icu/experimental/displaynames/struct.RegionDisplayNames.html) for more information.
     36 */
     37 class RegionDisplayNames {
     38 public:
     39 
     40  /**
     41   * Creates a new `RegionDisplayNames` from locale data and an options bag using compiled data.
     42   *
     43   * See the [Rust documentation for `try_new`](https://docs.rs/icu/latest/icu/experimental/displaynames/struct.RegionDisplayNames.html#method.try_new) for more information.
     44   */
     45  inline static diplomat::result<std::unique_ptr<icu4x::RegionDisplayNames>, icu4x::DataError> create_v1(const icu4x::Locale& locale, icu4x::DisplayNamesOptionsV1 options);
     46 
     47  /**
     48   * Creates a new `RegionDisplayNames` from locale data and an options bag using a particular data source.
     49   *
     50   * See the [Rust documentation for `try_new`](https://docs.rs/icu/latest/icu/experimental/displaynames/struct.RegionDisplayNames.html#method.try_new) for more information.
     51   */
     52  inline static diplomat::result<std::unique_ptr<icu4x::RegionDisplayNames>, icu4x::DataError> create_v1_with_provider(const icu4x::DataProvider& provider, const icu4x::Locale& locale, icu4x::DisplayNamesOptionsV1 options);
     53 
     54  /**
     55   * Returns the locale specific display name of a region.
     56   * Note that the function returns an empty string in case the display name for a given
     57   * region code is not found.
     58   *
     59   * See the [Rust documentation for `of`](https://docs.rs/icu/latest/icu/experimental/displaynames/struct.RegionDisplayNames.html#method.of) for more information.
     60   */
     61  inline diplomat::result<std::string, icu4x::LocaleParseError> of(std::string_view region) const;
     62 
     63  inline const icu4x::capi::RegionDisplayNames* AsFFI() const;
     64  inline icu4x::capi::RegionDisplayNames* AsFFI();
     65  inline static const icu4x::RegionDisplayNames* FromFFI(const icu4x::capi::RegionDisplayNames* ptr);
     66  inline static icu4x::RegionDisplayNames* FromFFI(icu4x::capi::RegionDisplayNames* ptr);
     67  inline static void operator delete(void* ptr);
     68 private:
     69  RegionDisplayNames() = delete;
     70  RegionDisplayNames(const icu4x::RegionDisplayNames&) = delete;
     71  RegionDisplayNames(icu4x::RegionDisplayNames&&) noexcept = delete;
     72  RegionDisplayNames operator=(const icu4x::RegionDisplayNames&) = delete;
     73  RegionDisplayNames operator=(icu4x::RegionDisplayNames&&) noexcept = delete;
     74  static void operator delete[](void*, size_t) = delete;
     75 };
     76 
     77 } // namespace
     78 #endif // icu4x_RegionDisplayNames_D_HPP