CMS 3D CMS Logo

Public Member Functions | Protected Member Functions | Private Member Functions | Private Attributes

FWViewManagerBase Class Reference

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

Inheritance diagram for FWViewManagerBase:
FWEveViewManager FWGeometryTableViewManager FWTableViewManager FWTriggerTableViewManager

List of all members.

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.

{
}
FWViewManagerBase::FWViewManagerBase ( ) [protected]

Definition at line 38 of file FWViewManagerBase.cc.

FWViewManagerBase::FWViewManagerBase ( const FWViewManagerBase ) [private]

Member Function Documentation

FWModelChangeManager & FWViewManagerBase::changeManager ( ) const [protected]

Definition at line 144 of file FWViewManagerBase.cc.

References m_changeManager.

{
   assert(m_changeManager != 0);
   return *m_changeManager;
}
FWColorManager & FWViewManagerBase::colorManager ( ) const [protected]
virtual void FWViewManagerBase::colorsChanged ( ) [protected, pure virtual]
void FWViewManagerBase::colorsChangedSlot ( )

Definition at line 114 of file FWViewManagerBase.cc.

References colorsChanged().

{
   this->colorsChanged();
}
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, benchmark_cfg::cerr, and error.

{
   //create proxy builders
   Int_t error;
   assert(iBaseClass !=0);

   //does the class already exist?
   TClass *c = TClass::GetClass( iNameOfClass );
   if(0==c) {
      //try to load a macro of that name

      //How can I tell if this succeeds or failes? error and value are always 0!
      // I could not make the non-compiled mechanism to work without seg-faults
      // Int_t value =
      gROOT->LoadMacro( (std::string(iNameOfClass)+".C+").c_str(), &error );
      c = TClass::GetClass( iNameOfClass );
      if(0==c ) {
         std::cerr <<"failed to find "<< iNameOfClass << std::endl;
         return 0;
      }
   }
   void* inst = c->New();
   void* baseClassInst = c->DynamicCast(iBaseClass,inst);
   if(0==baseClassInst) {
      std::cerr<<"conversion to "<<iBaseClass->ClassName() << " for class " << iNameOfClass << " failed"<<std::endl;
      return 0;
   }
   return baseClassInst;
}
virtual void FWViewManagerBase::eventBegin ( ) [inline, virtual]

Reimplemented in FWEveViewManager.

Definition at line 69 of file FWViewManagerBase.h.

                            {
   };
virtual void FWViewManagerBase::eventEnd ( ) [inline, virtual]

Reimplemented in FWEveViewManager, and FWTriggerTableViewManager.

Definition at line 71 of file FWViewManagerBase.h.

                          {
   };
virtual void FWViewManagerBase::modelChangesComing ( ) [protected, pure virtual]

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

Implemented in FWEveViewManager, FWGeometryTableViewManager, FWTableViewManager, and FWTriggerTableViewManager.

Referenced by modelChangesComingSlot(), and setChangeManager().

void FWViewManagerBase::modelChangesComingSlot ( )

Definition at line 102 of file FWViewManagerBase.cc.

References modelChangesComing().

{
   //forward call to the virtual function
   this->modelChangesComing();
}
virtual void FWViewManagerBase::modelChangesDone ( ) [protected, pure virtual]
void FWViewManagerBase::modelChangesDoneSlot ( )

Definition at line 108 of file FWViewManagerBase.cc.

References modelChangesDone().

{
   //forward call to the virtual function
   this->modelChangesDone();
}
virtual void FWViewManagerBase::newItem ( const FWEventItem ) [pure virtual]
const FWViewManagerBase& FWViewManagerBase::operator= ( const FWViewManagerBase ) [private]
void FWViewManagerBase::setChangeManager ( FWModelChangeManager iCM)
void FWViewManagerBase::setColorManager ( FWColorManager iCM)

Definition at line 130 of file FWViewManagerBase.cc.

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

{
   assert(0!= iCM);
   m_colorManager = iCM;
   m_colorManager->colorsHaveChanged_.connect(boost::bind(&FWViewManagerBase::colorsChanged,this));
   //make sure to pickup any changes that occurred earlier
   colorsChanged();
}
virtual void FWViewManagerBase::setContext ( const fireworks::Context x) [inline, virtual]

Reimplemented in FWEveViewManager.

Definition at line 60 of file FWViewManagerBase.h.

References m_context, and x.

{ m_context = x; }
virtual FWTypeToRepresentations FWViewManagerBase::supportedTypesAndRepresentations ( ) const [pure virtual]

Member Data Documentation

Definition at line 104 of file FWViewManagerBase.h.

Referenced by changeManager(), and setChangeManager().

Definition at line 105 of file FWViewManagerBase.h.

Referenced by colorManager(), and setColorManager().

Definition at line 102 of file FWViewManagerBase.h.

Referenced by context(), and setContext().