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