本文整理汇总了C++中Geostat_grid::select_property方法的典型用法代码示例。如果您正苦于以下问题:C++ Geostat_grid::select_property方法的具体用法?C++ Geostat_grid::select_property怎么用?C++ Geostat_grid::select_property使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Geostat_grid
的用法示例。
在下文中一共展示了Geostat_grid::select_property方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: exec
//.........这里部分代码省略.........
std::cerr << "ERROR: time and values do not align"
<< std::endl;
// GENERATE NEW METRIC DATA HERE
// Need: Pointer to property
// -QDomElement metaDataXml
// which has <algorithm name = "whatever">
// and <Name value = "whatever">
// Find pointer to appropiate property
// Obtain smart point to current grid
SmartPtr<Named_interface> grid_ni =
Root::instance()->interface(gridModels_manager +
"/" +
gridStr.toStdString());
if (grid_ni.raw_ptr() == 0)
{
std::cerr << "Grid not found" << std::endl;
file.close();
return;
}
Geostat_grid* grid =
dynamic_cast<Geostat_grid*> (grid_ni.raw_ptr());
// Grab GsTLGridProperty from Grid
GsTLGridProperty* currentProperty =
grid->select_property(propStr.toStdString());
// Generate the required metaDataXml
QDomDocument doc("metaDataXml");
QDomElement metaDataXml = doc.createElement("metaRoot");
doc.appendChild(metaDataXml);
QDomElement algoXml = doc.createElement("algorithm");
algoXml.setAttribute("name",nameStr);
metaDataXml.appendChild(algoXml);
QDomElement nameXml = doc.createElement("Name");
nameXml.setAttribute("value",nameStr);
metaDataXml.appendChild(nameXml);
SmartPtr<Named_interface> ni =
Root::instance()->interface(
metricData_manager + "/metricRegistrar");
MetricDataManager* mDataRegistrar =
dynamic_cast<MetricDataManager*>(ni.raw_ptr());
MetricTimeSeriesData *metric = new
MetricTimeSeriesData(currentProperty,
metaDataXml,value,time);
mDataRegistrar->registerMetricData(gridStr.toStdString(),
propStr.toStdString(),
metric );
// Move onto next response
time.clear();
value.clear();