// 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


//! Base class for all node definitions
//!
//! See @rstref{Execution Concepts <ef_execution_concepts>} for an in-depth guide on how this object is used during
//! execution.
//!
//! Since definitions can be shared by multiple nodes, and nodes can be executed in parallel, implementations of
//! this interface should expect its methods to be called in parallel.
template <>
class omni::core::Generated<omni::graph::exec::unstable::IDef_abi> : public omni::graph::exec::unstable::IDef_abi
{
public:
    OMNI_PLUGIN_INTERFACE("omni::graph::exec::unstable::IDef")

    //! Execute the node definition.
    //!
    //! See thread safety information in interface description.
    omni::graph::exec::unstable::Status execute(omni::graph::exec::unstable::ExecutionTask& info) noexcept;

    //! Provide runtime information about scheduling constraints particular task have
    //!
    //! The provided @ref omni::graph::exec::unstable::ExecutionTask can be used to determine the path of the current
    //! definition.
    //!
    //! The given task must not be @c nullptr.
    //!
    //! See thread safety information in interface description.
    omni::graph::exec::unstable::SchedulingInfo getSchedulingInfo(
        const omni::graph::exec::unstable::ExecutionTask& info) noexcept;

    //! Return unique definition identifier.
    //!
    //! See thread safety information in interface description.
    const omni::graph::exec::unstable::ConstName& getName() noexcept;
};

#endif

#ifndef OMNI_BIND_INCLUDE_INTERFACE_DECL

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

inline omni::graph::exec::unstable::SchedulingInfo omni::core::Generated<omni::graph::exec::unstable::IDef_abi>::getSchedulingInfo(
    const omni::graph::exec::unstable::ExecutionTask& info) noexcept
{
    return getSchedulingInfo_abi(&info);
}

inline const omni::graph::exec::unstable::ConstName& omni::core::Generated<omni::graph::exec::unstable::IDef_abi>::getName() noexcept
{
    return *(getName_abi());
}

#endif

#undef OMNI_BIND_INCLUDE_INTERFACE_DECL
#undef OMNI_BIND_INCLUDE_INTERFACE_IMPL
