Seg3D  2.4
Seg3D is a free volume segmentation and processing tool developed by the NIH Center for Integrative Biomedical Computing at the University of Utah Scientific Computing and Imaging (SCI) Institute.
Public Member Functions | Protected Member Functions | Friends | List of all members
Core::EventHandler Class Reference
Inheritance diagram for Core::EventHandler:
Core::Application Core::Interface Core::LargeVolumeCachePrivate Core::PythonInterpreter Core::RendererBase Core::RenderResources Seg3D::Renderer

Public Member Functions

bool is_eventhandler_thread () const
 Is this the event handler thread.
 
void post_event (boost::function< void() > function)
 
void post_and_wait_event (boost::function< void() > function)
 
bool process_events ()
 Process the events that are in the event handler queue.
 
bool wait_and_process_events ()
 Wait for events to come in and process the events.
 
bool start_eventhandler ()
 
bool eventhandler_started ()
 Check whether the eventhandler is running.
 
virtual void run_eventhandler ()
 The main functions that processes all the incoming events.
 
void install_eventhandler_context (EventHandlerContextHandle &context)
 

Protected Member Functions

virtual void initialize_eventhandler ()
 
void terminate_eventhandler ()
 

Friends

void TerminateEventHandlerThread (EventHandlerHandle handle)
 

Member Function Documentation

void Core::EventHandler::initialize_eventhandler ( )
protectedvirtual

This function will be called on the event handler thread before it will start processing events

void Core::EventHandler::install_eventhandler_context ( EventHandlerContextHandle &  context)

Setup the application context. The application context abstracts the interface piece of the GUI layer that is needed for communication with the application thread.

void Core::EventHandler::post_and_wait_event ( boost::function< void() >  function)

This function is similar to post_event, but waits until the function has finished execution. Note in case the function is called from the application thread itself it will immediately execute and not post any events on the event stack in order for the application not to dead lock

void Core::EventHandler::post_event ( boost::function< void() >  function)

Post an event on the application event stack. If the program uses a GUI these events are mixed in with the main event handler and are execute at the same time.

bool Core::EventHandler::start_eventhandler ( )

Start the eventhandler. This will launch the eventhandler thread and runs the run_eventhandler() function.

void Core::EventHandler::terminate_eventhandler ( )
protected

Terminate processing events and kill the thread that processes them. This function is private and can only be called from TerminateEventHandler(). This function launches a separate thread that joins with the eventhandler thread, to allow for the remainder events to be processed before the object is destructed.


The documentation for this class was generated from the following files: