31 #include <boost/shared_ptr.hpp>
33 #include "../common/WTimer.h"
34 #include "../scripting/WScriptEngine.h"
35 #include "../graphicsEngine/WGraphicsEngine.h"
37 #include "WBatchLoader.h"
80 KERNEL_STARTUPCOMPLETE
93 static WKernel*
instance( boost::shared_ptr< WGraphicsEngine > ge, boost::shared_ptr< WUI > ui );
170 boost::shared_ptr< WModule >
applyModule( boost::shared_ptr< WModule > applyOn, boost::shared_ptr< WModule > prototype );
184 boost::shared_ptr< WUI >
getUI()
const;
223 WKernel( boost::shared_ptr< WGraphicsEngine > ge, boost::shared_ptr< WUI > ui );
boost::shared_ptr< WScriptEngine > getScriptEngine()
Get the script engine of this kernel.
boost::shared_ptr< WSelectionManager > m_selectionManager
pointer to a selection manager
boost::shared_ptr< WModuleContainer > getRootContainer() const
Returns the root module container.
Class able to create a new copy of an arbitrary module.
WTimer::ConstSPtr getTimer() const
Returns the system timer.
static WKernel * getRunningKernel()
Returns pointer to the currently running kernel.
virtual void threadMain()
Function that has to be overwritten for execution.
boost::signals2::signal< void(void) > t_KernelGenericSignalType
Generic signal type used in the most signals.
This class prescribes the interface to the UI.
boost::shared_ptr< WSelectionManager > getSelectionManager()
get for selection manager
boost::shared_ptr< WScriptEngine > m_scriptEngine
The script engine to use.
WKernel(boost::shared_ptr< WGraphicsEngine > ge, boost::shared_ptr< WUI > ui)
Constructor is protected because this class is a singleton.
OpenWalnut kernel, managing modules and interaction between UI, GE and DataHandler.
Class representing a single module of OpenWalnut.
boost::shared_ptr< WUI > getUI() const
Getter for the associated UI.
boost::shared_ptr< WGraphicsEngine > m_graphicsEngine
Pointer to an initialized graphics engine.
boost::shared_ptr< WROIManager > m_roiManager
Pointer to a roi manager.
static WKernel * instance(boost::shared_ptr< WGraphicsEngine > ge, boost::shared_ptr< WUI > ui)
Returns pointer to the running kernel or a new if no kernel was there.
WConditionOneShot m_startupCompleted
Notified when the startup, including GE and UI has been completed.
Implements a WCondition, but can be fired only ONCE.
boost::shared_ptr< WTimer > SPtr
Convenience typedef for a shared_ptr.
void finalize()
Stops execution of the modules in the root container.
Base class for all classes needing to be executed in a separate thread.
void loadModules()
Loads all the modules it can find.
const WBoolFlag & isFinishRequested() const
Determines whether all threads should finish.
boost::shared_ptr< WROIManager > getRoiManager()
get for roi manager
WBatchLoader::SPtr loadDataSetsSynchronously(std::vector< std::string > filenames, bool suppressColormaps=false)
Loads the specified files synchronously.
boost::shared_ptr< WModule > applyModule(boost::shared_ptr< WModule > applyOn, boost::shared_ptr< WModule > prototype)
Function combines to modules.
boost::shared_ptr< WBatchLoader > SPtr
Shared ptr abbreviation.
Class to store and manage different ROI's for fiber selection.
manages the several selection tools
boost::shared_ptr< WModuleFactory > m_moduleFactory
The module factory to use.
static WKernel * m_kernel
Pointer to the unique instance of this singleton class.
boost::signals2::connection subscribeSignal(KERNEL_SIGNAL signal, t_KernelGenericSignalHandlerType notifier)
Subscribe to several signals.
boost::function< void(void) > t_KernelGenericSignalHandlerType
Signal for generic events.
WTimer::SPtr m_timer
The ow system timer.
boost::shared_ptr< WUI > m_ui
The UI.
boost::shared_ptr< WGraphicsEngine > getGraphicsEngine() const
Returns pointer to currently running instance of graphics engine.
Class able to contain other modules.
boost::shared_ptr< WModuleContainer > m_moduleContainer
The container containing the modules.
WBatchLoader::SPtr loadDataSets(std::vector< std::string > filenames, bool suppressColormaps=false)
Load specified datasets.
boost::shared_ptr< const WTimer > ConstSPtr
Convenience typedef for a const shared_ptr.
void init()
Initializes the graphics engine, data handler and so on.
virtual ~WKernel()
Destructor.
KERNEL_SIGNAL
Enum of all possible signals WKernel instances can emit.