// Copyright (c) 2022-2023, NVIDIA CORPORATION. All rights reserved.
//
// NVIDIA CORPORATION and its licensors retain all intellectual property
// and proprietary rights in and to this software, related documentation
// and any modifications thereto. Any use, reproduction, disclosure or
// distribution of this software and related documentation without an express
// license agreement from NVIDIA CORPORATION is strictly prohibited.
//
// --------- Warning: This is a build system generated file. ----------
//

//! @file
//!
//! @brief This file was generated by <i>omni.bind</i>.

#include <omni/core/Interface.h>
#include <omni/core/OmniAttr.h>
#include <omni/core/ResultError.h>

#include <functional>
#include <type_traits>
#include <utility>

#ifndef OMNI_BIND_INCLUDE_INTERFACE_IMPL


//! Executes the node in a graph definition.
//!
//! The purpose of an executor is to generate work for the nodes in an graph definition.  @ref
//! omni::graph::exec::unstable::IExecutor is a minimal interface that defines enough methods to accomplish just that.
//!
//! However, @ref omni::graph::exec::unstable::IExecutor's minimal nature is not what most users want when customizing
//! execution for their graph definitions.  Rather, they want something useful.  @ref
//! omni::graph::exec::unstable::Executor is an useful implementation of @ref omni::graph::exec::unstable::IExecutor
//! designed for graph definition authors to extend.  See
//! @ref omni::graph::exec::unstable::Executor's documentation to better understand the purpose, duties, and
//! capabilities of an executor.
//!
//! See @rstref{Execution Concepts <ef_execution_concepts>} for an in-depth guide on how this object is used during
//! execution.
//!
//! See @rstref{Creating an Executor <ef_executor_creation>} for a guide on creating a customize executor for your graph
//! defintion.
template <>
class omni::core::Generated<omni::graph::exec::unstable::IExecutor_abi> : public omni::graph::exec::unstable::IExecutor_abi
{
public:
    OMNI_PLUGIN_INTERFACE("omni::graph::exec::unstable::IExecutor")

    //! Main execute method. Returning status of the execution.
    omni::graph::exec::unstable::Status execute() noexcept;

    //! Request for scheduling of additional work after the given task has executed but before it has completed.
    //!
    //! @param  task  The current task
    omni::graph::exec::unstable::Status continueExecute(omni::graph::exec::unstable::ExecutionTask& task) noexcept;
};

#endif

#ifndef OMNI_BIND_INCLUDE_INTERFACE_DECL

inline omni::graph::exec::unstable::Status omni::core::Generated<omni::graph::exec::unstable::IExecutor_abi>::execute() noexcept
{
    return execute_abi();
}

inline omni::graph::exec::unstable::Status omni::core::Generated<omni::graph::exec::unstable::IExecutor_abi>::continueExecute(
    omni::graph::exec::unstable::ExecutionTask& task) noexcept
{
    return continueExecute_abi(&task);
}

#endif

#undef OMNI_BIND_INCLUDE_INTERFACE_DECL
#undef OMNI_BIND_INCLUDE_INTERFACE_IMPL
