From c38ab4cb6a7fa3c3ef29b0d638402b9e4f4c7d95 Mon Sep 17 00:00:00 2001 From: Jan-Tarek Butt Date: Sun, 20 Aug 2017 13:53:49 +0200 Subject: [PATCH] gluon-config-mode-geo-location: add checkgen.cpp --- .../src/checkgen.cpp | 20 +++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100644 package/gluon-config-mode-geo-location/src/checkgen.cpp diff --git a/package/gluon-config-mode-geo-location/src/checkgen.cpp b/package/gluon-config-mode-geo-location/src/checkgen.cpp new file mode 100644 index 00000000..29286420 --- /dev/null +++ b/package/gluon-config-mode-geo-location/src/checkgen.cpp @@ -0,0 +1,20 @@ +#include +#include +#include + +using namespace std; + +int main() { + stringstream s; + + s << "if need_table('config_mode', nil, false) and need_table('config_mode.geo_location', nil, false) then" << endl; + s << "\tneed_boolean('config_mode.geo_location.show_altitude', false)" << endl; +#ifdef WITHMAP + s << "\tneed_string('config_mode.geo_location.olurl', false)" << endl; + s << "\tneed_number('config_mode.geo_location.map_lon', false)" << endl; + s << "\tneed_number('config_mode.geo_location.map_lat', false)" << endl; +#endif + s << "end" << endl; + cout << s.str(); + return 0; +}