MCPcopy Create free account
hub / github.com/Kitware/VTK / FindDataSource

Method FindDataSource

ThirdParty/fides/vtkfides/fides/DataModel.cxx:151–165  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

149}
150
151std::string DataModelBase::FindDataSource(const rapidjson::Value& dataModel,
152 DataSourcesType& sources) const
153{
154 if (!dataModel.HasMember("data_source"))
155 {
156 throw std::runtime_error(this->ObjectName + " must provide a data_source.");
157 }
158 std::string dsname = dataModel["data_source"].GetString();
159 auto iter = sources.find(dsname);
160 if (iter == sources.end())
161 {
162 throw std::runtime_error("data_source." + dsname + " was not found.");
163 }
164 return dsname;
165}
166
167void DataModelBase::ProcessJSON(const rapidjson::Value& json, DataSourcesType& sources)
168{

Callers 1

ProcessJSONMethod · 0.95

Calls 3

GetStringMethod · 0.45
findMethod · 0.45
endMethod · 0.45

Tested by

no test coverage detected