tor-browser

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

CodePointMapData16.d.hpp (4378B)


      1 #ifndef icu4x_CodePointMapData16_D_HPP
      2 #define icu4x_CodePointMapData16_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 CodePointMapData16; }
     16 class CodePointMapData16;
     17 namespace capi { struct CodePointRangeIterator; }
     18 class CodePointRangeIterator;
     19 namespace capi { struct CodePointSetData; }
     20 class CodePointSetData;
     21 namespace capi { struct DataProvider; }
     22 class DataProvider;
     23 class DataError;
     24 }
     25 
     26 
     27 namespace icu4x {
     28 namespace capi {
     29    struct CodePointMapData16;
     30 } // namespace capi
     31 } // namespace
     32 
     33 namespace icu4x {
     34 /**
     35 * An ICU4X Unicode Map Property object, capable of querying whether a code point (key) to obtain the Unicode property value, for a specific Unicode property.
     36 *
     37 * For properties whose values fit into 16 bits.
     38 *
     39 * See the [Rust documentation for `properties`](https://docs.rs/icu/latest/icu/properties/index.html) for more information.
     40 *
     41 * See the [Rust documentation for `CodePointMapData`](https://docs.rs/icu/latest/icu/properties/struct.CodePointMapData.html) for more information.
     42 *
     43 * See the [Rust documentation for `CodePointMapDataBorrowed`](https://docs.rs/icu/latest/icu/properties/struct.CodePointMapDataBorrowed.html) for more information.
     44 */
     45 class CodePointMapData16 {
     46 public:
     47 
     48  /**
     49   * Gets the value for a code point.
     50   *
     51   * See the [Rust documentation for `get`](https://docs.rs/icu/latest/icu/properties/struct.CodePointMapDataBorrowed.html#method.get) for more information.
     52   */
     53  inline uint16_t operator[](char32_t cp) const;
     54 
     55  /**
     56   * Produces an iterator over ranges of code points that map to `value`
     57   *
     58   * See the [Rust documentation for `iter_ranges_for_value`](https://docs.rs/icu/latest/icu/properties/struct.CodePointMapDataBorrowed.html#method.iter_ranges_for_value) for more information.
     59   */
     60  inline std::unique_ptr<icu4x::CodePointRangeIterator> iter_ranges_for_value(uint16_t value) const;
     61 
     62  /**
     63   * Produces an iterator over ranges of code points that do not map to `value`
     64   *
     65   * See the [Rust documentation for `iter_ranges_for_value_complemented`](https://docs.rs/icu/latest/icu/properties/struct.CodePointMapDataBorrowed.html#method.iter_ranges_for_value_complemented) for more information.
     66   */
     67  inline std::unique_ptr<icu4x::CodePointRangeIterator> iter_ranges_for_value_complemented(uint16_t value) const;
     68 
     69  /**
     70   * Gets a [`CodePointSetData`] representing all entries in this map that map to the given value
     71   *
     72   * See the [Rust documentation for `get_set_for_value`](https://docs.rs/icu/latest/icu/properties/struct.CodePointMapDataBorrowed.html#method.get_set_for_value) for more information.
     73   */
     74  inline std::unique_ptr<icu4x::CodePointSetData> get_set_for_value(uint16_t value) const;
     75 
     76  /**
     77   * Create a map for the `Script` property, using compiled data.
     78   *
     79   * See the [Rust documentation for `Script`](https://docs.rs/icu/latest/icu/properties/props/struct.Script.html) for more information.
     80   */
     81  inline static std::unique_ptr<icu4x::CodePointMapData16> create_script();
     82 
     83  /**
     84   * Create a map for the `Script` property, using a particular data source.
     85   *
     86   * See the [Rust documentation for `Script`](https://docs.rs/icu/latest/icu/properties/props/struct.Script.html) for more information.
     87   */
     88  inline static diplomat::result<std::unique_ptr<icu4x::CodePointMapData16>, icu4x::DataError> create_script_with_provider(const icu4x::DataProvider& provider);
     89 
     90  inline const icu4x::capi::CodePointMapData16* AsFFI() const;
     91  inline icu4x::capi::CodePointMapData16* AsFFI();
     92  inline static const icu4x::CodePointMapData16* FromFFI(const icu4x::capi::CodePointMapData16* ptr);
     93  inline static icu4x::CodePointMapData16* FromFFI(icu4x::capi::CodePointMapData16* ptr);
     94  inline static void operator delete(void* ptr);
     95 private:
     96  CodePointMapData16() = delete;
     97  CodePointMapData16(const icu4x::CodePointMapData16&) = delete;
     98  CodePointMapData16(icu4x::CodePointMapData16&&) noexcept = delete;
     99  CodePointMapData16 operator=(const icu4x::CodePointMapData16&) = delete;
    100  CodePointMapData16 operator=(icu4x::CodePointMapData16&&) noexcept = delete;
    101  static void operator delete[](void*, size_t) = delete;
    102 };
    103 
    104 } // namespace
    105 #endif // icu4x_CodePointMapData16_D_HPP