MCPcopy Create free account
hub / github.com/comaps/comaps / CreateHeader

Method CreateHeader

libs/routing/opening_hours_serdes.cpp:107–125  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

105}
106
107OpeningHoursSerDes::Header OpeningHoursSerDes::CreateHeader(osmoh::RuleSequence const & rule) const
108{
109 Header header;
110 for (auto const & supportedFeature : m_supportedFeatures)
111 {
112 if (ExistsFeatureInOpeningHours(supportedFeature, rule))
113 {
114 header.Set(supportedFeature);
115 // We always store minutes if we have hours and vice versa. We divided them to have more
116 // atomic serialization and deserialization.
117 if (supportedFeature == Header::Bits::Hours)
118 header.Set(Header::Bits::Minutes);
119 if (supportedFeature == Header::Bits::Minutes)
120 header.Set(Header::Bits::Hours);
121 }
122 }
123
124 return header;
125}
126
127bool OpeningHoursSerDes::NotSupported(osmoh::RuleSequence const & rule)
128{

Callers

nothing calls this directly

Calls 1

SetMethod · 0.45

Tested by

no test coverage detected