// Copyright (c) 2021-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 the list of scheduling hints that can be applied to a node type
template <>
class omni::core::Generated<omni::graph::core::ISchedulingHints_abi> : public omni::graph::core::ISchedulingHints_abi
{
public:
    OMNI_PLUGIN_INTERFACE("omni::graph::core::ISchedulingHints")

    /**
     * Get the threadSafety status (i.e. can be run in parallel with other nodes)
     *
     * @returns Is the node compute threadsafe?
     */
    omni::graph::core::eThreadSafety getThreadSafety() noexcept;

    /**
     * Set the flag indicating if a node is threadsafe or not.
     *
     * @param[in] newThreadSafety New value of the threadsafe flag
     */
    void setThreadSafety(omni::graph::core::eThreadSafety newThreadSafety) noexcept;

    /**
     * Get the type of access the node has for a given data type
     *
     * @param[in] dataType Type of data for which access type is being modified
     * @returns Value of the access type flag
     */
    omni::graph::core::eAccessType getDataAccess(omni::graph::core::eAccessLocation dataType) noexcept;

    /**
     * Set the flag describing how a node accesses particular data in its compute _abi (defaults to no access).
     * Setting any of these flags will, in most cases, automatically mark the node as "not threadsafe".
     * One current exception to this is allowing a node to be both threadsafe and a writer to USD, since
     * such behavior can be achieved if delayed writebacks (e.g. "registerForUSDWriteBack") are utilized
     * in the node's compute method.
     *
     * @param[in] dataType Type of data for which access type is being modified
     * @param[in] newAccessType New value of the access type flag
     */
    void setDataAccess(omni::graph::core::eAccessLocation dataType, omni::graph::core::eAccessType newAccessType) noexcept;

    /**
     * Get the flag describing the compute rule which may be followed by the evaluator.
     *
     * @returns Value of the ComputeRule flag
     */
    omni::graph::core::eComputeRule getComputeRule() noexcept;

    /**
     * Set the flag describing the compute rule which may be followed by the evaluator.
     *
     * @param[in] newComputeRule New value of the ComputeRule flag
     */
    void setComputeRule(omni::graph::core::eComputeRule newComputeRule) noexcept;

    /**
     * Runs the inspector on the scheduling hints.
     *
     * @param[in] inspector The inspector class
     * @return true if the inspection ran successfully, false if the inspection type is not supported
     */
    bool inspect(omni::core::ObjectParam<omni::inspect::IInspector> inspector) noexcept;
};

#endif

#ifndef OMNI_BIND_INCLUDE_INTERFACE_DECL

inline omni::graph::core::eThreadSafety omni::core::Generated<omni::graph::core::ISchedulingHints_abi>::getThreadSafety() noexcept
{
    return getThreadSafety_abi();
}

inline void omni::core::Generated<omni::graph::core::ISchedulingHints_abi>::setThreadSafety(
    omni::graph::core::eThreadSafety newThreadSafety) noexcept
{
    setThreadSafety_abi(newThreadSafety);
}

inline omni::graph::core::eAccessType omni::core::Generated<omni::graph::core::ISchedulingHints_abi>::getDataAccess(
    omni::graph::core::eAccessLocation dataType) noexcept
{
    return getDataAccess_abi(dataType);
}

inline void omni::core::Generated<omni::graph::core::ISchedulingHints_abi>::setDataAccess(
    omni::graph::core::eAccessLocation dataType, omni::graph::core::eAccessType newAccessType) noexcept
{
    setDataAccess_abi(dataType, newAccessType);
}

inline omni::graph::core::eComputeRule omni::core::Generated<omni::graph::core::ISchedulingHints_abi>::getComputeRule() noexcept
{
    return getComputeRule_abi();
}

inline void omni::core::Generated<omni::graph::core::ISchedulingHints_abi>::setComputeRule(
    omni::graph::core::eComputeRule newComputeRule) noexcept
{
    setComputeRule_abi(newComputeRule);
}

inline bool omni::core::Generated<omni::graph::core::ISchedulingHints_abi>::inspect(
    omni::core::ObjectParam<omni::inspect::IInspector> inspector) noexcept
{
    return inspect_abi(inspector.get());
}

#endif

#undef OMNI_BIND_INCLUDE_INTERFACE_DECL
#undef OMNI_BIND_INCLUDE_INTERFACE_IMPL
