| 165 | } |
| 166 | |
| 167 | void DataModelBase::ProcessJSON(const rapidjson::Value& json, DataSourcesType& sources) |
| 168 | { |
| 169 | if (!json.HasMember("variable")) |
| 170 | { |
| 171 | throw std::runtime_error(this->ObjectName + " must provide a variable."); |
| 172 | } |
| 173 | |
| 174 | std::string varName = json["variable"].GetString(); |
| 175 | this->VariableName = varName; |
| 176 | this->DataSourceName = this->FindDataSource(json, sources); |
| 177 | |
| 178 | if (json.HasMember("static") && json["static"].IsBool()) |
| 179 | { |
| 180 | if (json["static"].GetBool()) |
| 181 | { |
| 182 | this->IsStatic = true; |
| 183 | } |
| 184 | } |
| 185 | } |
| 186 | |
| 187 | } |
| 188 | } |
nothing calls this directly
no test coverage detected