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


//! @ref omni::graph::exec::unstable::IPassFactory registry for a particular @ref omni::graph::exec::unstable::PassType.
//!
//! 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::IPassTypeRegistry_abi>
    : public omni::graph::exec::unstable::IPassTypeRegistry_abi
{
public:
    OMNI_PLUGIN_INTERFACE("omni::graph::exec::unstable::IPassTypeRegistry")

    //! Returns the number of registered passes.
    uint64_t getPassCount() noexcept;

    //! Returns the pass at the given index.
    //!
    //! If the index is greater than the count, an error is returned.
    //!
    //! The returned @ref omni::graph::exec::unstable::PassTypeRegistryEntry is valid as long as this pass type registry
    //! is not mutated (e.g. a pass is added or removed from the registry).
    void getPassAt(uint64_t index, omni::graph::exec::unstable::PassTypeRegistryEntry* outEntry);
};

#endif

#ifndef OMNI_BIND_INCLUDE_INTERFACE_DECL

inline uint64_t omni::core::Generated<omni::graph::exec::unstable::IPassTypeRegistry_abi>::getPassCount() noexcept
{
    return getPassCount_abi();
}

inline void omni::core::Generated<omni::graph::exec::unstable::IPassTypeRegistry_abi>::getPassAt(
    uint64_t index, omni::graph::exec::unstable::PassTypeRegistryEntry* outEntry)
{
    OMNI_THROW_IF_ARG_NULL(outEntry);
    OMNI_THROW_IF_FAILED(getPassAt_abi(index, outEntry));
}

#endif

#undef OMNI_BIND_INCLUDE_INTERFACE_DECL
#undef OMNI_BIND_INCLUDE_INTERFACE_IMPL
static_assert(std::is_standard_layout<omni::graph::exec::unstable::PassTypeRegistryEntry>::value,
              "omni::graph::exec::unstable::PassTypeRegistryEntry must be standard layout to be used in ONI ABI");
