CMS 3D CMS Logo

Ig3DSystem Class Reference

#include <Iguana/GLBrowsers/interface/Ig3DSystem.h>

List of all members.

Static Public Member Functions

static QWidget * init (IgState *state, int argc, char **argv, const char *appname, const char *classname)
static void init (IgState *state, QWidget *mainWindow)
static void initAction (lat::Callback action)

Static Private Member Functions

static void doinit (IgState *state)

Static Private Attributes

static std::list< lat::Callbacks_actions
static bool s_initialised = false


Detailed Description

Definition at line 21 of file Ig3DSystem.h.


Member Function Documentation

void Ig3DSystem::doinit ( IgState state  )  [static, private]

Definition at line 25 of file Ig3DSystem.cc.

References ASSERT, lat::CreateCallback(), DBSPlugin::get(), and s_actions.

Referenced by init().

00026 {
00027     // Override the event loop with SoQt's special filters
00028     ASSERT (IgQtAppLoopService::get (state));
00029     IgQtAppLoopService::get(state)->override(lat::CreateCallback(&SoQt::mainLoop));
00030 
00031     // Run all initialisers already registered
00032     std::for_each (s_actions.begin (), s_actions.end (),
00033                    std::mem_fun_ref (&lat::Callback::operator ()));
00034 
00035     // Autoload OpenInventor nodekit extensions.  Their
00036     // initialisation is global so put them into the global
00037     // (plug-in loader) state.
00038     ASSERT (IgPluginLoader::get (state));
00039     IgPluginLoader::get (state)->load ("Services/Inventor/NodeKits/",true);
00040 }

QWidget * Ig3DSystem::init ( IgState state,
int  argc,
char **  argv,
const char *  appname,
const char *  classname 
) [static]

Definition at line 60 of file Ig3DSystem.cc.

References ASSERT, doinit(), init, s_initialised, and w.

00062 {
00063     // We need to initialise the 3D subsystem properly before using
00064     // it.  This function is that magic initialiser hook.  It is safe
00065     // to invoke this many times, only the first time around counts.
00066     ASSERT (! s_initialised);
00067 
00068     s_initialised = true;
00069 
00070     // Initialise SoQt
00071     QWidget *w = SoQt::init (argc, argv, appname, classname);
00072     doinit (state);
00073     return w;
00074 }

void Ig3DSystem::init ( IgState state,
QWidget *  mainWindow 
) [static]

Definition at line 43 of file Ig3DSystem.cc.

References doinit(), init, and s_initialised.

Referenced by autoinit(), Ig3DBaseBrowser::initialise(), and IgOIVExtension::setup().

00044 {
00045     // We need to initialise the 3D subsystem properly before using
00046     // it.  This function is that magic initialiser hook.  It is safe
00047     // to invoke this many times, only the first time around counts.
00048 
00049     if (s_initialised)
00050         return;
00051 
00052     s_initialised = true;
00053 
00054     // Initialise SoQt
00055     SoQt::init (mainWindow);
00056     doinit (state);
00057 }

void Ig3DSystem::initAction ( lat::Callback  action  )  [static]

Definition at line 77 of file Ig3DSystem.cc.

References cmsRelvalreport::action, s_actions, and s_initialised.

Referenced by Ig3DInitialiser::Ig3DInitialiser(), and initNodes().

00078 {
00079     if (! s_initialised)
00080         s_actions.push_back (action);
00081     else
00082         action ();
00083 }


Member Data Documentation

std::list< lat::Callback > Ig3DSystem::s_actions [static, private]

Definition at line 39 of file Ig3DSystem.h.

Referenced by doinit(), and initAction().

bool Ig3DSystem::s_initialised = false [static, private]

Definition at line 38 of file Ig3DSystem.h.

Referenced by init(), and initAction().


The documentation for this class was generated from the following files:
Generated on Tue Jun 9 18:25:00 2009 for CMSSW by  doxygen 1.5.4