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

#pragma once

#if __has_include(<NitroModules/HybridObject.hpp>)
#include <NitroModules/HybridObject.hpp>
#else
#error NitroModules cannot be found! Are you sure you installed NitroModules properly?
#endif



#include <string>
#include <NitroModules/Promise.hpp>

namespace margelo::nitro::threadedruntime {

  using namespace margelo::nitro;

  /**
   * An abstract base class for `ThreadedRuntimeFunctions`
   * Inherit this class to create instances of `HybridThreadedRuntimeFunctionsSpec` in C++.
   * You must explicitly call `HybridObject`'s constructor yourself, because it is virtual.
   * @example
   * ```cpp
   * class HybridThreadedRuntimeFunctions: public HybridThreadedRuntimeFunctionsSpec {
   * public:
   *   HybridThreadedRuntimeFunctions(...): HybridObject(TAG) { ... }
   *   // ...
   * };
   * ```
   */
  class HybridThreadedRuntimeFunctionsSpec: public virtual HybridObject {
    public:
      // Constructor
      explicit HybridThreadedRuntimeFunctionsSpec(): HybridObject(TAG) { }

      // Destructor
      ~HybridThreadedRuntimeFunctionsSpec() override = default;

    public:
      // Properties
      

    public:
      // Methods
      virtual std::shared_ptr<Promise<std::string>> run(const std::string& runtimeName, const std::string& functionId, const std::string& argsJson) = 0;

    protected:
      // Hybrid Setup
      void loadHybridMethods() override;

    protected:
      // Tag for logging
      static constexpr auto TAG = "ThreadedRuntimeFunctions";
  };

} // namespace margelo::nitro::threadedruntime
