1 #ifndef icu4x_BidiParagraph_D_HPP 2 #define icu4x_BidiParagraph_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 "../diplomat_runtime.hpp" 12 13 namespace icu4x { 14 class BidiDirection; 15 } 16 17 18 namespace icu4x { 19 namespace capi { 20 struct BidiParagraph; 21 } // namespace capi 22 } // namespace 23 24 namespace icu4x { 25 class BidiParagraph { 26 public: 27 28 inline bool set_paragraph_in_text(size_t n); 29 30 inline icu4x::BidiDirection direction() const; 31 32 inline size_t size() const; 33 34 inline size_t range_start() const; 35 36 inline size_t range_end() const; 37 38 inline std::optional<std::string> reorder_line(size_t range_start, size_t range_end) const; 39 40 inline uint8_t level_at(size_t pos) const; 41 42 inline const icu4x::capi::BidiParagraph* AsFFI() const; 43 inline icu4x::capi::BidiParagraph* AsFFI(); 44 inline static const icu4x::BidiParagraph* FromFFI(const icu4x::capi::BidiParagraph* ptr); 45 inline static icu4x::BidiParagraph* FromFFI(icu4x::capi::BidiParagraph* ptr); 46 inline static void operator delete(void* ptr); 47 private: 48 BidiParagraph() = delete; 49 BidiParagraph(const icu4x::BidiParagraph&) = delete; 50 BidiParagraph(icu4x::BidiParagraph&&) noexcept = delete; 51 BidiParagraph operator=(const icu4x::BidiParagraph&) = delete; 52 BidiParagraph operator=(icu4x::BidiParagraph&&) noexcept = delete; 53 static void operator delete[](void*, size_t) = delete; 54 }; 55 56 } // namespace 57 #endif // icu4x_BidiParagraph_D_HPP 58