3 #include "CesiumUtility/Assert.h"
4 #include "JsonHandler.h"
16 JsonHandler::reset(pParent);
17 this->_pInteger = pInteger;
20 T* getObject() {
return this->_pInteger; }
23 CESIUM_ASSERT(this->_pInteger);
24 *this->_pInteger =
static_cast<T
>(i);
25 return this->parent();
28 CESIUM_ASSERT(this->_pInteger);
29 *this->_pInteger =
static_cast<T
>(i);
30 return this->parent();
33 CESIUM_ASSERT(this->_pInteger);
34 *this->_pInteger =
static_cast<T
>(i);
35 return this->parent();
38 CESIUM_ASSERT(this->_pInteger);
39 *this->_pInteger =
static_cast<T
>(i);
40 return this->parent();
43 CESIUM_ASSERT(this->_pInteger);
45 double fractPart = std::modf(d, &intPart);
47 return JsonHandler::readDouble(d);
49 *this->_pInteger =
static_cast<T
>(intPart);
50 return this->parent();
53 virtual void reportWarning(
54 const std::string& warning,
55 std::vector<std::string>&& context)
override {
56 context.push_back(
"(expecting an integer)");
57 this->parent()->reportWarning(warning, std::move(context));
61 T* _pInteger =
nullptr;
Classes for reading JSON.