#pragma once




#include "nlohmann/json_fwd.hpp"
#include <SimCore/Identifier.hpp>
#include <SimCore/Messages/SimTrack.hpp>
#include <nlohmann/json.hpp>
#include <map>
#include <memory>
#include <mutex>

namespace SimControl
{
    class TrackList
    {
        public: 
            TrackList();
            void addTrack(std::shared_ptr<SimCore::SimTrack> Track);
            std::shared_ptr<SimCore::SimTrack> getTrack(SimCore::Identifier);
            
            
            std::shared_ptr<SimCore::SimTrack> getTrackBySringID(std::string ID);


            void getJsonTRackList(nlohmann::json &message);
            

        private: 
            mutable std::mutex mx_;
            std::map<std::string, std::shared_ptr<SimCore::SimTrack>> TrackStore_;


    };
}