The Fib multimedia system
Fib is a system for storing multimedia data (like images or films).
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
cUnderobject.h
Go to the documentation of this file.
1 /**
2  * @class cUnderobject
3  * file name: cUnderobject.h
4  * @author Betti Oesterholz
5  * @date 08.12.2010
6  * @mail webmaster@BioKom.info
7  *
8  * System: C++
9  *
10  * This class contains the information to create the underobject
11  * structur of a fib -object.
12  *
13  * Copyright (C) @c LGPL3 2010 Betti Oesterholz
14  *
15  * This program is free software: you can redistribute it and/or modify
16  * it under the terms of the GNU Lesser General Public License (LGPL) as
17  * published by the Free Software Foundation, either version 3 of the
18  * License, or any later version.
19  *
20  * This program is distributed in the hope that it will be useful,
21  * but WITHOUT ANY WARRANTY; without even the implied warranty of
22  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
23  * GNU Lesser General Public License for more details.
24  *
25  * You should have received a copy of the GNU Lesser General Public License
26  * along with this program. If not, see <http://www.gnu.org/licenses/>.
27  *
28  *
29  * This class contains the information to create the underobject
30  * structur of a fib -object.
31  * @param tPoint class with the point data of the underobjects,
32  * it needs to have an isNeeded() method, if every of its points and
33  * underobjects aren't needed the underobjects isn't needed
34  *
35  */
36 /*
37 History:
38 08.12.2010 Oesterholz created
39 */
40 
41 
42 #ifndef ___N_NEEDED_UNDEROBJECTS_C_UNDEROBJECT_H__
43 #define ___N_NEEDED_UNDEROBJECTS_C_UNDEROBJECT_H__
44 
45 
46 #include "version.h"
47 #include "fibDatatyps.h"
48 
49 #include <set>
50 #include <list>
51 #include <map>
52 
53 
54 using namespace std;
55 
56 
57 namespace fib{
58 namespace algorithms{
59 namespace nEvalueFibObject{
60 namespace nNeededUnderobjects{
61 
62 
63 template <class tPoint>
65 public:
66 
67  /**
68  * The number of this underobject.
69  */
71 
72  /**
73  * A map with the underobjects which are directly below this
74  * underobject.
75  * The map key is the underobject number. (@see uiUnderobjectNumber)
76  */
77  map< unsignedIntFib, cUnderobject * > mapSubUnderobjects;
78 
79  /**
80  * A set with the @see cPositionUnderObjectsData objects, which are
81  * directly below this underobject.
82  */
83  set< tPoint * > setSubPoints;
84 
85  /**
86  * If true this underobject is overwritten, else not.
87  */
89 
90 
91  /**
92  * The constructor for the underobject.
93  */
94  cUnderobject( unsignedIntFib uiInUnderobjectNumber = 0 );
95 
96  /**
97  * destructor
98  * The destructor will remove and delete all underobjects
99  */
100  ~cUnderobject();
101 
102  /**
103  * This method adds the given pointdata to this underobjecttree.
104  * If the point is part of underobject not jet in the underobjecttree,
105  * the needed underobjects and ther structur will be created.
106  *
107  * @param pointData the pointdata to add to the
108  * underobjecttree;
109  * Beware: the liUnderObjects will be emptied.
110  * @return true if the adding was successfull, else false
111  */
112  bool addPoint( tPoint & pointData );
113  /**
114  * This method will set the @see bOverwritten flag for all
115  * underobjects in this tree, which are overwritten.
116  * Attention: tPoint.isNeeded() is used in ths method.
117  * (For cEvalueUnderObjects you have to call
118  * cEvalueUnderObjects::markOverwrittenFibElements() for the data
119  * first befor you call this method.)
120  *
121  * @return true if this underobject is overwritten, else false
122  */
123  bool evalueOverwritten();
124 
125  /**
126  * This method will return all underobjects of this underobject tree,
127  * which are overwritten but are not contained in an overwritten
128  * underobject.
129  * Attention: You have to call @see evalueOverwritten() first befor
130  * you call this method.
131  *
132  * @return the list with all overwritten underobjects to remove.
133  */
134  list<unsignedIntFib> getHighestOverwritten();
135 
136 };//end class cUnderobject
137 
138 
139 
140 };//end namespace nNeededUnderobjects
141 };//end namespace nEvalueFibObject
142 };//end namespace algorithms
143 };//end namespace fib
144 
145 
146 //include template implementation
147 #include "../src/cUnderobject.cpp"
148 
149 
150 #endif //___N_NEEDED_UNDEROBJECTS_C_UNDEROBJECT_H__