CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
List of all members | Public Member Functions | Protected Member Functions | Private Member Functions | Private Attributes
FWViewManagerBase Class Referenceabstract

#include <Fireworks/Core/interface/FWViewManagerBase.h>

Inheritance diagram for FWViewManagerBase:
FWEveViewManager FWGeometryTableViewManager FWTableViewManager FWTriggerTableViewManager

Public Member Functions

void colorsChangedSlot ()
 
const fireworks::Contextcontext () const
 
virtual void eventBegin ()
 
virtual void eventEnd ()
 
void modelChangesComingSlot ()
 
void modelChangesDoneSlot ()
 
virtual void newItem (const FWEventItem *)=0
 
void setChangeManager (FWModelChangeManager *iCM)
 
void setColorManager (FWColorManager *iCM)
 
virtual void setContext (const fireworks::Context *x)
 
virtual FWTypeToRepresentations supportedTypesAndRepresentations () const =0
 
virtual ~FWViewManagerBase ()
 

Protected Member Functions

FWModelChangeManagerchangeManager () const
 
FWColorManagercolorManager () const
 
virtual void colorsChanged ()=0
 
void * createInstanceOf (const TClass *iBaseClass, const char *iNameOfClass)
 
 FWViewManagerBase ()
 
virtual void modelChangesComing ()=0
 
virtual void modelChangesDone ()=0
 

Private Member Functions

 FWViewManagerBase (const FWViewManagerBase &)
 
const FWViewManagerBaseoperator= (const FWViewManagerBase &)
 

Private Attributes

FWModelChangeManagerm_changeManager
 
FWColorManagerm_colorManager
 
const fireworks::Contextm_context
 

Detailed Description

Description: Base class for a Manger for a specific type of View

Usage: <usage>

Definition at line 47 of file FWViewManagerBase.h.

Constructor & Destructor Documentation

FWViewManagerBase::~FWViewManagerBase ( )
virtual

Definition at line 50 of file FWViewManagerBase.cc.

51 {
52 }
FWViewManagerBase::FWViewManagerBase ( )
protected

Definition at line 38 of file FWViewManagerBase.cc.

38  :
39  m_context(0),
40  m_changeManager(0),
42 {
43 }
const fireworks::Context * m_context
FWModelChangeManager * m_changeManager
FWColorManager * m_colorManager
FWViewManagerBase::FWViewManagerBase ( const FWViewManagerBase )
private

Member Function Documentation

FWModelChangeManager & FWViewManagerBase::changeManager ( ) const
protected

Definition at line 144 of file FWViewManagerBase.cc.

References m_changeManager.

145 {
146  assert(m_changeManager != 0);
147  return *m_changeManager;
148 }
FWModelChangeManager * m_changeManager
FWColorManager & FWViewManagerBase::colorManager ( ) const
protected
virtual void FWViewManagerBase::colorsChanged ( )
protectedpure virtual
void FWViewManagerBase::colorsChangedSlot ( )

Definition at line 114 of file FWViewManagerBase.cc.

References colorsChanged().

115 {
116  this->colorsChanged();
117 }
virtual void colorsChanged()=0
const fireworks::Context& FWViewManagerBase::context ( ) const
inline
void * FWViewManagerBase::createInstanceOf ( const TClass *  iBaseClass,
const char *  iNameOfClass 
)
protected

handles dynamic loading of a library or macro containing the class named iNameOfClass which inherits from iBaseClass. The returned void* will correspond to the address of the 'BaseClass'

Definition at line 70 of file FWViewManagerBase.cc.

References trackerHits::c, dtNoiseDBValidation_cfg::cerr, and error.

72 {
73  //create proxy builders
74  Int_t error;
75  assert(iBaseClass !=0);
76 
77  //does the class already exist?
78  TClass *c = TClass::GetClass( iNameOfClass );
79  if(0==c) {
80  //try to load a macro of that name
81 
82  //How can I tell if this succeeds or failes? error and value are always 0!
83  // I could not make the non-compiled mechanism to work without seg-faults
84  // Int_t value =
85  gROOT->LoadMacro( (std::string(iNameOfClass)+".C+").c_str(), &error );
86  c = TClass::GetClass( iNameOfClass );
87  if(0==c ) {
88  std::cerr <<"failed to find "<< iNameOfClass << std::endl;
89  return 0;
90  }
91  }
92  void* inst = c->New();
93  void* baseClassInst = c->DynamicCast(iBaseClass,inst);
94  if(0==baseClassInst) {
95  std::cerr<<"conversion to "<<iBaseClass->ClassName() << " for class " << iNameOfClass << " failed"<<std::endl;
96  return 0;
97  }
98  return baseClassInst;
99 }
virtual void FWViewManagerBase::eventBegin ( )
inlinevirtual

Reimplemented in FWEveViewManager.

Definition at line 69 of file FWViewManagerBase.h.

69  {
70  };
virtual void FWViewManagerBase::eventEnd ( )
inlinevirtual

Reimplemented in FWEveViewManager, and FWTriggerTableViewManager.

Definition at line 71 of file FWViewManagerBase.h.

71  {
72  };
virtual void FWViewManagerBase::modelChangesComing ( )
protectedpure virtual

called when models have changed and so the display must be updated

Implemented in FWTableViewManager, FWEveViewManager, FWGeometryTableViewManager, and FWTriggerTableViewManager.

Referenced by modelChangesComingSlot(), and setChangeManager().

void FWViewManagerBase::modelChangesComingSlot ( )

Definition at line 102 of file FWViewManagerBase.cc.

References modelChangesComing().

103 {
104  //forward call to the virtual function
105  this->modelChangesComing();
106 }
virtual void modelChangesComing()=0
virtual void FWViewManagerBase::modelChangesDone ( )
protectedpure virtual
void FWViewManagerBase::modelChangesDoneSlot ( )

Definition at line 108 of file FWViewManagerBase.cc.

References modelChangesDone().

109 {
110  //forward call to the virtual function
111  this->modelChangesDone();
112 }
virtual void modelChangesDone()=0
virtual void FWViewManagerBase::newItem ( const FWEventItem )
pure virtual
const FWViewManagerBase& FWViewManagerBase::operator= ( const FWViewManagerBase )
private
void FWViewManagerBase::setChangeManager ( FWModelChangeManager iCM)

Definition at line 121 of file FWViewManagerBase.cc.

References FWModelChangeManager::changeSignalsAreComing_, FWModelChangeManager::changeSignalsAreDone_, m_changeManager, modelChangesComing(), and modelChangesDone().

122 {
123  assert(0!=iCM);
124  m_changeManager = iCM;
127 }
virtual void modelChangesComing()=0
virtual void modelChangesDone()=0
FWModelChangeManager * m_changeManager
sigc::signal< void > changeSignalsAreDone_
sigc::signal< void > changeSignalsAreComing_
void FWViewManagerBase::setColorManager ( FWColorManager iCM)

Definition at line 130 of file FWViewManagerBase.cc.

References colorsChanged(), FWColorManager::colorsHaveChanged_, and m_colorManager.

131 {
132  assert(0!= iCM);
133  m_colorManager = iCM;
135  //make sure to pickup any changes that occurred earlier
136  colorsChanged();
137 }
virtual void colorsChanged()=0
FWColorManager * m_colorManager
sigc::signal< void > colorsHaveChanged_
virtual void FWViewManagerBase::setContext ( const fireworks::Context x)
inlinevirtual

Reimplemented in FWEveViewManager.

Definition at line 60 of file FWViewManagerBase.h.

References m_context, and vdt::x.

Referenced by FWEveViewManager::setContext().

60 { m_context = x; }
const fireworks::Context * m_context
x
Definition: VDTMath.h:216
virtual FWTypeToRepresentations FWViewManagerBase::supportedTypesAndRepresentations ( ) const
pure virtual

Member Data Documentation

FWModelChangeManager* FWViewManagerBase::m_changeManager
private

Definition at line 104 of file FWViewManagerBase.h.

Referenced by changeManager(), and setChangeManager().

FWColorManager* FWViewManagerBase::m_colorManager
private

Definition at line 105 of file FWViewManagerBase.h.

Referenced by colorManager(), and setColorManager().

const fireworks::Context* FWViewManagerBase::m_context
private

Definition at line 102 of file FWViewManagerBase.h.

Referenced by context(), and setContext().