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
cEvaluePositionListLimit.h
Go to the documentation of this file.
1 /**
2  * @class cEvaluePositionListLimit
3  * file name: cEvaluePositionListLimit.h
4  * @author Betti Oesterholz
5  * @date 02.09.2010
6  * @mail webmaster@BioKom.info
7  *
8  * System: C++
9  *
10  * This file contains the class for evaluing fib -objects and storing
11  * the evalued data into a list.
12  * Copyright (C) @c LGPL3 2010 Betti Oesterholz
13  *
14  * This program is free software: you can redistribute it and/or modify
15  * it under the terms of the GNU Lesser General Public License (LGPL) as
16  * published by the Free Software Foundation, either version 3 of the
17  * License, or any later version.
18  *
19  * This program is distributed in the hope that it will be useful,
20  * but WITHOUT ANY WARRANTY; without even the implied warranty of
21  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
22  * GNU Lesser General Public License for more details.
23  *
24  * You should have received a copy of the GNU Lesser General Public License
25  * along with this program. If not, see <http://www.gnu.org/licenses/>.
26  *
27  *
28  * This file contains the class for evaluing fib -objects and storing
29  * the evalued data into a list (@see liEvaluedPositionData).
30  * When the fib -object is evalued this method is called every time a
31  * pointelement is reached. The parameter for the method are the
32  * positionsvector of the point and properties of the point.
33  * This class sorts and reduces the evalued positionslist every
34  * @see ulMaximalPointsAddToList calls of the method evaluePosition().
35  * Allso no position outside the dimension bounderies will be added.
36  *
37  * This class restricts the memory and time used to evalue and store the
38  * evalued positionsdata.
39  */
40 /*
41 History:
42 02.09.2010 Oesterholz created
43 */
44 
45 #ifndef ___C_EVALUE_POSITION_LIST_MEM_LIMIT__
46 #define ___C_EVALUE_POSITION_LIST_MEM_LIMIT__
47 
48 #include "version.h"
49 
50 #include "cEvaluePositionList.h"
51 
52 #include "cVectorPosition.h"
53 #include "cVectorProperty.h"
54 #include "cDomainVectorBasis.h"
55 
56 
57 #include <list>
58 
59 
60 using std::list;
61 
62 namespace fib{
63 
65 public:
66 
67 
68  /**
69  * The number of positions, which should be added to the positionslist,
70  * befor it is sorted and reduced.
71  * If this bounderie is reached, the list with the positions and ther
72  * properties will be sorted.
73  *
74  * @see ulNewPositionsInsertedAfterLastSort
75  * @see sortPositionsData()
76  */
77  unsigned long long ulSortEverAddedPointsList;
78 
79  /**
80  * The number of points inserted after the last @see sortPositionsData()
81  * call because of @see ulSortEverAddedPointsList .
82  *
83  * @see ulSortEverAddedPointsList
84  */
86 
87 
88  /**
89  * The dimension domain for the positions.
90  * No position outside this domain will be added.
91  * If NULL no check will be executed.
92  */
94 
95  /**
96  * If true points without properties will be deleted when the
97  * positionslist is reduced, else (if false) points without properties
98  * won't be deleted.
99  */
101 
102  /**
103  * The maximum number of points in the (sorted) list of the points
104  * evalued (@see liEvaluedPositionData); if the sorted list
105  * @see liEvaluedPositionData has more than ulInMaxPointsInList
106  * point, the evalue call will return false.
107  * If ulInMaxPointsInList is 0 this option is deactivated (no check
108  * will be executed).
109  */
110  unsigned long long ulMaxPointsInList;
111 
112  /**
113  * The maximum number of calls in the @see evaluePosition() will be
114  * called befor it returns false; if the evaluePosition() was called
115  * more than ulInMaxEvalueCalls times, it will return false.
116  * If ulInMaxEvalueCalls is 0 this option is deactivated (no check
117  * will be executed). (@see ulMaxEvalueCalls)
118  *
119  * @see ulEvalueCalls
120  */
121  unsigned long long ulMaxEvalueCalls;
122 
123  /**
124  * The count how much the evaluePosition() method was called.
125  *
126  * @see ulMaxEvalueCalls
127  */
128  unsigned long long ulEvalueCalls;
129 
130 
131  /**
132  * standardconstructor
133  *
134  * @param ulInSortEverAddedPointsList The number of positions, which
135  * should be added to the positionslist, befor it is sorted and
136  * reduced. (@see ulSortEverAddedPointsList) If 0 this option is
137  * deactivated (no check will be executed).
138  * @param pInVecDomainDimension The dimension domain for the positions.
139  * No position outside this domain will be added.
140  * If NULL no check will be executed. (@see pVecDomainDimension)
141  * @param bInDeleteEmptyPoints if true points without properties will be
142  * deleted when the positionslist is reduced, else (if false) points
143  * without properties won't be deleted (@see bDeleteEmptyPoints)
144  * @param ulInMaxPointsInList the maximum number of points in the (sorted)
145  * list of the points evalued (@see liEvaluedPositionData); if the
146  * sorted list @see liEvaluedPositionData has more than ulInMaxPointsInList
147  * point, the evalue call will return false;
148  * If ulInMaxPointsInList is 0 this option is deactivated (no check
149  * will be executed). (@see ulMaxPointsInList)
150  * @param ulInMaxEvalueCalls the maximum number of calls in the
151  * @see evaluePosition() will be called befor it returns false; if the
152  * evaluePosition() was called more than ulInMaxEvalueCalls times, it
153  * will return false;
154  * If ulInMaxEvalueCalls is 0 this option is deactivated (no check
155  * will be executed). (@see ulMaxEvalueCalls)
156  */
157  cEvaluePositionListLimit( const unsigned long long ulInSortEverAddedPointsList = 0,
158  const cDomainVectorBasis * pInVecDomainDimension = NULL,
159  const bool bInDeleteEmptyPoints = true,
160  const unsigned long long ulInMaxPointsInList = 0,
161  const unsigned long long ulInMaxEvalueCalls = 0 );
162 
163  /**
164  * copyconstructor
165  *
166  * @param evaluePositionListMemLimit the cEvaluePositionListLimit
167  * object to copy
168  */
169  cEvaluePositionListLimit( const cEvaluePositionListLimit & evaluePositionListMemLimit );
170 
171  /**
172  * destructor
173  */
174  virtual ~cEvaluePositionListLimit();
175 
176  /**
177  * The method with wich the evalued points with ther properties are
178  * inserted. Everytime a point (to evalue) is reached in the
179  * evaluation, this method is called with the position and the
180  * properties of the point and stores the copies of this data
181  * to the end of the list @see liEvaluedPositionData .
182  *
183  * @see liEvaluedPositionData
184  * @param vPosition the position of the point, which is evalued
185  * @param vProperties a list of the properties of the point
186  */
187  virtual bool evaluePosition( const cVectorPosition & vPosition,
188  const list<cVectorProperty> & vProperties );
189 
190 
191 };//class cEvaluePositionListLimit
192 
193 };
194 
195 #endif
196 
197