osrm-backend/include/extractor/class_data.hpp
Patrick Niklaus 44739f2dc3 Allow users to specify a class for each way
This adds the ability to mark ways with a user-defined
class in the profile. This class information will be included
in the response as property of the RouteStep object.
2017-07-06 09:17:49 +00:00

23 lines
461 B
C++

#ifndef OSRM_EXTRACTOR_CLASSES_DATA_HPP
#define OSRM_EXTRACTOR_CLASSES_DATA_HPP
#include "util/bit_range.hpp"
#include <cstdint>
namespace osrm
{
namespace extractor
{
using ClassData = std::uint8_t;
static const std::uint8_t MAX_CLASS_INDEX = 8 - 1;
inline bool isSubset(const ClassData lhs, const ClassData rhs) { return (lhs & rhs) == lhs; }
inline auto getClassIndexes(const ClassData data) { return util::makeBitRange<ClassData>(data); }
}
}
#endif