tor-browser

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

VerticalOrientation.d.hpp (3164B)


      1 #ifndef icu4x_VerticalOrientation_D_HPP
      2 #define icu4x_VerticalOrientation_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 class VerticalOrientation;
     16 }
     17 
     18 
     19 namespace icu4x {
     20 namespace capi {
     21    enum VerticalOrientation {
     22      VerticalOrientation_Rotated = 0,
     23      VerticalOrientation_TransformedRotated = 1,
     24      VerticalOrientation_TransformedUpright = 2,
     25      VerticalOrientation_Upright = 3,
     26    };
     27 
     28    typedef struct VerticalOrientation_option {union { VerticalOrientation ok; }; bool is_ok; } VerticalOrientation_option;
     29 } // namespace capi
     30 } // namespace
     31 
     32 namespace icu4x {
     33 /**
     34 * See the [Rust documentation for `VerticalOrientation`](https://docs.rs/icu/latest/icu/properties/props/struct.VerticalOrientation.html) for more information.
     35 */
     36 class VerticalOrientation {
     37 public:
     38  enum Value {
     39    Rotated = 0,
     40    TransformedRotated = 1,
     41    TransformedUpright = 2,
     42    Upright = 3,
     43  };
     44 
     45  VerticalOrientation() = default;
     46  // Implicit conversions between enum and ::Value
     47  constexpr VerticalOrientation(Value v) : value(v) {}
     48  constexpr operator Value() const { return value; }
     49  // Prevent usage as boolean value
     50  explicit operator bool() const = delete;
     51 
     52  /**
     53   * See the [Rust documentation for `for_char`](https://docs.rs/icu/latest/icu/properties/props/trait.EnumeratedProperty.html#tymethod.for_char) for more information.
     54   */
     55  inline static icu4x::VerticalOrientation for_char(char32_t ch);
     56 
     57  /**
     58   * Get the "long" name of this property value (returns empty if property value is unknown)
     59   *
     60   * See the [Rust documentation for `get`](https://docs.rs/icu/latest/icu/properties/struct.PropertyNamesLongBorrowed.html#method.get) for more information.
     61   */
     62  inline std::optional<std::string_view> long_name() const;
     63 
     64  /**
     65   * Get the "short" name of this property value (returns empty if property value is unknown)
     66   *
     67   * See the [Rust documentation for `get`](https://docs.rs/icu/latest/icu/properties/struct.PropertyNamesShortBorrowed.html#method.get) for more information.
     68   */
     69  inline std::optional<std::string_view> short_name() const;
     70 
     71  /**
     72   * Convert to an integer value usable with ICU4C and CodePointMapData
     73   *
     74   * See the [Rust documentation for `to_icu4c_value`](https://docs.rs/icu/latest/icu/properties/props/struct.VerticalOrientation.html#method.to_icu4c_value) for more information.
     75   */
     76  inline uint8_t to_integer_value() const;
     77 
     78  /**
     79   * Convert from an integer value from ICU4C or CodePointMapData
     80   *
     81   * See the [Rust documentation for `from_icu4c_value`](https://docs.rs/icu/latest/icu/properties/props/struct.VerticalOrientation.html#method.from_icu4c_value) for more information.
     82   */
     83  inline static std::optional<icu4x::VerticalOrientation> from_integer_value(uint8_t other);
     84 
     85  inline icu4x::capi::VerticalOrientation AsFFI() const;
     86  inline static icu4x::VerticalOrientation FromFFI(icu4x::capi::VerticalOrientation c_enum);
     87 private:
     88    Value value;
     89 };
     90 
     91 } // namespace
     92 #endif // icu4x_VerticalOrientation_D_HPP