/* * PanelPlotNodeRegistry.cc * * Created on: Dec 6, 2013 * Author: amdadev */ #ifndef PANELPLOTNODETREGISTRY_CC_ #define PANELPLOTNODETREGISTRY_CC_ #include "PanelPlotNodeRegistry.hh" namespace plot { PanelPlotNodeRegistry PanelPlotNodeRegistry::_Instance; PanelPlotNodeRegistry::PanelPlotNodeRegistry() { } PanelPlotNodeRegistry::~PanelPlotNodeRegistry() { // Nothing to do there since we use shared_ptr (hope so)... } /** * Registers a post-processing. */ std::string PanelPlotNodeRegistry::addElement(const std::string& pkey_, boost::shared_ptr pp_){ // register if not already in if (getRegistry().find(pkey_) == getRegistry().end()) { getRegistry().insert(std::pair>(pkey_, pp_)); } return pkey_; } /** * Registers a plot configuration node. */ std::string PanelPlotNodeRegistry::addConfigElement(const std::string& pKey_, boost::shared_ptr confNode_){ // register if not already in if (getConfigRegistry().find(pKey_) == getConfigRegistry().end()) { getConfigRegistry().insert(std::pair>(pKey_, confNode_)); } return pKey_; } } /* namespace plot */ #endif /* PANELPLOTNODETREGISTRY_CC_ */