CMS 3D CMS Logo

/data/refman/pasoursint/CMSSW_5_3_0/src/Fireworks/Core/interface/FWViewManagerBase.h

Go to the documentation of this file.
00001 #ifndef Fireworks_Core_FWViewManagerBase_h
00002 #define Fireworks_Core_FWViewManagerBase_h
00003 // -*- C++ -*-
00004 //
00005 // Package:     Core
00006 // Class  :     FWViewManagerBase
00007 //
00016 //
00017 // Original Author:
00018 //         Created:  Sat Jan  5 10:29:00 EST 2008
00019 // $Id: FWViewManagerBase.h,v 1.22 2011/07/08 04:39:59 amraktad Exp $
00020 //
00021 
00022 // system include files
00023 #include <string>
00024 #include <vector>
00025 #include <set>
00026 #include <map>
00027 
00028 // user include files
00029 
00030 //Needed for gccxml
00031 #include "Fireworks/Core/interface/FWTypeToRepresentations.h"
00032 
00033 // forward declarations
00034 class FWEventItem;
00035 class TClass;
00036 class FWGeometry;
00037 class FWModelId;
00038 class FWModelChangeManager;
00039 class FWColorManager;
00040 class FWTypeToRepresentations;
00041 
00042 namespace fireworks
00043 {
00044 class Context;
00045 }
00046 
00047 class FWViewManagerBase
00048 {
00049 
00050 public:
00051    virtual ~FWViewManagerBase();
00052 
00053    // ---------- const member functions ---------------------
00054    virtual FWTypeToRepresentations supportedTypesAndRepresentations() const = 0;
00055    // ---------- static member functions --------------------
00056 
00057    // ---------- member functions ---------------------------
00058    virtual void newItem(const FWEventItem*) = 0;
00059 
00060    virtual void setContext(const fireworks::Context* x) { m_context = x; }
00061    
00062    void setChangeManager(FWModelChangeManager* iCM);
00063    void setColorManager(FWColorManager* iCM);
00064 
00065 
00066    void modelChangesComingSlot();
00067    void modelChangesDoneSlot();
00068    void colorsChangedSlot();
00069    virtual void eventBegin(){
00070    };
00071    virtual void eventEnd(){
00072    };
00073 
00074    // ---------- const member functions ---------------------
00075 
00076    const fireworks::Context& context() const { return *m_context; }
00077 
00078 protected:
00079    FWViewManagerBase();
00080 
00085    void* createInstanceOf(const TClass* iBaseClass,
00086                           const char* iNameOfClass);
00087 
00089    virtual void modelChangesComing() = 0;
00090    virtual void modelChangesDone() = 0;
00091    virtual void colorsChanged() = 0;
00092 
00093    FWModelChangeManager& changeManager() const;
00094    FWColorManager& colorManager() const;
00095 
00096 private:
00097    FWViewManagerBase(const FWViewManagerBase&);    // stop default
00098 
00099    const FWViewManagerBase& operator=(const FWViewManagerBase&);    // stop default
00100 
00101    // ---------- member data --------------------------------
00102    const fireworks::Context*   m_context;
00103 
00104    FWModelChangeManager* m_changeManager;
00105    FWColorManager*       m_colorManager;
00106 };
00107 
00108 
00109 #endif