OpenWalnut  1.5.0dev
histogramView/WToolkit.cpp
1 //---------------------------------------------------------------------------
2 //
3 // Project: OpenWalnut ( http://www.openwalnut.org )
4 //
5 // Copyright 2009 OpenWalnut Community, BSV@Uni-Leipzig and CNCF@MPI-CBS
6 // For more information see http://www.openwalnut.org/copying
7 //
8 // This file is part of OpenWalnut.
9 //
10 // OpenWalnut is free software: you can redistribute it and/or modify
11 // it under the terms of the GNU Lesser General Public License as published by
12 // the Free Software Foundation, either version 3 of the License, or
13 // (at your option) any later version.
14 //
15 // OpenWalnut is distributed in the hope that it will be useful,
16 // but WITHOUT ANY WARRANTY; without even the implied warranty of
17 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18 // GNU Lesser General Public License for more details.
19 //
20 // You should have received a copy of the GNU Lesser General Public License
21 // along with OpenWalnut. If not, see <http://www.gnu.org/licenses/>.
22 //
23 //---------------------------------------------------------------------------
24 
25 // This file's purpose is to provide a list of modules and additional extensions as entry point for OpenWalnut's module loader.
26 // Both functAdd your modules here. If you miss this step, OpenWalnut will not be able to load your modules/extensions.
27 
28 #include <memory>
29 
30 #include <core/kernel/WModule.h>
31 
32 #include "WMHistogramView.h"
33 #include "WMMultiHistogramView.h"
34 
35 /**
36  * This function is called by OpenWalnut, when loading your library to learn about the modules you provide. The function is called with a given
37  * list reference, where you add all of your modules. Modules which are not registered this way, cannot be used in OpenWalnut. As this is called
38  * before loading any project file or running any module, it is ensured that you can rely on the modules provided here in your project files and
39  * other modules.
40  *
41  * \note this function is optional. You can remove it if you do not need it.
42  *
43  * \param m the list of modules. Add you module instances into this list.
44  */
45 extern "C" void WLoadModule( WModuleList& m ) // NOLINT
46 {
47  m.push_back( std::shared_ptr< WModule >( new WMHistogramView ) );
48  m.push_back( std::shared_ptr< WModule >( new WMMultiHistogramView ) );
49 }
50 
51 /**
52  * This function is called by OpenWalnut, when loading your module to allow registration of additional classes and implementations that are not
53  * WModule classes. At this point, OW is completely initialized, thus allowing you to register nearly everything to the sub-systems supporting
54  * this. A typical example is the postprocessing meachnism in OpenWalnut. It allows you to register your own postprocessors easily. As this
55  * function is called on start-up, before loading project files, you can rely on additional functionality in your project files and modules.
56  *
57  * \note this function is optional. You can remove it if you do not need it.
58  *
59  * \param localPath this is the path to the toolkit. Our build system ensures, that your resources and shaders get placed there.
60  */
61 extern "C" void WRegisterArbitrary( const boost::filesystem::path& /*localPath*/ )
62 {
63  // Example for registering your own postprocessor:
64  // WGEPostprocessor::addPostprocessor( WGEPostprocessor::SPtr( new MyStylishPostprocessing( localPath ) ) );
65  // wlog::debug( "TemplateToolbox - Arbitrary Extension" ) << "My resource path is: " << localPath.string();
66 }
67 
A module that draws a histogram.
A module that draws a histogram of one or mode scalar datasets in a custom widget.