tor-browser

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

Logger.d.hpp (1273B)


      1 #ifndef icu4x_Logger_D_HPP
      2 #define icu4x_Logger_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 
     15 namespace icu4x {
     16 namespace capi {
     17    struct Logger;
     18 } // namespace capi
     19 } // namespace
     20 
     21 namespace icu4x {
     22 /**
     23 * An object allowing control over the logging used
     24 */
     25 class Logger {
     26 public:
     27 
     28  /**
     29   * Initialize the logger using `simple_logger`
     30   *
     31   * Requires the `simple_logger` Cargo feature.
     32   *
     33   * Returns `false` if there was already a logger set.
     34   */
     35  inline static bool init_simple_logger();
     36 
     37  inline const icu4x::capi::Logger* AsFFI() const;
     38  inline icu4x::capi::Logger* AsFFI();
     39  inline static const icu4x::Logger* FromFFI(const icu4x::capi::Logger* ptr);
     40  inline static icu4x::Logger* FromFFI(icu4x::capi::Logger* ptr);
     41  inline static void operator delete(void* ptr);
     42 private:
     43  Logger() = delete;
     44  Logger(const icu4x::Logger&) = delete;
     45  Logger(icu4x::Logger&&) noexcept = delete;
     46  Logger operator=(const icu4x::Logger&) = delete;
     47  Logger operator=(icu4x::Logger&&) noexcept = delete;
     48  static void operator delete[](void*, size_t) = delete;
     49 };
     50 
     51 } // namespace
     52 #endif // icu4x_Logger_D_HPP