///
/// NitroThor-Swift-Cxx-Bridge.hpp
/// This file was generated by nitrogen. DO NOT MODIFY THIS FILE.
/// https://github.com/mrousavy/nitro
/// Copyright © Marc Rousavy @ Margelo
///

#pragma once

// Forward declarations of C++ defined types
// Forward declaration of `HybridThorViewSpec` to properly resolve imports.
namespace margelo::nitro::thor { class HybridThorViewSpec; }
// Forward declaration of `ThorBackend` to properly resolve imports.
namespace margelo::nitro::thor { enum class ThorBackend; }
// Forward declaration of `ThorShapeType` to properly resolve imports.
namespace margelo::nitro::thor { enum class ThorShapeType; }
// Forward declaration of `ThorShape` to properly resolve imports.
namespace margelo::nitro::thor { struct ThorShape; }

// Forward declarations of Swift defined types
// Forward declaration of `HybridThorViewSpec_cxx` to properly resolve imports.
namespace NitroThor { class HybridThorViewSpec_cxx; }

// Include C++ defined types
#include "HybridThorViewSpec.hpp"
#include "ThorBackend.hpp"
#include "ThorShape.hpp"
#include "ThorShapeType.hpp"
#include <NitroModules/Result.hpp>
#include <exception>
#include <memory>
#include <optional>
#include <string>
#include <vector>

/**
 * Contains specialized versions of C++ templated types so they can be accessed from Swift,
 * as well as helper functions to interact with those C++ types from Swift.
 */
namespace margelo::nitro::thor::bridge::swift {

  // pragma MARK: std::optional<std::string>
  /**
   * Specialized version of `std::optional<std::string>`.
   */
  using std__optional_std__string_ = std::optional<std::string>;
  inline std::optional<std::string> create_std__optional_std__string_(const std::string& value) noexcept {
    return std::optional<std::string>(value);
  }
  inline bool has_value_std__optional_std__string_(const std::optional<std::string>& optional) noexcept {
    return optional.has_value();
  }
  inline std::string get_std__optional_std__string_(const std::optional<std::string>& optional) noexcept {
    return optional.value();
  }
  
  // pragma MARK: std::optional<double>
  /**
   * Specialized version of `std::optional<double>`.
   */
  using std__optional_double_ = std::optional<double>;
  inline std::optional<double> create_std__optional_double_(const double& value) noexcept {
    return std::optional<double>(value);
  }
  inline bool has_value_std__optional_double_(const std::optional<double>& optional) noexcept {
    return optional.has_value();
  }
  inline double get_std__optional_double_(const std::optional<double>& optional) noexcept {
    return optional.value();
  }
  
  // pragma MARK: std::vector<double>
  /**
   * Specialized version of `std::vector<double>`.
   */
  using std__vector_double_ = std::vector<double>;
  inline std::vector<double> create_std__vector_double_(size_t size) noexcept {
    std::vector<double> vector;
    vector.reserve(size);
    return vector;
  }
  
  // pragma MARK: std::optional<std::vector<double>>
  /**
   * Specialized version of `std::optional<std::vector<double>>`.
   */
  using std__optional_std__vector_double__ = std::optional<std::vector<double>>;
  inline std::optional<std::vector<double>> create_std__optional_std__vector_double__(const std::vector<double>& value) noexcept {
    return std::optional<std::vector<double>>(value);
  }
  inline bool has_value_std__optional_std__vector_double__(const std::optional<std::vector<double>>& optional) noexcept {
    return optional.has_value();
  }
  inline std::vector<double> get_std__optional_std__vector_double__(const std::optional<std::vector<double>>& optional) noexcept {
    return optional.value();
  }
  
  // pragma MARK: std::optional<bool>
  /**
   * Specialized version of `std::optional<bool>`.
   */
  using std__optional_bool_ = std::optional<bool>;
  inline std::optional<bool> create_std__optional_bool_(const bool& value) noexcept {
    return std::optional<bool>(value);
  }
  inline bool has_value_std__optional_bool_(const std::optional<bool>& optional) noexcept {
    return optional.has_value();
  }
  inline bool get_std__optional_bool_(const std::optional<bool>& optional) noexcept {
    return optional.value();
  }
  
  // pragma MARK: std::vector<ThorShape>
  /**
   * Specialized version of `std::vector<ThorShape>`.
   */
  using std__vector_ThorShape_ = std::vector<ThorShape>;
  inline std::vector<ThorShape> create_std__vector_ThorShape_(size_t size) noexcept {
    std::vector<ThorShape> vector;
    vector.reserve(size);
    return vector;
  }
  
  // pragma MARK: std::optional<ThorBackend>
  /**
   * Specialized version of `std::optional<ThorBackend>`.
   */
  using std__optional_ThorBackend_ = std::optional<ThorBackend>;
  inline std::optional<ThorBackend> create_std__optional_ThorBackend_(const ThorBackend& value) noexcept {
    return std::optional<ThorBackend>(value);
  }
  inline bool has_value_std__optional_ThorBackend_(const std::optional<ThorBackend>& optional) noexcept {
    return optional.has_value();
  }
  inline ThorBackend get_std__optional_ThorBackend_(const std::optional<ThorBackend>& optional) noexcept {
    return optional.value();
  }
  
  // pragma MARK: std::shared_ptr<HybridThorViewSpec>
  /**
   * Specialized version of `std::shared_ptr<HybridThorViewSpec>`.
   */
  using std__shared_ptr_HybridThorViewSpec_ = std::shared_ptr<HybridThorViewSpec>;
  std::shared_ptr<HybridThorViewSpec> create_std__shared_ptr_HybridThorViewSpec_(void* NON_NULL swiftUnsafePointer) noexcept;
  void* NON_NULL get_std__shared_ptr_HybridThorViewSpec_(std__shared_ptr_HybridThorViewSpec_ cppType);
  
  // pragma MARK: std::weak_ptr<HybridThorViewSpec>
  using std__weak_ptr_HybridThorViewSpec_ = std::weak_ptr<HybridThorViewSpec>;
  inline std__weak_ptr_HybridThorViewSpec_ weakify_std__shared_ptr_HybridThorViewSpec_(const std::shared_ptr<HybridThorViewSpec>& strong) noexcept { return strong; }
  
  // pragma MARK: Result<void>
  using Result_void_ = Result<void>;
  inline Result_void_ create_Result_void_() noexcept {
    return Result<void>::withValue();
  }
  inline Result_void_ create_Result_void_(const std::exception_ptr& error) noexcept {
    return Result<void>::withError(error);
  }

} // namespace margelo::nitro::thor::bridge::swift
