tor-browser

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

CodePointSetBuilder.d.hpp (7095B)


      1 #ifndef icu4x_CodePointSetBuilder_D_HPP
      2 #define icu4x_CodePointSetBuilder_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 CodePointSetBuilder; }
     16 class CodePointSetBuilder;
     17 namespace capi { struct CodePointSetData; }
     18 class CodePointSetData;
     19 }
     20 
     21 
     22 namespace icu4x {
     23 namespace capi {
     24    struct CodePointSetBuilder;
     25 } // namespace capi
     26 } // namespace
     27 
     28 namespace icu4x {
     29 /**
     30 * See the [Rust documentation for `CodePointInversionListBuilder`](https://docs.rs/icu/latest/icu/collections/codepointinvlist/struct.CodePointInversionListBuilder.html) for more information.
     31 */
     32 class CodePointSetBuilder {
     33 public:
     34 
     35  /**
     36   * Make a new set builder containing nothing
     37   *
     38   * See the [Rust documentation for `new`](https://docs.rs/icu/latest/icu/collections/codepointinvlist/struct.CodePointInversionListBuilder.html#method.new) for more information.
     39   */
     40  inline static std::unique_ptr<icu4x::CodePointSetBuilder> create();
     41 
     42  /**
     43   * Build this into a set
     44   *
     45   * This object is repopulated with an empty builder
     46   *
     47   * See the [Rust documentation for `build`](https://docs.rs/icu/latest/icu/collections/codepointinvlist/struct.CodePointInversionListBuilder.html#method.build) for more information.
     48   */
     49  inline std::unique_ptr<icu4x::CodePointSetData> build();
     50 
     51  /**
     52   * Complements this set
     53   *
     54   * (Elements in this set are removed and vice versa)
     55   *
     56   * See the [Rust documentation for `complement`](https://docs.rs/icu/latest/icu/collections/codepointinvlist/struct.CodePointInversionListBuilder.html#method.complement) for more information.
     57   */
     58  inline void complement();
     59 
     60  /**
     61   * Returns whether this set is empty
     62   *
     63   * See the [Rust documentation for `is_empty`](https://docs.rs/icu/latest/icu/collections/codepointinvlist/struct.CodePointInversionListBuilder.html#method.is_empty) for more information.
     64   */
     65  inline bool is_empty() const;
     66 
     67  /**
     68   * Add a single character to the set
     69   *
     70   * See the [Rust documentation for `add_char`](https://docs.rs/icu/latest/icu/collections/codepointinvlist/struct.CodePointInversionListBuilder.html#method.add_char) for more information.
     71   */
     72  inline void add_char(char32_t ch);
     73 
     74  /**
     75   * Add an inclusive range of characters to the set
     76   *
     77   * See the [Rust documentation for `add_range`](https://docs.rs/icu/latest/icu/collections/codepointinvlist/struct.CodePointInversionListBuilder.html#method.add_range) for more information.
     78   */
     79  inline void add_inclusive_range(char32_t start, char32_t end);
     80 
     81  /**
     82   * Add all elements that belong to the provided set to the set
     83   *
     84   * See the [Rust documentation for `add_set`](https://docs.rs/icu/latest/icu/collections/codepointinvlist/struct.CodePointInversionListBuilder.html#method.add_set) for more information.
     85   */
     86  inline void add_set(const icu4x::CodePointSetData& data);
     87 
     88  /**
     89   * Remove a single character to the set
     90   *
     91   * See the [Rust documentation for `remove_char`](https://docs.rs/icu/latest/icu/collections/codepointinvlist/struct.CodePointInversionListBuilder.html#method.remove_char) for more information.
     92   */
     93  inline void remove_char(char32_t ch);
     94 
     95  /**
     96   * Remove an inclusive range of characters from the set
     97   *
     98   * See the [Rust documentation for `remove_range`](https://docs.rs/icu/latest/icu/collections/codepointinvlist/struct.CodePointInversionListBuilder.html#method.remove_range) for more information.
     99   */
    100  inline void remove_inclusive_range(char32_t start, char32_t end);
    101 
    102  /**
    103   * Remove all elements that belong to the provided set from the set
    104   *
    105   * See the [Rust documentation for `remove_set`](https://docs.rs/icu/latest/icu/collections/codepointinvlist/struct.CodePointInversionListBuilder.html#method.remove_set) for more information.
    106   */
    107  inline void remove_set(const icu4x::CodePointSetData& data);
    108 
    109  /**
    110   * Removes all elements from the set except a single character
    111   *
    112   * See the [Rust documentation for `retain_char`](https://docs.rs/icu/latest/icu/collections/codepointinvlist/struct.CodePointInversionListBuilder.html#method.retain_char) for more information.
    113   */
    114  inline void retain_char(char32_t ch);
    115 
    116  /**
    117   * Removes all elements from the set except an inclusive range of characters f
    118   *
    119   * See the [Rust documentation for `retain_range`](https://docs.rs/icu/latest/icu/collections/codepointinvlist/struct.CodePointInversionListBuilder.html#method.retain_range) for more information.
    120   */
    121  inline void retain_inclusive_range(char32_t start, char32_t end);
    122 
    123  /**
    124   * Removes all elements from the set except all elements in the provided set
    125   *
    126   * See the [Rust documentation for `retain_set`](https://docs.rs/icu/latest/icu/collections/codepointinvlist/struct.CodePointInversionListBuilder.html#method.retain_set) for more information.
    127   */
    128  inline void retain_set(const icu4x::CodePointSetData& data);
    129 
    130  /**
    131   * Complement a single character to the set
    132   *
    133   * (Characters which are in this set are removed and vice versa)
    134   *
    135   * See the [Rust documentation for `complement_char`](https://docs.rs/icu/latest/icu/collections/codepointinvlist/struct.CodePointInversionListBuilder.html#method.complement_char) for more information.
    136   */
    137  inline void complement_char(char32_t ch);
    138 
    139  /**
    140   * Complement an inclusive range of characters from the set
    141   *
    142   * (Characters which are in this set are removed and vice versa)
    143   *
    144   * See the [Rust documentation for `complement_range`](https://docs.rs/icu/latest/icu/collections/codepointinvlist/struct.CodePointInversionListBuilder.html#method.complement_range) for more information.
    145   */
    146  inline void complement_inclusive_range(char32_t start, char32_t end);
    147 
    148  /**
    149   * Complement all elements that belong to the provided set from the set
    150   *
    151   * (Characters which are in this set are removed and vice versa)
    152   *
    153   * See the [Rust documentation for `complement_set`](https://docs.rs/icu/latest/icu/collections/codepointinvlist/struct.CodePointInversionListBuilder.html#method.complement_set) for more information.
    154   */
    155  inline void complement_set(const icu4x::CodePointSetData& data);
    156 
    157  inline const icu4x::capi::CodePointSetBuilder* AsFFI() const;
    158  inline icu4x::capi::CodePointSetBuilder* AsFFI();
    159  inline static const icu4x::CodePointSetBuilder* FromFFI(const icu4x::capi::CodePointSetBuilder* ptr);
    160  inline static icu4x::CodePointSetBuilder* FromFFI(icu4x::capi::CodePointSetBuilder* ptr);
    161  inline static void operator delete(void* ptr);
    162 private:
    163  CodePointSetBuilder() = delete;
    164  CodePointSetBuilder(const icu4x::CodePointSetBuilder&) = delete;
    165  CodePointSetBuilder(icu4x::CodePointSetBuilder&&) noexcept = delete;
    166  CodePointSetBuilder operator=(const icu4x::CodePointSetBuilder&) = delete;
    167  CodePointSetBuilder operator=(icu4x::CodePointSetBuilder&&) noexcept = delete;
    168  static void operator delete[](void*, size_t) = delete;
    169 };
    170 
    171 } // namespace
    172 #endif // icu4x_CodePointSetBuilder_D_HPP