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

#pragma once

#include "HybridScannedObjectSpec.hpp"

// Forward declaration of `HybridScannedObjectSpec_cxx` to properly resolve imports.
namespace VisionCamera { class HybridScannedObjectSpec_cxx; }

// Forward declaration of `ScannedObjectType` to properly resolve imports.
namespace margelo::nitro::camera { enum class ScannedObjectType; }
// Forward declaration of `BoundingBox` to properly resolve imports.
namespace margelo::nitro::camera { struct BoundingBox; }

#include "ScannedObjectType.hpp"
#include "BoundingBox.hpp"

#include "VisionCamera-Swift-Cxx-Umbrella.hpp"

namespace margelo::nitro::camera {

  /**
   * The C++ part of HybridScannedObjectSpec_cxx.swift.
   *
   * HybridScannedObjectSpecSwift (C++) accesses HybridScannedObjectSpec_cxx (Swift), and might
   * contain some additional bridging code for C++ <> Swift interop.
   *
   * Since this obviously introduces an overhead, I hope at some point in
   * the future, HybridScannedObjectSpec_cxx can directly inherit from the C++ class HybridScannedObjectSpec
   * to simplify the whole structure and memory management.
   */
  class HybridScannedObjectSpecSwift: public virtual HybridScannedObjectSpec {
  public:
    // Constructor from a Swift instance
    explicit HybridScannedObjectSpecSwift(const VisionCamera::HybridScannedObjectSpec_cxx& swiftPart):
      HybridObject(HybridScannedObjectSpec::TAG),
      _swiftPart(swiftPart) { }

  public:
    // Get the Swift part
    inline VisionCamera::HybridScannedObjectSpec_cxx& getSwiftPart() noexcept {
      return _swiftPart;
    }

  public:
    inline size_t getExternalMemorySize() noexcept override {
      return _swiftPart.getMemorySize();
    }
    bool equals(const std::shared_ptr<HybridObject>& other) override {
      if (auto otherCast = std::dynamic_pointer_cast<HybridScannedObjectSpecSwift>(other)) {
        return _swiftPart.equals(otherCast->_swiftPart);
      }
      return false;
    }
    void dispose() noexcept override {
      _swiftPart.dispose();
    }
    std::string toString() override {
      return _swiftPart.toString();
    }

  public:
    // Properties
    inline ScannedObjectType getType() noexcept override {
      auto __result = _swiftPart.getType();
      return static_cast<ScannedObjectType>(__result);
    }
    inline BoundingBox getBoundingBox() noexcept override {
      return _swiftPart.getBoundingBox();
    }

  public:
    // Methods
    

  private:
    VisionCamera::HybridScannedObjectSpec_cxx _swiftPart;
  };

} // namespace margelo::nitro::camera
