OpenWalnut  1.5.0dev
WEventIDLimitationPropertyHandler.h
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 #ifndef WEVENTIDLIMITATIONPROPERTYHANDLER_H
26 #define WEVENTIDLIMITATIONPROPERTYHANDLER_H
27 
28 #include <memory>
29 
30 #include "../WProtonData.h"
31 #include "../WSingleSelectorName.h"
32 
33 
34 /**
35  * Creates, updates and handles the EventID properties.
36  */
38 {
39 public:
40  /**
41  * shared_ptr that points to itself
42  */
43  typedef std::shared_ptr< WEventIDLimitationPropertyHandler > SPtr;
44 
45  /**
46  * Function variables for updating the data
47  */
48  typedef boost::function< void( ) > CallbackPtr;
49 
50  /**
51  * constructor
52  *
53  * \param protonData Pointer to the content and header of the CSV
54  * \param properties A property variable that is generated by the WModul
55  * \param dataUpdate A function variable that reinitializes the WDataSets
56  */
58  WPropertyGroup::SPtr properties,
60 
61  /**
62  * creates the group property and the subproperty
63  */
64  void createProperties();
65 
66  /**
67  * update current group property and subproperty
68  */
69  void updateProperty();
70 
71  /**
72  * Getter
73  *
74  * \return WPropInt of the MinCap
75  */
76  WPropInt getMinCap();
77 
78  /**
79  * Getter
80  *
81  * \return WPropInt of the MaxCap
82  */
83  WPropInt getMaxCap();
84 
85 private:
86  /**
87  * Pointer to the content and header of the CSV
88  */
90 
91  /**
92  * A property variable that is generated by the WModul
93  */
95 
96  /**
97  * A function variable that reinitializes the WDataSets
98  */
100 
101  /**
102  * Set lower border of range of eventID selection.
103  */
104  WPropInt m_minCap;
105 
106  /**
107  * Set upper border of range of eventID selection.
108  */
109  WPropInt m_maxCap;
110 
111  /**
112  * Apply the current event ID selection
113  */
114  WPropTrigger m_applySelection;
115 
116  /**
117  * Update your mesh when changing properties.
118  */
119  void updateMesh( );
120 
121  /**
122  * Determines smalles und biggest eventID.
123  */
124  void determineMinMaxEventID();
125 };
126 #endif // WEVENTIDLIMITATIONPROPERTYHANDLER_H
Creates, updates and handles the EventID properties.
void updateMesh()
Update your mesh when changing properties.
void determineMinMaxEventID()
Determines smalles und biggest eventID.
void createProperties()
creates the group property and the subproperty
WProtonData::SPtr m_protonData
Pointer to the content and header of the CSV.
WEventIDLimitationPropertyHandler(WProtonData::SPtr protonData, WPropertyGroup::SPtr properties, WEventIDLimitationPropertyHandler::CallbackPtr dataUpdate)
constructor
WEventIDLimitationPropertyHandler::CallbackPtr m_dataUpdate
A function variable that reinitializes the WDataSets.
void updateProperty()
update current group property and subproperty
std::shared_ptr< WEventIDLimitationPropertyHandler > SPtr
shared_ptr that points to itself
WPropertyGroup::SPtr m_properties
A property variable that is generated by the WModul.
boost::function< void() > CallbackPtr
Function variables for updating the data.
WPropInt m_maxCap
Set upper border of range of eventID selection.
WPropTrigger m_applySelection
Apply the current event ID selection.
WPropInt m_minCap
Set lower border of range of eventID selection.
std::shared_ptr< WPropertyGroup > SPtr
shared pointer to object of this type
std::shared_ptr< WProtonData > SPtr
shared_ptr that points to itself
Definition: WProtonData.h:52