//
// Created by zx on 23-11-28.
//

#ifndef CERES_TEST_TransitData_H
#define CERES_TEST_TransitData_H

#include <pcl/point_types.h>
#include <pcl/point_cloud.h>
#include "tool/timedlockdata.hpp"
#include "tool/singleton.hpp"
#include <mutex>
#include <vector>

class TransitData : public Singleton<TransitData> {
    friend Singleton<TransitData>;
public:
    void setCloud(int id, pcl::PointCloud<pcl::PointXYZ>::Ptr cloud);

    void getCloud(int id, pcl::PointCloud<pcl::PointXYZ>::Ptr cloud);
private:
    TransitData();
    std::vector<pcl::PointCloud<pcl::PointXYZ>::Ptr> m_clouds_vct;
    std::mutex m_mutex_clouds_vct[4];
};

#endif //CERES_TEST_TransitData_H
