osrm-backend/include/util/name_table.hpp

32 lines
736 B
C++
Raw Normal View History

#ifndef OSRM_UTIL_NAME_TABLE_HPP
#define OSRM_UTIL_NAME_TABLE_HPP
#include "util/range_table.hpp"
2016-03-23 08:04:23 -04:00
#include "util/shared_memory_vector_wrapper.hpp"
#include <string>
namespace osrm
{
namespace util
{
// While this could, theoretically, hold any names in the fitting format,
// the NameTable allows access to a part of the Datafacade to allow
// processing based on name indices.
class NameTable
{
private:
// FIXME should this use shared memory
RangeTable<16, false> m_name_table;
ShM<char, false>::vector m_names_char_list;
public:
NameTable(const std::string &filename);
2016-03-18 14:21:13 -04:00
std::string GetNameForID(const unsigned name_id) const;
};
} // namespace util
} // namespace osrm
#endif // OSRM_UTIL_NAME_TABLE_HPP