#ifndef __LocBaseUtil_H_INCLUDED_
#define __LocBaseUtil_H_INCLUDED_
#include <ros/ros.h>

namespace loc_base
{
  class LocBaseUtil
  {
  public:
    /*
     * @brief returns a full qualified filepath from package name and file name.
     *
     * @param package package name
     *
     * @return full qualified filepath (or filename if package is empty or couldn't be found).
     */
    static std::string filepathFromPackage(const std::string & package, const std::string & filename);

    static bool loadActivateMapFileName(const std::string& filename, std::string &activated_map_filename);

    static bool saveActivateMapFileName(const std::string& filename, const std::string &activated_map_filename);

    static bool convertPgmToPng(const std::string& pgmFileName, const std::string& pngFileName);
    
    static bool writeGridMap(const std::string& filename);

    static bool checkIfMapFilesExist(const std::string& filename);

    static bool replaceMapDirectory(const std::string& mapDirectory);

    /**
		* @brief Get the list of map folder in the workingdirection
		* @param directories The list map name
		*/
		static std::stringstream listMapFiles(const std::string &path);
  };
}

#endif
