#pragma once

#include <onnxruntime_cxx_api.h>

class OnnxruntimeEngine {
public:
    OnnxruntimeEngine(const std::string& modelName, bool useOpenvino);
    ~OnnxruntimeEngine();
    std::vector<Ort::Value> getFeatureVector(const Ort::Value& inputTensor);

    [[nodiscard]] unsigned long getInputTensorSize() const;
    [[nodiscard]] unsigned long getOutputTensorSize() const;
    [[nodiscard]] std::vector<int64_t> getInputDimension() const;
    [[nodiscard]] std::vector<int64_t> getOutputDimension() const;
private:

    std::unique_ptr<Ort::Session> m_sessionPtr = nullptr;
    std::unique_ptr<Ort::Env> m_envPtr = nullptr;
    Ort::SessionOptions m_sessionOpts;

    // Model information
    std::vector<const char*> m_inputNames;
    std::vector<const char*> m_outputNames;
    std::vector<int64_t> m_inputDims;
    std::vector<int64_t> m_outputDims;
    unsigned long m_inputTensorSize;
    unsigned long m_outputTensorSize;
};
