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


//! Factory interface for creating @ref omni::graph::exec::unstable::IPass objects.
//!
//! Usually used in conjunction with @ref omni::graph::exec::unstable::IPassRegistry.
//!
//! See @ref omni::graph::exec::unstable::createPassFactory() to generate one of these objects from an invocable object
//! (e.g. @c std::function).
//!
//! See @ref groupOmniGraphExecPassRegistration for more information about pass registration.
//!
//! See @ref  groupOmniGraphExecPasses for more pass related functionality.
template <>
class omni::core::Generated<omni::graph::exec::unstable::IPassFactory_abi>
    : public omni::graph::exec::unstable::IPassFactory_abi
{
public:
    OMNI_PLUGIN_INTERFACE("omni::graph::exec::unstable::IPassFactory")

    //! Creates and returns a pass.
    //!
    //! The returned @ref omni::graph::exec::unstable::IPass will have @ref omni::core::IObject::acquire() called on it.
    omni::core::ObjectPtr<omni::graph::exec::unstable::IPass> createPass(
        omni::core::ObjectParam<omni::graph::exec::unstable::IGraphBuilder> builder);
};

#endif

#ifndef OMNI_BIND_INCLUDE_INTERFACE_DECL

inline omni::core::ObjectPtr<omni::graph::exec::unstable::IPass> omni::core::
    Generated<omni::graph::exec::unstable::IPassFactory_abi>::createPass(
        omni::core::ObjectParam<omni::graph::exec::unstable::IGraphBuilder> builder)
{
    OMNI_THROW_IF_ARG_NULL(builder);
    omni::core::ObjectPtr<omni::graph::exec::unstable::IPass> out;
    OMNI_THROW_IF_FAILED(createPass_abi(builder.get(), out.put()));
    return out;
}

#endif

#undef OMNI_BIND_INCLUDE_INTERFACE_DECL
#undef OMNI_BIND_INCLUDE_INTERFACE_IMPL
