Main Page | Modules | Namespace List | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Namespace Members | Class Members | File Members | Related Pages

NamedFactory Class Reference

#include <NamedFactory.h>

List of all members.

Public Member Functions

virtual ~NamedFactory ()
void Register (NamedProxy *proxy, std::string name)
NamedProxyGetProxy (std::string name)

Static Public Member Functions

NamedFactoryInstance (std::string name_space="")

Private Types

typedef std::map< std::string,
NamedProxy * > 
ProxyMap_t
typedef std::map< std::string,
NamedFactory * > 
FactoryMap_t

Private Member Functions

 NamedFactory ()

Private Attributes

ProxyMap_t fProxymap

Static Private Attributes

FactoryMap_t fInstances


Member Typedef Documentation

typedef std::map<std::string,NamedFactory*> NamedFactory::FactoryMap_t [private]
 

Definition at line 39 of file NamedFactory.h.

typedef std::map<std::string,NamedProxy*> NamedFactory::ProxyMap_t [private]
 

Definition at line 38 of file NamedFactory.h.


Constructor & Destructor Documentation

virtual NamedFactory::~NamedFactory  )  [inline, virtual]
 

Definition at line 30 of file NamedFactory.h.

00030 {}

NamedFactory::NamedFactory  )  [inline, private]
 

Definition at line 40 of file NamedFactory.h.

00040 {}           // singleton


Member Function Documentation

NamedProxy * NamedFactory::GetProxy std::string  name  ) 
 

Definition at line 26 of file NamedFactory.cxx.

References fProxymap.

Referenced by MultiPage::AddGfx(), EVD::AddGfx(), PageDisplay::AddPage(), EVD::BuildGfxMenu(), MultiPage::BuildMenus(), GfxTrackListMenu::HideAll(), GfxStripListMenu::HideAll(), GfxShowerListMenu::HideAll(), GfxMCVecListMenu::HideAll(), GfxDigitListMenu::HideAll(), main(), TridPageDisplay::MySpawnSinglePage(), and PageDisplay::SpawnSinglePage().

00027 {
00028     ProxyMap_t::iterator it = fProxymap.find(name);
00029     if (it == fProxymap.end()) return 0;
00030     return it->second;
00031 }

NamedFactory & NamedFactory::Instance std::string  name_space = ""  )  [static]
 

Definition at line 9 of file NamedFactory.cxx.

References fInstances.

Referenced by MultiPage::AddGfx(), EVD::AddGfx(), PageDisplay::AddPage(), EVD::BuildGfxMenu(), MultiPage::BuildMenus(), GfxTrackListMenu::HideAll(), GfxStripListMenu::HideAll(), GfxShowerListMenu::HideAll(), GfxMCVecListMenu::HideAll(), GfxDigitListMenu::HideAll(), main(), TridPageDisplay::MySpawnSinglePage(), NamedProxy::NamedProxy(), and PageDisplay::SpawnSinglePage().

00010 {
00011     FactoryMap_t::iterator mit;
00012     mit = fInstances.find(name_space);
00013     if (mit == fInstances.end()) {
00014         NamedFactory* nf = new NamedFactory;
00015         fInstances[name_space] = nf;
00016         return *nf;
00017     }
00018     return *(mit->second);
00019 }

void NamedFactory::Register NamedProxy proxy,
std::string  name
 

Definition at line 21 of file NamedFactory.cxx.

References fProxymap.

Referenced by NamedProxy::NamedProxy().

00022 {
00023     fProxymap[name] = proxy;
00024 }


Member Data Documentation

NamedFactory::FactoryMap_t NamedFactory::fInstances [static, private]
 

Definition at line 6 of file NamedFactory.cxx.

Referenced by Instance().

ProxyMap_t NamedFactory::fProxymap [private]
 

Definition at line 44 of file NamedFactory.h.

Referenced by GetProxy(), and Register().


The documentation for this class was generated from the following files:
Generated on Mon Feb 15 11:09:38 2010 for loon by  doxygen 1.3.9.1