| 412 | } |
| 413 | |
| 414 | fg_plot ForgeManager::getPlot(fg_chart chart, int nPoints, fg_dtype dtype, |
| 415 | fg_plot_type ptype, fg_marker_type mtype) { |
| 416 | unsigned long long key = |
| 417 | ((static_cast<unsigned long long>(nPoints) & _48BIT) << 16U); |
| 418 | key |= |
| 419 | (((dtype & _4BIT) << 12U) | ((ptype & _4BIT) << 8U) | (mtype & _8BIT)); |
| 420 | |
| 421 | ChartKey keypair = std::make_pair(key, chart); |
| 422 | auto iter = mPltMap.find(keypair); |
| 423 | |
| 424 | if (iter == mPltMap.end()) { |
| 425 | fg_chart_type chart_type; |
| 426 | FG_CHECK(mPlugin->fg_get_chart_type(&chart_type, chart)); |
| 427 | |
| 428 | fg_plot plt = nullptr; |
| 429 | FG_CHECK(mPlugin->fg_create_plot(&plt, nPoints, dtype, chart_type, |
| 430 | ptype, mtype)); |
| 431 | FG_CHECK(mPlugin->fg_append_plot_to_chart(chart, plt)); |
| 432 | |
| 433 | mPltMap[keypair] = PlotPtr(new Plot({plt})); |
| 434 | } |
| 435 | return mPltMap[keypair]->handle; |
| 436 | } |
| 437 | |
| 438 | fg_histogram ForgeManager::getHistogram(fg_chart chart, int nBins, |
| 439 | fg_dtype type) { |