1 #ifndef icu4x_ReorderedIndexMap_D_HPP 2 #define icu4x_ReorderedIndexMap_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 14 namespace icu4x { 15 namespace capi { 16 struct ReorderedIndexMap; 17 } // namespace capi 18 } // namespace 19 20 namespace icu4x { 21 class ReorderedIndexMap { 22 public: 23 24 inline diplomat::span<const size_t> as_slice() const; 25 26 inline size_t len() const; 27 28 inline bool is_empty() const; 29 30 inline size_t get(size_t index) const; 31 32 inline const icu4x::capi::ReorderedIndexMap* AsFFI() const; 33 inline icu4x::capi::ReorderedIndexMap* AsFFI(); 34 inline static const icu4x::ReorderedIndexMap* FromFFI(const icu4x::capi::ReorderedIndexMap* ptr); 35 inline static icu4x::ReorderedIndexMap* FromFFI(icu4x::capi::ReorderedIndexMap* ptr); 36 inline static void operator delete(void* ptr); 37 private: 38 ReorderedIndexMap() = delete; 39 ReorderedIndexMap(const icu4x::ReorderedIndexMap&) = delete; 40 ReorderedIndexMap(icu4x::ReorderedIndexMap&&) noexcept = delete; 41 ReorderedIndexMap operator=(const icu4x::ReorderedIndexMap&) = delete; 42 ReorderedIndexMap operator=(icu4x::ReorderedIndexMap&&) noexcept = delete; 43 static void operator delete[](void*, size_t) = delete; 44 }; 45 46 } // namespace 47 #endif // icu4x_ReorderedIndexMap_D_HPP 48