diff --git a/src/api/MagicsCalls.cc b/src/api/MagicsCalls.cc index 694ed844..ce53c412 100644 --- a/src/api/MagicsCalls.cc +++ b/src/api/MagicsCalls.cc @@ -42,7 +42,20 @@ const char* MagicsCalls::metainput() { const char* MagicsCalls::metanetcdf() { return FortranMagics::instance().metanetcdf(); } +const char* MagicsCalls::long_parameters() { + static string result; + ostringstream os; + os << "{"; + os << "\"grib_field_position\": \"grib_field_large_position\","; + os << "\"grib_wind_position_1\": \"grib_wind_large_position_1\","; + os << "\"grib_wind_position_2\": \"grib_wind_large_position_2\","; + os << "\"grib_wind_position_colour\": \"grib_wind_large_position_colour\""; + os << "}"; + result = os.str(); + return result.c_str(); + +} const char* MagicsCalls::keep_compatibility() { NOTIMP; } @@ -385,6 +398,11 @@ void MagicsCalls::seti(const std::string& name, int value) { ParameterManager::set(name, value); } +void MagicsCalls::setli(const std::string& name, unsigned long long value) { + // if (CompatibilityHelper::check(name, value)) + // return; + ParameterManager::set(name, value); +} void MagicsCalls::set1i(const std::string& name, const std::vector& data) { set1i(name, data.data(), data.size()); diff --git a/src/api/MagicsCalls.h b/src/api/MagicsCalls.h index a70123d9..399112d3 100644 --- a/src/api/MagicsCalls.h +++ b/src/api/MagicsCalls.h @@ -20,6 +20,7 @@ class MagicsCalls { static const char* metainput(); static const char* metanetcdf(); static const char* keep_compatibility(); + static const char* long_parameters(); // ================================================================= static void axis(); @@ -82,6 +83,7 @@ class MagicsCalls { static void set1c(const std::string& name, const std::vector& data); static void seti(const std::string& name, int value); + static void setli(const std::string& name, unsigned long long value); static void set1i(const std::string& name, const int* data, const int dim1); static void set1i(const std::string& name, const std::vector& data); static void set2i(const std::string& name, const int* data, const int dim1, const int dim2); diff --git a/src/api/MagicsCallsPython.cc b/src/api/MagicsCallsPython.cc index e3fd90b6..45d53771 100644 --- a/src/api/MagicsCallsPython.cc +++ b/src/api/MagicsCallsPython.cc @@ -162,7 +162,7 @@ PYTHON_VOID(tile) PYTHON_VOID(unmute) // TODO: review name PYTHON_VOID(wind) PYTHON_VOID(wrepjson) - +PYTHON_CHAR(long_parameters) PYTHON_CHAR(knowndrivers) // TODO: review name PYTHON_CHAR(metagrib) // TODO: review name PYTHON_CHAR(metainput) // TODO: review name @@ -193,6 +193,10 @@ MAGICS_EXPORT const char* py_seti(const char* name, const int value) { return python_void("seti", [name, value] { MagicsCalls::seti(name, value); }); } +MAGICS_EXPORT const char* py_setli(const char* name, const unsigned long long value) { + return python_void("setli", [name, value] { MagicsCalls::setli(name, value); }); +} + MAGICS_EXPORT const char* py_set1r(const char* name, const double* data, const int dim1) { return python_void("set1r", [name, data, dim1] { MagicsCalls::set1r(name, data, dim1); }); } diff --git a/src/api/py_calls.h b/src/api/py_calls.h index 88a1c586..503359d8 100644 --- a/src/api/py_calls.h +++ b/src/api/py_calls.h @@ -19,6 +19,7 @@ MAGICS_EXPORT const char* py_import(); MAGICS_EXPORT const char* py_input(); MAGICS_EXPORT const char* py_keep_compatibility(); MAGICS_EXPORT const char* py_knowndrivers(); +MAGICS_EXPORT const char* py_long_parameters(); MAGICS_EXPORT const char* py_legend(); MAGICS_EXPORT const char* py_line(); MAGICS_EXPORT const char* py_mapgen(); @@ -50,6 +51,7 @@ MAGICS_EXPORT const char* py_reset(const char* name); MAGICS_EXPORT const char* py_setc(const char* name, const char* value); MAGICS_EXPORT const char* py_setr(const char* name, const double value); MAGICS_EXPORT const char* py_seti(const char* name, const int value); +MAGICS_EXPORT const char* py_setli(const char* name, const unsigned long long value); MAGICS_EXPORT const char* py_set1r(const char* name, const double* data, const int dim1); MAGICS_EXPORT const char* py_set2r(const char* name, const double* data, const int dim1, const int dim2); MAGICS_EXPORT const char* py_set1i(const char* name, const int* data, const int dim1); diff --git a/src/attributes/GribDecoderAttributes.cc b/src/attributes/GribDecoderAttributes.cc index 23385a67..8c44856a 100644 --- a/src/attributes/GribDecoderAttributes.cc +++ b/src/attributes/GribDecoderAttributes.cc @@ -41,9 +41,13 @@ GribDecoderAttributes::GribDecoderAttributes(): expver_(ParameterManager::getBool("grib_text_experiment")), units_(ParameterManager::getBool("grib_text_units")), field_position_(ParameterManager::getInt("grib_field_position")), + large_field_position_(ParameterManager::getULong("grib_field_large_position")), position_1_(ParameterManager::getInt("grib_wind_position_1")), position_2_(ParameterManager::getInt("grib_wind_position_2")), colour_position_(ParameterManager::getInt("grib_wind_position_colour")), + large_position_1_(ParameterManager::getULong("grib_wind_large_position_1")), + large_position_2_(ParameterManager::getULong("grib_wind_large_position_2")), + large_colour_position_(ParameterManager::getULong("grib_wind_large_position_colour")), missing_value_(ParameterManager::getDouble("grib_missing_value_indicator")), wind_style_(ParameterManager::getBool("grib_wind_style")) , @@ -83,9 +87,13 @@ void GribDecoderAttributes::set(const std::map& params) setAttribute(prefix, "grib_text_experiment", expver_, params); setAttribute(prefix, "grib_text_units", units_, params); setAttribute(prefix, "grib_field_position", field_position_, params); + setAttribute(prefix, "grib_field_large_position", large_field_position_, params); setAttribute(prefix, "grib_wind_position_1", position_1_, params); setAttribute(prefix, "grib_wind_position_2", position_2_, params); setAttribute(prefix, "grib_wind_position_colour", colour_position_, params); + setAttribute(prefix, "grib_wind_large_position_1", large_position_1_, params); + setAttribute(prefix, "grib_wind_large_position_2", large_position_2_, params); + setAttribute(prefix, "grib_wind_large_position_colour", large_colour_position_, params); setAttribute(prefix, "grib_missing_value_indicator", missing_value_, params); setAttribute(prefix, "grib_wind_style", wind_style_, params); @@ -112,9 +120,13 @@ void GribDecoderAttributes::copy(const GribDecoderAttributes& other) expver_ = other.expver_; units_ = other.units_; field_position_ = other.field_position_; + large_field_position_ = other.large_field_position_; position_1_ = other.position_1_; position_2_ = other.position_2_; colour_position_ = other.colour_position_; + large_position_1_ = other.large_position_1_; + large_position_2_ = other.large_position_2_; + large_colour_position_ = other.large_colour_position_; missing_value_ = other.missing_value_; wind_style_ = other.wind_style_; address_mode_ = unique_ptr(other.address_mode_->clone()); @@ -181,9 +193,13 @@ void GribDecoderAttributes::print(ostream& out) const out << " expver = " << expver_; out << " units = " << units_; out << " field_position = " << field_position_; + out << " large_field_position = " << large_field_position_; out << " position_1 = " << position_1_; out << " position_2 = " << position_2_; out << " colour_position = " << colour_position_; + out << " large_position_1 = " << large_position_1_; + out << " large_position_2 = " << large_position_2_; + out << " large_colour_position = " << large_colour_position_; out << " missing_value = " << missing_value_; out << " wind_style = " << wind_style_; out << " address_mode = " << *address_mode_; @@ -227,12 +243,20 @@ void GribDecoderAttributes::toxml(ostream& out) const niceprint(out,units_); out << ", \"grib_field_position\":"; niceprint(out,field_position_); + out << ", \"grib_field_large_position\":"; + niceprint(out,large_field_position_); out << ", \"grib_wind_position_1\":"; niceprint(out,position_1_); out << ", \"grib_wind_position_2\":"; niceprint(out,position_2_); out << ", \"grib_wind_position_colour\":"; niceprint(out,colour_position_); + out << ", \"grib_wind_large_position_1\":"; + niceprint(out,large_position_1_); + out << ", \"grib_wind_large_position_2\":"; + niceprint(out,large_position_2_); + out << ", \"grib_wind_large_position_colour\":"; + niceprint(out,large_colour_position_); out << ", \"grib_missing_value_indicator\":"; niceprint(out,missing_value_); out << ", \"grib_wind_style\":"; @@ -260,9 +284,13 @@ static MagicsParameter grib_interpolation_method_missing_fill_count("grib_i static MagicsParameter grib_text_experiment("grib_text_experiment", "off"); static MagicsParameter grib_text_units("grib_text_units", "off"); static MagicsParameter grib_field_position("grib_field_position", 1); +static MagicsParameter grib_field_large_position("grib_field_large_position", 0); static MagicsParameter grib_wind_position_1("grib_wind_position_1", 1); static MagicsParameter grib_wind_position_2("grib_wind_position_2", -1); static MagicsParameter grib_wind_position_colour("grib_wind_position_colour", -1); +static MagicsParameter grib_wind_large_position_1("grib_wind_large_position_1", 0); +static MagicsParameter grib_wind_large_position_2("grib_wind_large_position_2", 0); +static MagicsParameter grib_wind_large_position_colour("grib_wind_large_position_colour", 0); static MagicsParameter grib_missing_value_indicator("grib_missing_value_indicator", -1.5e+21); static MagicsParameter grib_wind_style("grib_wind_style", "off"); static MagicsParameter grib_file_address_mode("grib_file_address_mode", "record"); diff --git a/src/attributes/GribDecoderAttributes.h b/src/attributes/GribDecoderAttributes.h index e096edea..090aa4ba 100644 --- a/src/attributes/GribDecoderAttributes.h +++ b/src/attributes/GribDecoderAttributes.h @@ -68,9 +68,13 @@ class GribDecoderAttributes bool expver_; bool units_; int field_position_; + unsigned long long large_field_position_; int position_1_; int position_2_; int colour_position_; + unsigned long long large_position_1_; + unsigned long long large_position_2_; + unsigned long long large_colour_position_; double missing_value_; bool wind_style_; unique_ptr address_mode_; diff --git a/src/attributes/GribDecoderWrapper.cc b/src/attributes/GribDecoderWrapper.cc index 008b6cf5..08c20fb6 100644 --- a/src/attributes/GribDecoderWrapper.cc +++ b/src/attributes/GribDecoderWrapper.cc @@ -189,6 +189,78 @@ void GribDecoderWrapper::set(const MagRequest& request) gribdecoder_->wind_mode_ = unique_ptr(wind_mode_wrapper->object()); delete wind_mode_wrapper; + string large_field_position_value = request.countValues("GRIB_FIELD_LARGE_POSITION") ? (string) request("GRIB_FIELD_LARGE_POSITION") : "0"; + MagLog::debug() << " GRIB_FIELD_LARGE_POSITION set to " << large_field_position_value << endl; + unsigned long longWrapper* large_field_position_wrapper = 0; + try + { + large_field_position_wrapper = SimpleFactory::create(large_field_position_value); + } + catch (NoFactoryException&) { + if (MagicsGlobal::strict()) { + throw; + } + MagLog::warning() << "[" << large_field_position_value << "] is not a valid value for large_field_position: reset to default -> [0]" << endl; + large_field_position_wrapper = SimpleFactory::create("0"); + } + large_field_position_wrapper->set(request); + gribdecoder_->large_field_position_ = unique_ptr(large_field_position_wrapper->object()); + delete large_field_position_wrapper; + + string large_position_1_value = request.countValues("GRIB_WIND_LARGE_POSITION_1") ? (string) request("GRIB_WIND_LARGE_POSITION_1") : "0"; + MagLog::debug() << " GRIB_WIND_LARGE_POSITION_1 set to " << large_position_1_value << endl; + unsigned long longWrapper* large_position_1_wrapper = 0; + try + { + large_position_1_wrapper = SimpleFactory::create(large_position_1_value); + } + catch (NoFactoryException&) { + if (MagicsGlobal::strict()) { + throw; + } + MagLog::warning() << "[" << large_position_1_value << "] is not a valid value for large_position_1: reset to default -> [0]" << endl; + large_position_1_wrapper = SimpleFactory::create("0"); + } + large_position_1_wrapper->set(request); + gribdecoder_->large_position_1_ = unique_ptr(large_position_1_wrapper->object()); + delete large_position_1_wrapper; + + string large_position_2_value = request.countValues("GRIB_WIND_LARGE_POSITION_2") ? (string) request("GRIB_WIND_LARGE_POSITION_2") : "0"; + MagLog::debug() << " GRIB_WIND_LARGE_POSITION_2 set to " << large_position_2_value << endl; + unsigned long longWrapper* large_position_2_wrapper = 0; + try + { + large_position_2_wrapper = SimpleFactory::create(large_position_2_value); + } + catch (NoFactoryException&) { + if (MagicsGlobal::strict()) { + throw; + } + MagLog::warning() << "[" << large_position_2_value << "] is not a valid value for large_position_2: reset to default -> [0]" << endl; + large_position_2_wrapper = SimpleFactory::create("0"); + } + large_position_2_wrapper->set(request); + gribdecoder_->large_position_2_ = unique_ptr(large_position_2_wrapper->object()); + delete large_position_2_wrapper; + + string large_colour_position_value = request.countValues("GRIB_WIND_LARGE_POSITION_COLOUR") ? (string) request("GRIB_WIND_LARGE_POSITION_COLOUR") : "0"; + MagLog::debug() << " GRIB_WIND_LARGE_POSITION_COLOUR set to " << large_colour_position_value << endl; + unsigned long longWrapper* large_colour_position_wrapper = 0; + try + { + large_colour_position_wrapper = SimpleFactory::create(large_colour_position_value); + } + catch (NoFactoryException&) { + if (MagicsGlobal::strict()) { + throw; + } + MagLog::warning() << "[" << large_colour_position_value << "] is not a valid value for large_colour_position: reset to default -> [0]" << endl; + large_colour_position_wrapper = SimpleFactory::create("0"); + } + large_colour_position_wrapper->set(request); + gribdecoder_->large_colour_position_ = unique_ptr(large_colour_position_wrapper->object()); + delete large_colour_position_wrapper; + } void GribDecoderWrapper::print(ostream& out) const @@ -229,3 +301,7 @@ static SimpleObjectMaker GribDecoder_grib_wi + + + + diff --git a/src/attributes/GribDecoderWrapper.h b/src/attributes/GribDecoderWrapper.h index 20fafaf4..46e517b9 100644 --- a/src/attributes/GribDecoderWrapper.h +++ b/src/attributes/GribDecoderWrapper.h @@ -41,6 +41,10 @@ #include "GribAddressModeWrapper.h" #include "WindModeWrapper.h" +#include "unsigned long longWrapper.h" +#include "unsigned long longWrapper.h" +#include "unsigned long longWrapper.h" +#include "unsigned long longWrapper.h" namespace magics { diff --git a/src/common/BaseParameter.cc b/src/common/BaseParameter.cc index 1f70d981..deac8e3c 100644 --- a/src/common/BaseParameter.cc +++ b/src/common/BaseParameter.cc @@ -72,6 +72,14 @@ void BaseParameter::set(const bool& value) { throw MistmatchType(name_, getType(value), type()); } +void BaseParameter::get(unsigned long long& value) const { + throw MistmatchType(name_, getType(value), type()); +} + +void BaseParameter::set(const unsigned long long& value) { + throw MistmatchType(name_, getType(value), type()); +} + void BaseParameter::get(bool& value) const { throw MistmatchType(name_, getType(value), type()); } @@ -308,6 +316,13 @@ void BaseParameter::get(Matrix& value) const { string BaseParameter::getType(const string&) const { return "string"; } +string BaseParameter::getType(const unsigned long long&) const { + return "unsigned long "; +} + +string BaseParameter::getType(const unsigned int&) const { + return "unsigned int "; +} string BaseParameter::getType(const int&) const { return "integer"; diff --git a/src/common/BaseParameter.h b/src/common/BaseParameter.h index f61320dc..a58b6b2f 100644 --- a/src/common/BaseParameter.h +++ b/src/common/BaseParameter.h @@ -65,6 +65,9 @@ class BaseParameter { virtual void set(const int&); virtual void get(int&) const; + virtual void set(const unsigned long long&); + virtual void get(unsigned long long&) const; + virtual void set(const magvector&); virtual void get(magvector&) const; @@ -104,6 +107,8 @@ class BaseParameter { string getType(const string&) const; string getType(const int&) const; + string getType(const unsigned long long&) const; + string getType(const unsigned int&) const; string getType(const double&) const; string getType(const magvector&) const; string getType(const magvector&) const; diff --git a/src/common/MagTranslator.h b/src/common/MagTranslator.h index a4d4ac47..3faf6135 100644 --- a/src/common/MagTranslator.h +++ b/src/common/MagTranslator.h @@ -130,6 +130,29 @@ class MagTranslator { } }; +template <> +class MagTranslator { +public: + int operator()(const string& value) { return atoll(value.c_str()); } + int magics(const string& param) { + int from; + ParameterManager::get(param, from); + return from; + } +}; + + +template <> +class MagTranslator { +public: + int operator()(unsigned long long& value) { return value; } + int magics(const string& param) { + unsigned long long from; + ParameterManager::get(param, from); + return from; + } +}; + template <> class MagTranslator { public: diff --git a/src/common/ParameterManager.cc b/src/common/ParameterManager.cc index 606835e4..82315437 100644 --- a/src/common/ParameterManager.cc +++ b/src/common/ParameterManager.cc @@ -103,6 +103,12 @@ int ParameterManager::getInt(const string& name) { ASSERT(get(name, value)); return value; } +unsigned long long ParameterManager::getULong(const string& name) { + unsigned long long value; + + ASSERT(get(name, value)); + return value; +} string ParameterManager::getString(const string& name) { string value; diff --git a/src/common/ParameterManager.h b/src/common/ParameterManager.h index c25056d5..c921d670 100644 --- a/src/common/ParameterManager.h +++ b/src/common/ParameterManager.h @@ -45,6 +45,7 @@ class ParameterManager : public map { template static void set(const string& name, const T& value) { + ASSERT(table_); BaseParameter* param = (*table_).parameter(name); if (param) { @@ -80,6 +81,8 @@ class ParameterManager : public map { static double getDouble(const string& name); static int getInt(const string& name); + static int getUnsignedInt(const string& name); + static unsigned long long getULong(const string& name); static string getString(const string& name); static stringarray getStringArray(const string& name); diff --git a/src/decoders/GribAddressMode.h b/src/decoders/GribAddressMode.h index a521a337..8ca95e1a 100644 --- a/src/decoders/GribAddressMode.h +++ b/src/decoders/GribAddressMode.h @@ -50,11 +50,11 @@ class GribAddressMode { virtual void toxml(ostream&, int = 0) const { MagLog::dev() << "GribAddressMode::toxml(ostream&, int = 0)---> to be checked!...\n"; } - virtual grib_handle* operator()(grib_context*, FILE*, int) const { - MagLog::dev() << "GribAddressMode::toxml(ostream&, int = 0)---> to be checked!...\n"; - return 0; - } - virtual grib_handle* operator()(grib_context*, FILE*, long int) const { + // virtual grib_handle* operator()(grib_context*, FILE*, int) const { + // MagLog::dev() << "GribAddressMode::toxml(ostream&, int = 0)---> to be checked!...\n"; + // return 0; + // } + virtual grib_handle* operator()(grib_context*, FILE*, unsigned long long) const { MagLog::dev() << "GribAddressMode::toxml(ostream&, int = 0)---> to be checked!...\n"; return 0; } @@ -87,13 +87,13 @@ class GribAddressRecordMode : public GribAddressMode { return mode; } - virtual grib_handle* operator()(grib_context*, FILE* file, int position) const override { + virtual grib_handle* operator()(grib_context*, FILE* file, unsigned long long position) const override { grib_handle* handle = 0; grib_context* context = grib_context_get_default(); int error; - for (int i = 0; i < position - 1; i++) { + for (auto i = 0; i < position - 1; i++) { // grib_read_any_from_file_alloc (context, file, &msg , &size); // grib_context_free(context,msg); // MagLog::debug() << "call to grib_handle_new_from_file for position " << i << "\n"; @@ -118,22 +118,28 @@ class GribAddressByteMode : public GribAddressMode { GribAddressMode* mode = new GribAddressByteMode(); return mode; } + #include - virtual grib_handle* operator()(grib_context* context, FILE* file, int position) const override { - // long int offset = (long int)position; - // cout << "OFFSET-->" << offset << endl; - fseek(file, (long int)position, SEEK_SET); - grib_handle* handle = 0; + // virtual grib_handle* operator()(grib_context* context, FILE* file, int position) const override { + // // long int offset = (long int)position; + // cout << "OFFSET-->" << position << endl; - int error; - handle = grib_handle_new_from_file(0, file, &error); + // fseek(file, (long int)position, SEEK_SET); + // grib_handle* handle = 0; - return handle; - } - virtual grib_handle* operator()(grib_context* context, FILE* file, long int position) const override { + // int error; + // handle = grib_handle_new_from_file(0, file, &error); + + // return handle; + // } + virtual grib_handle* operator()(grib_context* context, FILE* file, unsigned long long position) const override { + fseek(file, position, SEEK_SET); grib_handle* handle = 0; + + + int error; handle = grib_handle_new_from_file(0, file, &error); diff --git a/src/decoders/GribDecoder.cc b/src/decoders/GribDecoder.cc index d93412e7..3b454b24 100644 --- a/src/decoders/GribDecoder.cc +++ b/src/decoders/GribDecoder.cc @@ -751,7 +751,8 @@ void GribDecoder::decode2D(const Transformation&) { } void GribDecoder::openField() { - current_position_ = field_position_; + + current_position_ = (large_field_position_) ? large_field_position_ : field_position_; current_file_name_ = file_name_; field_ = open(field_); diff --git a/src/decoders/GribDecoder.h b/src/decoders/GribDecoder.h index 96a520db..f818e73f 100644 --- a/src/decoders/GribDecoder.h +++ b/src/decoders/GribDecoder.h @@ -275,7 +275,7 @@ class GribDecoder : public Decoder, public Data, public GribDecoderAttributes { bool directionDone_; mutable grib_handle* current_handle_; - mutable int current_position_; + mutable unsigned long long current_position_; mutable string current_file_name_; string title_; diff --git a/src/params/GribDecoder.xml b/src/params/GribDecoder.xml index e5c6b729..97b1a55f 100644 --- a/src/params/GribDecoder.xml +++ b/src/params/GribDecoder.xml @@ -35,7 +35,9 @@ does it submit to any jurisdiction. to="string" default="grib_input_file_name" from="string" -CountSelection The name of the input file containing the u-component of wind + name="grib_colour_component_file_name"> + + The name of the input file containing the u-component of wind The name of the input file containing the u-comp name="grib_field_position"> The position in the input file of a field other than a wind component + + used when the offset is too big + The name of the input file containing the u-comp name="grib_wind_position_colour"> The position in the input file of a wind component field used to colour the flag + + The position in the input file of a wind component field + + + The position in the input file of a wind component field + + + The position in the input file of a wind component field used to colour the flag + max_limit) { + push_back(max_limit); + push_back(min_limit); + return; + } + double step = (max_limit - min_limit) / nb; double toleranceProportion = diff --git a/src/visualisers/WindPlotting.cc b/src/visualisers/WindPlotting.cc index fdd469c9..0041b4f4 100644 --- a/src/visualisers/WindPlotting.cc +++ b/src/visualisers/WindPlotting.cc @@ -70,13 +70,15 @@ void WindPlotting::setAdvanced(double& min, double& max) { colourMethod_->set(*this); levels_->calculate(min, max, false); LevelSelection::const_iterator level = levels_->begin(); + if ( levels_->size() == 1 ) + levels_->push_back(levels_->back()*1.00001); colourMethod_->prepare(*levels_, *levels_); Colour last; map_.clear(); while (true) { if (level + 1 == levels_->end()) break; - MagLog::debug() << "[" << *level << ", " << *(level + 1) << "]=" << colourMethod_->right(*level) << endl; + MagLog::debug() << "[" << *level << ", " << *(level + 1) << "]=" << colourMethod_->right(*level) << endl; map_[Interval(*level, *(level + 1))] = colourMethod_->right(*level); last = colourMethod_->right(*level); ++level; diff --git a/tools/xml2cc.py b/tools/xml2cc.py index eade2d31..88abed4a 100755 --- a/tools/xml2cc.py +++ b/tools/xml2cc.py @@ -16,6 +16,7 @@ class ObjectHandler(ContentHandler): basic = { "bool": "getBool", "int": "getInt", + "unsigned long long": "getULong", "float": "getDouble", "string": "getString", "stringarray": "getStringArray", diff --git a/tools/xml2cc_mv.py b/tools/xml2cc_mv.py index 2f579384..581ae37a 100755 --- a/tools/xml2cc_mv.py +++ b/tools/xml2cc_mv.py @@ -17,6 +17,7 @@ class ObjectHandler(ContentHandler): basic = { "bool": "getBool", "int": "getInt", + "unsigned lon long": "getULong", "float": "getDouble", "string": "getString", "stringarray": "getStringArray",