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

Function ModifierToRuleState

3party/opening_hours/rules_evaluation.cpp:98–118  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

96}
97
98osmoh::RuleState ModifierToRuleState(osmoh::RuleSequence::Modifier const modifier)
99{
100 using Modifier = osmoh::RuleSequence::Modifier;
101
102 switch(modifier)
103 {
104 case Modifier::DefaultOpen:
105 case Modifier::Open:
106 return osmoh::RuleState::Open;
107
108 case Modifier::Closed:
109 return osmoh::RuleState::Closed;
110
111 case Modifier::Unknown:
112 case Modifier::Comment:
113 return osmoh::RuleState::Unknown;
114 }
115 std::cerr << "Unreachable\n";
116 std::abort();
117 return osmoh::RuleState::Unknown;
118}
119
120// Transform timspan with extended end of the form of
121// time less than 24 hours to extended form, i.e from 25 to 48 hours.

Callers 1

GetStateFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected