diff --git a/editor/editor.pro b/editor/editor.pro index 95b7d1a640..c0eb16cd73 100644 --- a/editor/editor.pro +++ b/editor/editor.pro @@ -25,3 +25,4 @@ HEADERS += \ server_api.hpp \ ui2oh.hpp \ xml_feature.hpp \ + yes_no_unknown.hpp \ diff --git a/editor/yes_no_unknown.hpp b/editor/yes_no_unknown.hpp new file mode 100644 index 0000000000..c6df462fd4 --- /dev/null +++ b/editor/yes_no_unknown.hpp @@ -0,0 +1,27 @@ +#pragma once + +#include "std/cstdint.hpp" +#include "std/string.hpp" + +/// Used to store and edit 3-state OSM information, for example, +/// "This place has internet", "does not have", or "it's not specified yet". +/// Explicit values are given for easier reuse in Java code. +namespace osm +{ +enum YesNoUnknown +{ + Unknown = 0, + Yes = 1, + No = 2 +}; + +inline string DebugPrint(YesNoUnknown value) +{ + switch (value) + { + case Unknown: return "Unknown"; + case Yes: return "Yes"; + case No: return "No"; + } +} +} // namespace osm