FotoSHOCK
 All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Pages
UpdateInfo.hpp
1 /*
2  * Copyright 2011, 2012 Lukas Jirkovsky
3  *
4  * This file is part of FotoSHOCKcore.
5  *
6  * FotoSHOCKcore is free software: you can redistribute it and/or modify it
7  * under the terms of the GNU Lesser General Public License as published by
8  * the Free Software Foundation, version 3 of the License.
9  *
10  * FotoSHOCKcore is distributed in the hope that it will be useful,
11  * but WITHOUT ANY WARRANTY; without even the implied warranty of
12  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13  * GNU Lesser General Public License for more details.
14  *
15  * You should have received a copy of the GNU Lesser General Public License
16  * along with FotoSHOCKcore. If not, see <http://www.gnu.org/licenses/>.
17  */
18 
19 #ifndef UPDATEINFO_H
20 #define UPDATEINFO_H
21 
22 #include "ROIinfo.hpp"
23 
24 #include <boost/shared_ptr.hpp>
25 #include <boost/weak_ptr.hpp>
26 #include <vector>
27 
28 namespace FotoSHOCKcore{
29 
30 class GraphNode;
31 class GraphManager;
32 class Graph_private;
33 class ImageOperation;
34 
36 
42 class UpdateInfo {
43  public:
44  friend class GraphNode;
45  friend class GraphManager;
46  friend class Graph_private;
47  friend class ImageOperation;
48 
50 
53  UpdateInfo();
55 
64  UpdateInfo(unsigned int x, unsigned int y, unsigned int sizeX, unsigned int sizeY, const int mipmapLevel);
65 
67 
71  boost::shared_ptr<ROIinfo> ROI;
72 
74 
85  void update();
86  private:
88 
92  boost::weak_ptr<UpdateInfo> m_child;
94 
98  std::vector<boost::shared_ptr<UpdateInfo> > m_parents;
99 
101  GraphNode* m_parentNode;
102 
103  void update_impl(UpdateInfo& info);
104 };
105 
106 }
107 
108 #endif