// Copyright (c) 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


//! Interface to create new bundles
template <>
class omni::core::Generated<omni::graph::core::IBundleFactory_abi> : public omni::graph::core::IBundleFactory_abi
{
public:
    OMNI_PLUGIN_INTERFACE("omni::graph::core::IBundleFactory")

    //! Create bundles at given paths and acquire instances of IBundle2 interface.
    //!
    //! @param contextObj The context where bundles are created.
    //! @param paths Locations for new bundles.
    //! @param pathCount Length of paths array.
    //! @param createdBundles Output instances of IBundle2 interface.
    //!
    //! @return Success if executed successfully, Fail for unsuccessful execution, InvalidArgument if arguments are
    //! invalid.
    omni::core::Result createBundles(const omni::graph::core::GraphContextObj* const contextObj,
                                     const omni::fabric::PathC* const paths,
                                     size_t pathCount,
                                     omni::graph::core::IBundle2** const createdBundles) noexcept;

    //! Acquire instances of IConstBundle2 interface from const bundle handles.
    //!
    //! @param contextObj The context where bundles belong to.
    //! @param bundleHandles The bundle handles.
    //! @param bundleCount Length of bundleHandles array.
    //! @param bundles Output instances of IConstBundle2 interface.
    //!
    //! @return Success if executed successfully, Fail for unsuccessful execution, InvalidArgument if arguments are
    //! invalid.
    omni::core::Result getConstBundles(const omni::graph::core::GraphContextObj* const contextObj,
                                       const omni::graph::core::ConstBundleHandle* const bundleHandles,
                                       size_t bundleCount,
                                       omni::graph::core::IConstBundle2** const bundles) noexcept;

    //! Acquire instances of IBundle2 interface from bundle handles.
    //!
    //! @param contextObj The context where bundles belong to.
    //! @param bundleHandles The bundle handles.
    //! @param bundleCount Length of bundleHandles array.
    //! @param bundles Output instances of IConstBundle2 interface.
    //!
    //! @return Success if executed successfully, Fail for unsuccessful execution, InvalidArgument if arguments are
    //! invalid.
    omni::core::Result getBundles(const omni::graph::core::GraphContextObj* const contextObj,
                                  const omni::graph::core::BundleHandle* const bundleHandles,
                                  size_t bundleCount,
                                  omni::graph::core::IBundle2** const bundles) noexcept;
};

#endif

#ifndef OMNI_BIND_INCLUDE_INTERFACE_DECL

inline omni::core::Result omni::core::Generated<omni::graph::core::IBundleFactory_abi>::createBundles(
    const omni::graph::core::GraphContextObj* const contextObj,
    const omni::fabric::PathC* const paths,
    size_t pathCount,
    omni::graph::core::IBundle2** const createdBundles) noexcept
{
    return createBundles_abi(contextObj, paths, pathCount, createdBundles);
}

inline omni::core::Result omni::core::Generated<omni::graph::core::IBundleFactory_abi>::getConstBundles(
    const omni::graph::core::GraphContextObj* const contextObj,
    const omni::graph::core::ConstBundleHandle* const bundleHandles,
    size_t bundleCount,
    omni::graph::core::IConstBundle2** const bundles) noexcept
{
    return getConstBundles_abi(contextObj, bundleHandles, bundleCount, bundles);
}

inline omni::core::Result omni::core::Generated<omni::graph::core::IBundleFactory_abi>::getBundles(
    const omni::graph::core::GraphContextObj* const contextObj,
    const omni::graph::core::BundleHandle* const bundleHandles,
    size_t bundleCount,
    omni::graph::core::IBundle2** const bundles) noexcept
{
    return getBundles_abi(contextObj, bundleHandles, bundleCount, bundles);
}

#endif

#undef OMNI_BIND_INCLUDE_INTERFACE_DECL
#undef OMNI_BIND_INCLUDE_INTERFACE_IMPL
