CMS 3D CMS Logo

VisCoreContent Class Reference

Content proxy to create framework visualisation core. More...

#include <VisFramework/VisFrameworkBase/interface/VisCoreContent.h>

Inheritance diagram for VisCoreContent:

VisContent IgExtension IgStateElement

List of all members.

Public Member Functions

 VisCoreContent (IgState *state)
 Initialise the Framework event data proxy.

Private Member Functions

 IG_DECLARE_STATE_ELEMENT (VisCoreContent)
void init (void)
 Actual (in-main-thread) initialisation.


Detailed Description

Content proxy to create framework visualisation core.

Definition at line 16 of file VisCoreContent.h.


Constructor & Destructor Documentation

VisCoreContent::VisCoreContent ( IgState state  ) 

Initialise the Framework event data proxy.

Definition at line 24 of file VisCoreContent.cc.

00025     : VisContent (state, s_key, MAIN_THREAD,
00026                   lat::CreateCallback (this, &VisCoreContent::init))
00027 {}


Member Function Documentation

VisCoreContent::IG_DECLARE_STATE_ELEMENT ( VisCoreContent   )  [private]

void VisCoreContent::init ( void   )  [private]

Actual (in-main-thread) initialisation.

Instantiates the FW EDM main program.

Definition at line 32 of file VisCoreContent.cc.

References ASSERT, DBSPlugin::get(), LFfwvis, LOG, VisContent::state(), and GsfMatrixTools::trace().

00033 {
00034     LOG (0, trace, LFfwvis, "VisCoreContent::init()\n");
00035 
00036     // Bootstrap EDM main program.  It won't start yet, it will get
00037     // kicked by studio just before it goes into the event loop.  Qt
00038     // event loop will run in the studio once we return.
00039     //
00040     // We have two coordinated threads.  The current (= main) thread
00041     // runs the studio and the Qt event loop.  #VisMainProgram runs
00042     // the EDM main processing loop (#EventProcessor), which pumps
00043     // events as quickly as it can.  We hold the event loop using
00044     // #VisQueueProcessor as long as we have interest in the event.
00045     // The stepping through the events is managed via the menus and
00046     // control panels owned by the content proxies installed in this
00047     // doc.
00048     //
00049     // The application exit is coordinated as follows.  If the Qt
00050     // application quits, we tell #VisQueueProcessor to quit, which it
00051     // does by throwing an exception understood by the framework
00052     // #EventProcessor.  If the framework event loop exits before Qt
00053     // app, it tells the Qt app to quit.  Note that both can quit
00054     // roughly at the same time and the quit of one always causes of
00055     // quit of the other, so there is some amount of (safe) overlap.
00056     
00057     ASSERT (! VisMainProgram::get (state ()));
00058     new VisMainProgram (state ());
00059 
00060     ASSERT (! VisQueueProcessor::get (state ()));
00061     new VisQueueProcessor (state ());
00062 
00063     // FIXME: Block GUI until VisQueueProcessor gets an event: create
00064     // a global Qt event filter on the qApp (QObject::installFilter()
00065     // on qApp with another QObject with it's eventFilter() looking at
00066     // them), eating away all mouse clicks, keyboard events (and
00067     // drag/drop -- what happens when drag -> drop and we eat the
00068     // mouse release?  do we event get the release?  or do we get
00069     // a real drop event, which we should eat?)
00070 
00071     // FIXME: All this requires certain amount of defensiveness -- we
00072     // don't want to be left with the filter if the Framework thread fails
00073     // to start as expected.
00074 
00075     LOG (0, trace, LFfwvis, "VisCoreContent::init() done\n");
00076 }


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