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

#pragma once

#include "HybridRiveImageSpec.hpp"

// Forward declaration of `HybridRiveImageSpec_cxx` to properly resolve imports.
namespace RNRive { class HybridRiveImageSpec_cxx; }





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

namespace margelo::nitro::rive {

  /**
   * The C++ part of HybridRiveImageSpec_cxx.swift.
   *
   * HybridRiveImageSpecSwift (C++) accesses HybridRiveImageSpec_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, HybridRiveImageSpec_cxx can directly inherit from the C++ class HybridRiveImageSpec
   * to simplify the whole structure and memory management.
   */
  class HybridRiveImageSpecSwift: public virtual HybridRiveImageSpec {
  public:
    // Constructor from a Swift instance
    explicit HybridRiveImageSpecSwift(const RNRive::HybridRiveImageSpec_cxx& swiftPart):
      HybridObject(HybridRiveImageSpec::TAG),
      _swiftPart(swiftPart) { }

  public:
    // Get the Swift part
    inline RNRive::HybridRiveImageSpec_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<HybridRiveImageSpecSwift>(other)) {
        return _swiftPart.equals(otherCast->_swiftPart);
      }
      return false;
    }
    void dispose() noexcept override {
      _swiftPart.dispose();
    }
    std::string toString() override {
      return _swiftPart.toString();
    }

  public:
    // Properties
    inline double getByteSize() noexcept override {
      return _swiftPart.getByteSize();
    }

  public:
    // Methods
    

  private:
    RNRive::HybridRiveImageSpec_cxx _swiftPart;
  };

} // namespace margelo::nitro::rive
