tor-browser

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

GeneralCategoryNameToGroupMapper.d.hpp (3734B)


      1 #ifndef icu4x_GeneralCategoryNameToGroupMapper_D_HPP
      2 #define icu4x_GeneralCategoryNameToGroupMapper_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 GeneralCategoryNameToGroupMapper; }
     18 class GeneralCategoryNameToGroupMapper;
     19 struct GeneralCategoryGroup;
     20 class DataError;
     21 }
     22 
     23 
     24 namespace icu4x {
     25 namespace capi {
     26    struct GeneralCategoryNameToGroupMapper;
     27 } // namespace capi
     28 } // namespace
     29 
     30 namespace icu4x {
     31 /**
     32 * A type capable of looking up General Category Group values from a string name.
     33 *
     34 * See the [Rust documentation for `PropertyParser`](https://docs.rs/icu/latest/icu/properties/struct.PropertyParser.html) for more information.
     35 *
     36 * See the [Rust documentation for `GeneralCategory`](https://docs.rs/icu/latest/icu/properties/props/enum.GeneralCategory.html) for more information.
     37 */
     38 class GeneralCategoryNameToGroupMapper {
     39 public:
     40 
     41  /**
     42   * Get the mask value matching the given name, using strict matching
     43   *
     44   * Returns 0 if the name is unknown for this property
     45   *
     46   * See the [Rust documentation for `get_strict`](https://docs.rs/icu/latest/icu/properties/struct.PropertyParserBorrowed.html#method.get_strict) for more information.
     47   */
     48  inline icu4x::GeneralCategoryGroup get_strict(std::string_view name) const;
     49 
     50  /**
     51   * Get the mask value matching the given name, using loose matching
     52   *
     53   * Returns 0 if the name is unknown for this property
     54   *
     55   * See the [Rust documentation for `get_loose`](https://docs.rs/icu/latest/icu/properties/struct.PropertyParserBorrowed.html#method.get_loose) for more information.
     56   */
     57  inline icu4x::GeneralCategoryGroup get_loose(std::string_view name) const;
     58 
     59  /**
     60   * Create a name-to-mask mapper for the `General_Category` property, using compiled data.
     61   *
     62   * See the [Rust documentation for `GeneralCategoryGroup`](https://docs.rs/icu/latest/icu/properties/props/struct.GeneralCategoryGroup.html) for more information.
     63   */
     64  inline static std::unique_ptr<icu4x::GeneralCategoryNameToGroupMapper> create();
     65 
     66  /**
     67   * Create a name-to-mask mapper for the `General_Category` property, using a particular data source.
     68   *
     69   * See the [Rust documentation for `GeneralCategoryGroup`](https://docs.rs/icu/latest/icu/properties/props/struct.GeneralCategoryGroup.html) for more information.
     70   */
     71  inline static diplomat::result<std::unique_ptr<icu4x::GeneralCategoryNameToGroupMapper>, icu4x::DataError> create_with_provider(const icu4x::DataProvider& provider);
     72 
     73  inline const icu4x::capi::GeneralCategoryNameToGroupMapper* AsFFI() const;
     74  inline icu4x::capi::GeneralCategoryNameToGroupMapper* AsFFI();
     75  inline static const icu4x::GeneralCategoryNameToGroupMapper* FromFFI(const icu4x::capi::GeneralCategoryNameToGroupMapper* ptr);
     76  inline static icu4x::GeneralCategoryNameToGroupMapper* FromFFI(icu4x::capi::GeneralCategoryNameToGroupMapper* ptr);
     77  inline static void operator delete(void* ptr);
     78 private:
     79  GeneralCategoryNameToGroupMapper() = delete;
     80  GeneralCategoryNameToGroupMapper(const icu4x::GeneralCategoryNameToGroupMapper&) = delete;
     81  GeneralCategoryNameToGroupMapper(icu4x::GeneralCategoryNameToGroupMapper&&) noexcept = delete;
     82  GeneralCategoryNameToGroupMapper operator=(const icu4x::GeneralCategoryNameToGroupMapper&) = delete;
     83  GeneralCategoryNameToGroupMapper operator=(icu4x::GeneralCategoryNameToGroupMapper&&) noexcept = delete;
     84  static void operator delete[](void*, size_t) = delete;
     85 };
     86 
     87 } // namespace
     88 #endif // icu4x_GeneralCategoryNameToGroupMapper_D_HPP