CMS 3D CMS Logo

IgDocumentDataManager Class Reference

#include <Iguana/Studio/interface/IgDocumentDataManager.h>

Inheritance diagram for IgDocumentDataManager:

IgStateElement

List of all members.

Public Types

typedef std::map< std::string,
IgState * > 
DocDataMap

Public Member Functions

 IgDocumentDataManager (IgState *m_state)
IgStatelookup (IgState *state=0, std::string root="")
std::vector< std::string > roots (void)
IgStatestate (void)
 ~IgDocumentDataManager (void)

Private Member Functions

 IG_DECLARE_STATE_ELEMENT (IgDocumentDataManager)

Private Attributes

DocDataMap m_docData
IgStatem_state


Detailed Description

Definition at line 19 of file IgDocumentDataManager.h.


Member Typedef Documentation

typedef std::map<std::string, IgState*> IgDocumentDataManager::DocDataMap

Definition at line 30 of file IgDocumentDataManager.h.


Constructor & Destructor Documentation

IgDocumentDataManager::IgDocumentDataManager ( IgState m_state  ) 

Definition at line 20 of file IgDocumentDataManager.cc.

References ASSERT, m_state, and IgState::put().

00021     : m_state (state)
00022 { ASSERT (m_state); m_state->put (s_key, this); }

IgDocumentDataManager::~IgDocumentDataManager ( void   ) 

Definition at line 24 of file IgDocumentDataManager.cc.

References IgState::detach(), and m_state.

00025 { m_state->detach (s_key); }


Member Function Documentation

IgDocumentDataManager::IG_DECLARE_STATE_ELEMENT ( IgDocumentDataManager   )  [private]

IgState * IgDocumentDataManager::lookup ( IgState state = 0,
std::string  root = "" 
)

Definition at line 44 of file IgDocumentDataManager.cc.

References DBSPlugin::get(), IgDocumentDataRoot::getCurrentRoot(), i, if(), and m_docData.

Referenced by Ig2DWindow::Ig2DWindow(), IgIVView::IgIVView(), IgLegoWindow::IgLegoWindow(), IgRPhiWindow::IgRPhiWindow(), IgRZWindow::IgRZWindow(), and IgSpareWindow::IgSpareWindow().

00045 {
00046     if (root.size () == 0)
00047       root = IgDocumentDataRoot::getCurrentRoot ();
00048       
00049     DocDataMap::iterator i = m_docData .find (root);
00050     
00051     if (i != m_docData.end ())
00052        return i->second;
00053     else if (state)
00054     {
00055         m_docData [root] = state;
00056         IgDocumentData::get (state)->root (root, true);
00057     }
00058     return state;
00059 }

std::vector< std::string > IgDocumentDataManager::roots ( void   ) 

Definition at line 32 of file IgDocumentDataManager.cc.

References i, m_docData, and names.

00033 {
00034     std::vector<std::string> names;
00035             
00036     for (DocDataMap::iterator i = m_docData.begin ();
00037          i != m_docData.end (); i++)
00038         names.push_back (i->first);
00039             
00040     return names;
00041 }

IgState * IgDocumentDataManager::state ( void   ) 

Definition at line 28 of file IgDocumentDataManager.cc.

References m_state.

00029 { return m_state; }


Member Data Documentation

DocDataMap IgDocumentDataManager::m_docData [private]

Definition at line 39 of file IgDocumentDataManager.h.

Referenced by lookup(), and roots().

IgState* IgDocumentDataManager::m_state [private]

Definition at line 38 of file IgDocumentDataManager.h.

Referenced by IgDocumentDataManager(), state(), and ~IgDocumentDataManager().


The documentation for this class was generated from the following files:
Generated on Tue Jun 9 18:25:10 2009 for CMSSW by  doxygen 1.5.4