431 |
* |
* |
432 |
* Returns the unique identifier of the original C/C++ member instance of |
* Returns the unique identifier of the original C/C++ member instance of |
433 |
* your C++ class. It is important to know that this unique identifier is |
* your C++ class. It is important to know that this unique identifier is |
434 |
* not generated particularly for Member objects. That means no matter how |
* not meant to be unique for Member instances themselves, but it is rather |
435 |
* many individual Member objects are created, as long as they are |
* meant to be unique for the original native C/C++ data these Member |
436 |
* representing the same member variable of the same original native |
* instances are representing. So that means no matter how many individual |
437 |
|
* Member objects are created, as long as they are representing the same |
438 |
|
* original native member variable of the same original native |
439 |
* instance of your C++ class, then all those separately created Member |
* instance of your C++ class, then all those separately created Member |
440 |
* objects return the same unique identifier here. |
* objects return the same unique identifier here. |
441 |
* |
* |
2082 |
setIntValue(object, atoll(value.c_str())); |
setIntValue(object, atoll(value.c_str())); |
2083 |
else if (type.isReal()) |
else if (type.isReal()) |
2084 |
setRealValue(object, atof(value.c_str())); |
setRealValue(object, atof(value.c_str())); |
2085 |
else if (type.isBool()) |
else if (type.isBool()) { |
2086 |
setBoolValue(object, atof(value.c_str())); |
String val = toLowerCase(value); |
2087 |
else if (type.isEnum()) |
if (val == "true" || val == "yes" || val == "1") |
2088 |
|
setBoolValue(object, true); |
2089 |
|
else if (val == "false" || val == "no" || val == "0") |
2090 |
|
setBoolValue(object, false); |
2091 |
|
else |
2092 |
|
setBoolValue(object, atof(value.c_str())); |
2093 |
|
} else if (type.isEnum()) |
2094 |
setEnumValue(object, atoll(value.c_str())); |
setEnumValue(object, atoll(value.c_str())); |
2095 |
else |
else |
2096 |
throw Exception("Not a primitive data type"); |
throw Exception("Not a primitive data type"); |