CMS 3D CMS Logo

Ig3DBaseModel.h

Go to the documentation of this file.
00001 #ifndef IGUANA_GL_MODELS_IG_3D_BASE_MODEL_H
00002 # define IGUANA_GL_MODELS_IG_3D_BASE_MODEL_H
00003 
00004 //<<<<<< INCLUDES                                                       >>>>>>
00005 
00006 # include "Iguana/GLModels/interface/config.h"
00007 # include "Iguana/Framework/interface/IgModel.h"
00008 # include <classlib/utils/Callback.h>
00009 # include <vector>
00010 # include <string>
00011 
00012 //<<<<<< PUBLIC DEFINES                                                 >>>>>>
00013 //<<<<<< PUBLIC CONSTANTS                                               >>>>>>
00014 //<<<<<< PUBLIC TYPES                                                   >>>>>>
00015 
00016 class IgState;
00017 class Ig3DBaseModelEvent;
00018 class Ig3DBaseRep;
00019 class SoGroup;
00020 class SbName;
00021 class SbString;
00022 
00023 //<<<<<< PUBLIC VARIABLES                                               >>>>>>
00024 //<<<<<< PUBLIC FUNCTIONS                                               >>>>>>
00025 //<<<<<< CLASS DECLARATIONS                                             >>>>>>
00026 
00027 class IGUANA_GL_MODELS_API Ig3DBaseModel : public IgModel
00028 {
00029 public:
00030     typedef lat::Callback1<Ig3DBaseModelEvent> Listener;
00031     enum EventType { ModelChanged };
00032 
00033     Ig3DBaseModel (IgState *state);
00034     ~Ig3DBaseModel (void);
00035 
00036     virtual void        listen (EventType event, const Listener &listener);
00037     virtual void        unlisten (EventType event, const Listener &listener);
00038     virtual void        changed (void);
00039 
00040     virtual void        add (Ig3DBaseRep *rep);
00041     virtual void        remove (Ig3DBaseRep *rep, bool search = false);
00042     virtual void        change (Ig3DBaseRep *rep);
00043     virtual Ig3DBaseRep *lookup (SoGroup *node) const;
00044 
00045     virtual SoGroup *   sceneGraph (void) const;
00046     virtual Ig3DBaseRep *attachPoint (void) const;
00047 
00048     virtual IgState *   state (void) const;
00049 
00050     static SbString     encode (const std::string &name);
00051     static std::string  decode (const std::string &name);
00052     static std::string  decode (const SbName &name);
00053 
00054 private:
00055     typedef std::vector<Listener> Listeners;
00056 
00057     IgState             *m_state;
00058     Listeners           m_listeners;
00059     SoGroup             *m_sceneGraph;
00060     Ig3DBaseRep         *m_attachPoint;
00061 
00062     // undefined semantics
00063     Ig3DBaseModel (const Ig3DBaseModel &);
00064     Ig3DBaseModel &operator= (const Ig3DBaseModel &);
00065 };
00066 
00067 //<<<<<< INLINE PUBLIC FUNCTIONS                                        >>>>>>
00068 //<<<<<< INLINE MEMBER FUNCTIONS                                        >>>>>>
00069 
00070 #endif // IGUANA_GL_MODELS_IG_3D_BASE_MODEL_H

Generated on Tue Jun 9 17:38:41 2009 for CMSSW by  doxygen 1.5.4