#include <Fireworks/Core/interface/FWViewManagerManager.h>
Public Member Functions | |
void | add (boost::shared_ptr< FWViewManagerBase >) |
void | eventBegin () |
void | eventEnd () |
FWViewManagerManager (FWModelChangeManager *, FWColorManager *) | |
void | registerEventItem (const FWEventItem *iItem) |
void | removeEventItem (const FWEventItem *iItem) |
FWTypeToRepresentations | supportedTypesAndRepresentations () const |
virtual | ~FWViewManagerManager () |
Private Member Functions | |
FWViewManagerManager (const FWViewManagerManager &) | |
const FWViewManagerManager & | operator= (const FWViewManagerManager &) |
Private Attributes | |
FWModelChangeManager * | m_changeManager |
FWColorManager * | m_colorManager |
std::map< std::string, const FWEventItem * > | m_typeToItems |
std::vector< boost::shared_ptr < FWViewManagerBase > > | m_viewManagers |
Description: Manages all the FWViewManagerBase instances
Usage: <usage>
Definition at line 38 of file FWViewManagerManager.h.
FWViewManagerManager::FWViewManagerManager | ( | FWModelChangeManager * | iCM, |
FWColorManager * | iColorM | ||
) |
Definition at line 38 of file FWViewManagerManager.cc.
: m_changeManager(iCM), m_colorManager(iColorM) { }
FWViewManagerManager::~FWViewManagerManager | ( | ) | [virtual] |
Definition at line 50 of file FWViewManagerManager.cc.
{ }
FWViewManagerManager::FWViewManagerManager | ( | const FWViewManagerManager & | ) | [private] |
void FWViewManagerManager::add | ( | boost::shared_ptr< FWViewManagerBase > | iManager | ) |
Definition at line 70 of file FWViewManagerManager.cc.
References m_changeManager, m_colorManager, m_typeToItems, and m_viewManagers.
Referenced by CmsShowMainBase::setupViewManagers().
{ m_viewManagers.push_back(iManager); iManager->setChangeManager(m_changeManager); iManager->setColorManager(m_colorManager); for(std::map<std::string,const FWEventItem*>::iterator it=m_typeToItems.begin(), itEnd=m_typeToItems.end(); it != itEnd; ++it) { iManager->newItem(it->second); } }
void FWViewManagerManager::eventBegin | ( | ) |
Definition at line 127 of file FWViewManagerManager.cc.
References i, and m_viewManagers.
{ gEve->DisableRedraw(); for ( std::vector<boost::shared_ptr<FWViewManagerBase> >::iterator i = m_viewManagers.begin(); i != m_viewManagers.end(); ++i ) (*i)->eventBegin(); }
void FWViewManagerManager::eventEnd | ( | ) |
Definition at line 136 of file FWViewManagerManager.cc.
References i, and m_viewManagers.
{ for ( std::vector<boost::shared_ptr<FWViewManagerBase> >::iterator i = m_viewManagers.begin(); i != m_viewManagers.end(); ++i ) (*i)->eventEnd(); gEve->EnableRedraw(); }
const FWViewManagerManager& FWViewManagerManager::operator= | ( | const FWViewManagerManager & | ) | [private] |
void FWViewManagerManager::registerEventItem | ( | const FWEventItem * | iItem | ) |
Definition at line 84 of file FWViewManagerManager.cc.
References fwLog, FWEventItem::goingToBeDestroyed_, fwlog::kWarning, m_typeToItems, m_viewManagers, FWEventItem::name(), and removeEventItem().
Referenced by CmsShowMainBase::setup().
{ if ( m_typeToItems.find(iItem->name()) != m_typeToItems.end() ) { fwLog(fwlog::kWarning) << "WARNING: item "<< iItem->name() <<" was already registered. Request ignored.\n"; return; } m_typeToItems[iItem->name()]=iItem; iItem->goingToBeDestroyed_.connect(boost::bind(&FWViewManagerManager::removeEventItem,this,_1)); //std::map<std::string, std::vector<std::string> >::iterator itFind = m_typeToBuilders.find(iItem->name()); for(std::vector<boost::shared_ptr<FWViewManagerBase> >::iterator itVM = m_viewManagers.begin(); itVM != m_viewManagers.end(); ++itVM) { (*itVM)->newItem(iItem); } }
void FWViewManagerManager::removeEventItem | ( | const FWEventItem * | iItem | ) |
Definition at line 102 of file FWViewManagerManager.cc.
References m_typeToItems, and FWEventItem::name().
Referenced by registerEventItem().
{ std::map<std::string, const FWEventItem*>::iterator itr = m_typeToItems.find(iItem->name()); if ( itr != m_typeToItems.end() ) m_typeToItems.erase( itr ); }
FWTypeToRepresentations FWViewManagerManager::supportedTypesAndRepresentations | ( | ) | const |
Definition at line 114 of file FWViewManagerManager.cc.
References FWTypeToRepresentations::insert(), m_viewManagers, and findQualityFiles::v.
{ FWTypeToRepresentations returnValue; for(std::vector<boost::shared_ptr<FWViewManagerBase> >::const_iterator itVM = m_viewManagers.begin(); itVM != m_viewManagers.end(); ++itVM) { FWTypeToRepresentations v = (*itVM)->supportedTypesAndRepresentations(); returnValue.insert(v); } return returnValue; }
Definition at line 64 of file FWViewManagerManager.h.
Referenced by add().
Definition at line 65 of file FWViewManagerManager.h.
Referenced by add().
std::map<std::string, const FWEventItem*> FWViewManagerManager::m_typeToItems [private] |
Definition at line 66 of file FWViewManagerManager.h.
Referenced by add(), registerEventItem(), and removeEventItem().
std::vector<boost::shared_ptr<FWViewManagerBase> > FWViewManagerManager::m_viewManagers [private] |
Definition at line 63 of file FWViewManagerManager.h.
Referenced by add(), eventBegin(), eventEnd(), registerEventItem(), and supportedTypesAndRepresentations().