#ifndef icu4x_DataProvider_D_HPP #define icu4x_DataProvider_D_HPP #include #include #include #include #include #include #include "../diplomat_runtime.hpp" namespace icu4x { namespace capi { struct DataProvider; } class DataProvider; namespace capi { struct LocaleFallbacker; } class LocaleFallbacker; class DataError; } namespace icu4x { namespace capi { struct DataProvider; } // namespace capi } // namespace namespace icu4x { class DataProvider { public: inline static std::unique_ptr compiled(); inline static diplomat::result, icu4x::DataError> from_fs(std::string_view path); inline static diplomat::result, icu4x::DataError> from_byte_slice(diplomat::span blob); inline static std::unique_ptr empty(); inline diplomat::result fork_by_key(icu4x::DataProvider& other); inline diplomat::result fork_by_locale(icu4x::DataProvider& other); inline diplomat::result enable_locale_fallback_with(const icu4x::LocaleFallbacker& fallbacker); inline const icu4x::capi::DataProvider* AsFFI() const; inline icu4x::capi::DataProvider* AsFFI(); inline static const icu4x::DataProvider* FromFFI(const icu4x::capi::DataProvider* ptr); inline static icu4x::DataProvider* FromFFI(icu4x::capi::DataProvider* ptr); inline static void operator delete(void* ptr); private: DataProvider() = delete; DataProvider(const icu4x::DataProvider&) = delete; DataProvider(icu4x::DataProvider&&) noexcept = delete; DataProvider operator=(const icu4x::DataProvider&) = delete; DataProvider operator=(icu4x::DataProvider&&) noexcept = delete; static void operator delete[](void*, size_t) = delete; }; } // namespace #endif // icu4x_DataProvider_D_HPP