tor-browser

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

LocaleFallbackerWithConfig.d.hpp (2342B)


      1 #ifndef icu4x_LocaleFallbackerWithConfig_D_HPP
      2 #define icu4x_LocaleFallbackerWithConfig_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 Locale; }
     16 class Locale;
     17 namespace capi { struct LocaleFallbackIterator; }
     18 class LocaleFallbackIterator;
     19 }
     20 
     21 
     22 namespace icu4x {
     23 namespace capi {
     24    struct LocaleFallbackerWithConfig;
     25 } // namespace capi
     26 } // namespace
     27 
     28 namespace icu4x {
     29 /**
     30 * An object that runs the ICU4X locale fallback algorithm with specific configurations.
     31 *
     32 * See the [Rust documentation for `LocaleFallbacker`](https://docs.rs/icu/latest/icu/locale/fallback/struct.LocaleFallbacker.html) for more information.
     33 *
     34 * See the [Rust documentation for `LocaleFallbackerWithConfig`](https://docs.rs/icu/latest/icu/locale/fallback/struct.LocaleFallbackerWithConfig.html) for more information.
     35 */
     36 class LocaleFallbackerWithConfig {
     37 public:
     38 
     39  /**
     40   * Creates an iterator from a locale with each step of fallback.
     41   *
     42   * See the [Rust documentation for `fallback_for`](https://docs.rs/icu/latest/icu/locale/fallback/struct.LocaleFallbacker.html#method.fallback_for) for more information.
     43   */
     44  inline std::unique_ptr<icu4x::LocaleFallbackIterator> fallback_for_locale(const icu4x::Locale& locale) const;
     45 
     46  inline const icu4x::capi::LocaleFallbackerWithConfig* AsFFI() const;
     47  inline icu4x::capi::LocaleFallbackerWithConfig* AsFFI();
     48  inline static const icu4x::LocaleFallbackerWithConfig* FromFFI(const icu4x::capi::LocaleFallbackerWithConfig* ptr);
     49  inline static icu4x::LocaleFallbackerWithConfig* FromFFI(icu4x::capi::LocaleFallbackerWithConfig* ptr);
     50  inline static void operator delete(void* ptr);
     51 private:
     52  LocaleFallbackerWithConfig() = delete;
     53  LocaleFallbackerWithConfig(const icu4x::LocaleFallbackerWithConfig&) = delete;
     54  LocaleFallbackerWithConfig(icu4x::LocaleFallbackerWithConfig&&) noexcept = delete;
     55  LocaleFallbackerWithConfig operator=(const icu4x::LocaleFallbackerWithConfig&) = delete;
     56  LocaleFallbackerWithConfig operator=(icu4x::LocaleFallbackerWithConfig&&) noexcept = delete;
     57  static void operator delete[](void*, size_t) = delete;
     58 };
     59 
     60 } // namespace
     61 #endif // icu4x_LocaleFallbackerWithConfig_D_HPP