omni/connect/core/Python.h

File members: omni/connect/core/Python.h

// SPDX-FileCopyrightText: Copyright (c) 2022-2024 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
// SPDX-License-Identifier: LicenseRef-NvidiaProprietary
//
// NVIDIA CORPORATION, its affiliates and licensors retain all intellectual
// property and proprietary rights in and to this material, related
// documentation and any modifications thereto. Any use, reproduction,
// disclosure or distribution of this material and related documentation
// without an express license agreement from NVIDIA CORPORATION or
// its affiliates is strictly prohibited.

#pragma once

#include "Api.h"

#if OMNICONNECTCORE_WITH_PYTHON

#include <carb/scripting/IScripting.h>

#include <memory>
#include <string>

namespace omni::connect::core
{

OMNICONNECTCORE_API bool startupPython();

OMNICONNECTCORE_API bool executePythonCommand(const std::string& command);

OMNICONNECTCORE_API int executePythonIntFunction(const std::string& function);

OMNICONNECTCORE_API std::string executePythonStringFunction(const std::string& function);

OMNICONNECTCORE_API std::shared_ptr<carb::scripting::Object> acquirePythonObjectInstance(const std::string& function);

OMNICONNECTCORE_API int executePythonIntMethod(carb::scripting::Object* instance, const std::string& method);

OMNICONNECTCORE_API std::string executePythonStringMethod(carb::scripting::Object* instance, const std::string& method);

} // namespace omni::connect::core

#endif // OMNICONNECTCORE_WITH_PYTHON