#include <VisRoot/VisRootModel/interface/VisRootModel.h>
Public Types | |
enum | { ModelChanged } |
typedef IgDispatcher < VisRootModelEvent > | Dispatcher |
Public Member Functions | |
void | canvas (TCanvas *canvas) |
TCanvas * | canvas (void) |
void | changed (void) |
Dispatcher * | dispatcher (unsigned int eventType) |
TVirtualPad * | getCurrentVecElement () |
unsigned int | getNextPad (void) |
std::vector< TVirtualPad * > | getVec () |
void | pad (TVirtualPad *pad) |
TVirtualPad * | pad (void) |
void | resetVec () |
void | setCanvasSubdivisions (unsigned int x, unsigned int y) |
void | setPad (TVirtualPad *p, unsigned int n) |
IgState * | state (void) |
void | trackRep (VisRootRep *rep) |
void | untrackRep (VisRootRep *rep) |
VisRootModel (IgState *state) | |
~VisRootModel (void) | |
Private Attributes | |
TCanvas * | m_canvas |
unsigned int | m_currentPad |
unsigned int | m_maxPads |
Dispatcher * | m_modelChangedDispatcher |
TVirtualPad * | m_pad |
std::set< VisRootRep * > | m_repSet |
IgState * | m_state |
std::vector< TVirtualPad * > | m_vec |
Definition at line 25 of file VisRootModel.h.
Definition at line 28 of file VisRootModel.h.
anonymous enum |
VisRootModel::VisRootModel | ( | IgState * | state | ) |
Definition at line 20 of file VisRootModel.cc.
References m_currentPad.
00021 : m_state (state), 00022 m_canvas (0), 00023 m_modelChangedDispatcher (new Dispatcher) 00024 { 00025 m_currentPad = 0; 00026 00027 }
VisRootModel::~VisRootModel | ( | void | ) |
Definition at line 29 of file VisRootModel.cc.
References i, m_repSet, and untrackRep().
00030 { 00031 for (std::set<VisRootRep *>::iterator i = m_repSet.begin (); 00032 i != m_repSet.end (); 00033 i++) 00034 { 00035 untrackRep (*i); 00036 delete *i; 00037 } 00038 }
void VisRootModel::canvas | ( | TCanvas * | canvas | ) |
TCanvas * VisRootModel::canvas | ( | void | ) |
Definition at line 42 of file VisRootModel.cc.
References m_canvas.
Referenced by VisHtmlRootBrowser::getJPGBuffer(), VisHtmlRootBrowser::VisHtmlRootBrowser(), and VisRootBrowser::VisRootBrowser().
00043 { 00044 return m_canvas; 00045 }
Definition at line 79 of file VisRootModel.cc.
References IgDispatcher< Message >::broadcast(), dispatcher(), event(), and ModelChanged.
00080 { 00081 VisRootModelEvent event (this); 00082 dispatcher (ModelChanged)->broadcast (event); 00083 }
VisRootModel::Dispatcher * VisRootModel::dispatcher | ( | unsigned int | eventType | ) |
Definition at line 73 of file VisRootModel.cc.
References m_modelChangedDispatcher.
Referenced by changed(), VisHtmlRootBrowser::VisHtmlRootBrowser(), and VisRootBrowser::VisRootBrowser().
00074 { 00075 return m_modelChangedDispatcher; 00076 }
TVirtualPad * VisRootModel::getCurrentVecElement | ( | void | ) |
Definition at line 104 of file VisRootModel.cc.
References m_currentPad, m_maxPads, and m_vec.
00105 { 00106 m_currentPad %= (m_maxPads); 00107 m_currentPad++; 00108 00109 return (m_vec.at (m_currentPad-1)); 00110 }
Definition at line 113 of file VisRootModel.cc.
References m_currentPad, and m_maxPads.
00114 { 00115 m_currentPad++; 00116 m_currentPad %= (m_maxPads + 1); 00117 return m_currentPad; 00118 }
std::vector< TVirtualPad * > VisRootModel::getVec | ( | ) |
Definition at line 140 of file VisRootModel.cc.
References m_vec.
00141 { 00142 return m_vec; 00143 }
void VisRootModel::pad | ( | TVirtualPad * | pad | ) |
TVirtualPad * VisRootModel::pad | ( | void | ) |
Definition at line 54 of file VisRootModel.cc.
References m_pad.
00055 { 00056 return m_pad; 00057 }
void VisRootModel::resetVec | ( | ) |
Definition at line 127 of file VisRootModel.cc.
References m_vec.
00128 { 00129 m_vec.clear (); 00130 }
Definition at line 66 of file VisRootModel.cc.
References m_state.
00067 { 00068 return m_state; 00069 }
void VisRootModel::trackRep | ( | VisRootRep * | rep | ) |
Definition at line 121 of file VisRootModel.cc.
References m_repSet.
Referenced by VisRootRep::VisRootRep().
00122 { 00123 m_repSet.insert (rep); 00124 }
void VisRootModel::untrackRep | ( | VisRootRep * | rep | ) |
Definition at line 133 of file VisRootModel.cc.
References ASSERT, and m_repSet.
Referenced by ~VisRootModel(), and VisRootRep::~VisRootRep().
TCanvas* VisRootModel::m_canvas [private] |
unsigned int VisRootModel::m_currentPad [private] |
Definition at line 60 of file VisRootModel.h.
Referenced by getCurrentVecElement(), getNextPad(), setCanvasSubdivisions(), and VisRootModel().
unsigned int VisRootModel::m_maxPads [private] |
Definition at line 59 of file VisRootModel.h.
Referenced by getCurrentVecElement(), getNextPad(), setCanvasSubdivisions(), and setPad().
Dispatcher* VisRootModel::m_modelChangedDispatcher [private] |
TVirtualPad* VisRootModel::m_pad [private] |
std::set<VisRootRep *> VisRootModel::m_repSet [private] |
Definition at line 61 of file VisRootModel.h.
Referenced by trackRep(), untrackRep(), and ~VisRootModel().
IgState* VisRootModel::m_state [private] |
std::vector<TVirtualPad *> VisRootModel::m_vec [private] |
Definition at line 55 of file VisRootModel.h.
Referenced by getCurrentVecElement(), getVec(), resetVec(), and setPad().