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
cFibLeaf.h
Go to the documentation of this file.
1 /**
2  * @class cFibLeaf
3  * file name: cFibLeaf.h
4  * @author Betti Oesterholz
5  * @date 26.11.2009
6  * @mail webmaster@BioKom.info
7  *
8  * System: C++
9  *
10  * This class represents a Fib -element, which are leafs.
11  * Copyright (C) @c LGPL3 2009 Betti Oesterholz
12  *
13  * This program is free software: you can redistribute it and/or modify
14  * it under the terms of the GNU Lesser General Public License (LGPL) as
15  * published by the Free Software Foundation, either version 3 of the
16  * License, or any later version.
17  *
18  * This program is distributed in the hope that it will be useful,
19  * but WITHOUT ANY WARRANTY; without even the implied warranty of
20  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
21  * GNU Lesser General Public License for more details.
22  *
23  * You should have received a copy of the GNU Lesser General Public License
24  * along with this program. If not, see <http://www.gnu.org/licenses/>.
25  *
26  *
27  * This file contains the basisclass of all Fib -elements, which are
28  * leafs. Leafes can have no underobject.
29  * It's not possible to create instances from this class.
30  *
31  * If the structur of the fib -object is changed just set the underobjects
32  * and call updateAllValues() from a position wher the highest fib -element
33  * can be reached. The updateAllValues() method will make the conections.
34  * If you remove conections you have to be more carefull.
35  *
36  */
37 /*
38 History:
39 26.11.2009 Oesterholz created
40 06.01.2010 Oesterholz getAllFibElements() uses now getAllFibElementsFromPosition()
41 07.08.2011 Oesterholz isDefinedVariable() and getDefinedVariables() with
42  pCallingFibElement
43 19.10.2011 Oesterholz FEATURE_EQUAL_FIB_OBJECT implemented
44 */
45 
46 
47 #ifndef ___C_FIB_LEAF_H__
48 #define ___C_FIB_LEAF_H__
49 
50 #include "version.h"
51 #include "fibDatatyps.h"
52 
53 #include "cFibElement.h"
54 #include "cVectorPosition.h"
55 #include "cVectorProperty.h"
56 #include "cFibVariable.h"
57 #include "cDomains.h"
58 
59 #include <list>
60 #include <ostream>
61 #include <istream>
62 
63 
64 
65 using std::list;
66 using std::ostream;
67 using std::istream;
68 
69 using namespace fib;
70 
71 namespace fib{
72 
73 
74 
75 
76 class cFibLeaf: public cFibElement{
77 protected:
78 
79 
80 #ifdef FEATURE_SIMPLE_CONSTRUCTOR
81 
82  /**
83  * parameterconstructor
84  *
85  * @param pInSuperiorElement the fib -Element in which this fib -element
86  * is the underobject
87  */
88  cFibLeaf( cFibElement * pInSuperiorElement = NULL );
89 
90 #else //FEATURE_SIMPLE_CONSTRUCTOR
91 
92  /**
93  * parameterconstructor
94  *
95  * @param pInSuperiorElement the fib -Element in which this fib -element
96  * is the underobject
97  * @param pInPreviousFibElement the fib -Element which stands in th order
98  * of Fib -elements befor this Fib -element
99  * @param pInNextFibElement the fib -Element which stands in th order
100  * of Fib -elements behind this Fib -element
101  */
102  cFibLeaf( cFibElement * pInSuperiorElement = NULL,
103  cFibElement * pInPreviousFibElement = NULL,
104  cFibElement * pInNextFibElement = NULL );
105 
106 #endif //FEATURE_SIMPLE_CONSTRUCTOR
107 
108  /**
109  * copyconstructor
110  * This copyconstructor constructs a copy of this Fib -Element.
111  * It dosn't copy other fib -elements than this, even if ther are in this
112  * fib -element.
113  *
114  * @param fibLeafElement the Fib -element to copy
115  */
116  cFibLeaf( const cFibLeaf & fibLeafElement );
117 
118 
119 public:
120 
121  /**
122  * This method checks, if this fib -element is an valid fib -element.
123  *
124  * @return true if this fib -element is an valid fib -element, else false
125  */
126  virtual bool isValidFibElement() const;
127 
128 #ifdef FEATURE_FAST_UPDATE
129 
130  /**
131  * This method returns the next fib -element in the order of fib -elements.
132  *
133  * @return a pointer to the next fib -element in the order of fib -elements
134  * or the NULL pointer if non such exists
135  */
136  virtual cFibElement *getNextFibElement();
137 
138  /**
139  * This method returns the next fib -element in the order of
140  * fib -elements with the given type cTyp.
141  *
142  * @param cType the type of the fib -element to return
143  * @return a pointer to the next fib -element in the order of
144  * fib -elements with the given type or the NULL pointer if non such
145  * exists
146  */
147  virtual cFibElement * getNextFibElement( char cType );
148 
149  /**
150  * This method returns the lNumber'th fib -element in the order of
151  * fib -elements.
152  *
153  * @param lNumber the number of the fib -Element to return
154  * @param bAbsolute if the lNumber is an absolute value for the wool
155  * fib -object
156  * @return a pointer to the lNumber'th fib -element in the order of
157  * fib -elements or the NULL pointer if non such exists
158  */
159  virtual cFibElement * getConstFibElement( longFib lNumber,
160  bool bAbsolute=false ) const;
161 
162  /**
163  * This method returns the lNumber'th fib -element in the order of
164  * fib -elements of the given type cTyp with the given type cTyp.
165  *
166  * @param lNumber the number of the fib -element to return
167  * @param cType the type of the fib -element to return
168  * @param bAbsolute if the lNumber is an absolute value for the wool
169  * fib -object
170  * @return a pointer to the lNumber'th fib -element in the order of
171  * fib -elements with the given type or the NULL pointer if non such
172  * exists
173  */
174  virtual cFibElement * getConstFibElement( char cType, longFib lNumber,
175  bool bAbsolute=false ) const;
176 
177 #endif
178 
179  /**
180  * This method checks if the given variable is used in the given
181  * direction from this Fib -element.
182  *
183  * @see cFibVariable
184  * @see isDefinedVariable()
185  * @param variable the variable to check if it is used
186  * @param direction the direction from this Fib -element, in which the
187  * variable should be used; standardvalue is ED_POSITION so yust
188  * this Fib -element will be checked
189  * @return true if the variable is used, else false
190  */
191  virtual bool isUsedVariable( const cFibVariable *variable ,
192  edDirection direction=ED_POSITION ) const;
193 
194  /**
195  * This method returns all variables used in the given direction from
196  * this Fib -element.
197  *
198  * @see cFibVariable
199  * @see isUsedVariable()
200  * @see isDefinedVariable()
201  * @param direction the direction from this Fib -element, in which the
202  * variable should be used; standardvalue is ED_POSITION so yust
203  * this Fib -element will be checked
204  * @return the set with all variables used in the given direction from
205  * this Fib -element
206  */
207  virtual set<cFibVariable*> getUsedVariables( edDirection direction=ED_POSITION );
208 
209 
210 #ifdef FEATURE_FAST_UPDATE
211 
212  /**
213  * This method returns the number of this fib -element in the order of
214  * fib -Elements or order of fib -Elements of the same type if bOfType
215  * is true.
216  *
217  * @see getNumberOfElements()
218  * @param bOfType if true the returned number is the number the order
219  * of fib -elements of the same type as this fib -Element, else in
220  * the order of all fib -elements
221  * @return the number of this fib -element in the order of fib
222  * -Elements or order of fib -Elements of the same type if bOfType
223  * is true
224  */
225  virtual unsignedIntFib getNumberOfElement( bool bOfType=false ) const;
226 
227  /**
228  * This method returns the number of this fib -element in the order of
229  * move points.
230  *
231  * @see getNumberOfMovePoints()
232  * @return the number of this fib -element in the order of move points
233  */
234  virtual unsignedIntFib getNumberOfMovePoint() const;
235 
236 #endif //FEATURE_FAST_UPDATE
237 
238  /**
239  * This method returns the number of Fib -elements of a type in this Fib
240  * -object.
241  *
242  * @see getType()
243  * @see getNumberOfElement()
244  * @param cType the character of the type ( @see getType() ), for which
245  * the elements should be counted; u (the standartvalue) stands for
246  * Fib -Elements of any type
247  * @return the number of Fib -elements of a type in the Fib -object
248  */
249  virtual unsignedIntFib getNumberOfElements( char cType='u' ) const;
250 
251  /**
252  * This method returns the number of move points in this Fib -object.
253  *
254  * @see getNumberOfMovePoint()
255  * @return the number of move points in this Fib -object
256  */
257  virtual unsignedIntFib getNumberOfMovePoints() const;
258 
259  /**
260  * @return true if this fib -element is movebel else false
261  */
262  virtual bool isMovable() const;
263 
264  /**
265  * This method returns the number of object points in this Fib -object.
266  *
267  * @see getNumberOfObjectPoint()
268  * @return the number of object points in this Fib -object
269  */
270  virtual unsignedIntFib getNumberOfObjectPoints() const;
271 
272  /**
273  * This method returns the number of the Fib -element over wich the
274  * objectPoint object point is defined.
275  *
276  * @see getNumberOfElement()
277  * @see getNumberOfElements()
278  * @see getNumberOfObjectPoint()
279  * @see getNumberOfObjectPoints()
280  * @param uiObjectPoint the number of the object point for which the
281  * definig Fib -element number should be returned
282  * @param bAbsolute if the lNumber is an absolute value for the wool
283  * fib -object
284  * @return the number of the Fib -element over wich the objectPoint
285  * object point is defined
286  */
287  virtual unsignedIntFib objectPointToElementPoint( const unsignedIntFib
288  uiObjectPoint, bool bAbsolute=false ) const;
289 
290  /**
291  * This method inserts the given Fib -element fibElement on the
292  * specified position. The replaced Fib -element will be the underobject
293  * of the inserted Fib -element fibElement.
294  *
295  * @see getNumberOfElement()
296  * @see getNumberOfElements()
297  * @see getType()
298  * @param cType the type of the Fib -element insted of which the given
299  * Fib -element fibElement should be inserted
300  * @param elementPoint the number of the Fib -element, in the order of
301  * Fib -elements of the given type cType, in which position the given
302  * Fib -element fibElement should be inserted; if 0 the given
303  * fibElement will be inserted under this Fib -element
304  * @param fibElement the Fib -element to insert
305  * @param bAbsolute if the lNumber is an absolute value for the wool
306  * fib -object
307  * @param bCheckVariables if true (standardvalue) it will be checked if
308  * the variables the fib -element defines are needed, else the
309  * fib -element will be removed even if its variables are needed elsewher
310  * @return true if the Fib -element fibElement was inserted, else false
311  */
312  virtual bool insertElement( cFibElement *fibElement, const char cType='u',
313  const unsignedIntFib elementPoint=0, bool bAbsolute=false,
314  bool bCheckVariables=true );
315 
316  /**
317  * This method inserts the given Fib -object fibObject on the
318  * specified position. On the specified position a listelement will
319  * be inserted, with the old Fib -object and the given Fib -object
320  * fibObject as its underobjects.
321  *
322  * @see getNumberOfElement()
323  * @see getNumberOfElements()
324  * @see overwriteObjectWithObject()
325  * @see getType()
326  * @param cType the type of the Fib -element, on which position the
327  * given Fib -object fibObject should be inserted
328  * @param elementPoint the number of the Fib -element, in the order of
329  * Fib -elements of the given type cType, on which position the given
330  * Fib -object fibObject should be inserted
331  * @param fibObject the Fib -object to insert
332  * @param first if true, the inserted object will be the first
333  * underobject of the new listelement
334  * @param bAbsolute if the lNumber is an absolute value for the wool
335  * fib -object
336  * @return true if the Fib -object fibObject was inserted, else false
337  */
338  virtual bool insertObjectInElement( cFibElement *fibObject, const char cType='u',
339  const unsignedIntFib elementPoint=0, bool first=true,
340  bool bAbsolute=false );
341 
342  /**
343  * This method overwrites the Fib -object on specified position with
344  * the given Fib -object fibObject. The Fib -object on specified
345  * position will be replaced with the given Fib -object fibObject.
346  *
347  * @see getNumberOfElement()
348  * @see getNumberOfElements()
349  * @see insertObjectInElement()
350  * @see getType()
351  * @param cType the type of the Fib -element, on which position the
352  * given Fib -object fibObject should be inserted
353  * @param elementPoint the number of the Fib -element, in the order of
354  * Fib -elements of the given type cType, on which position the given
355  * Fib -object fibObject should be inserted
356  * @param fibObject the Fib -object to insert
357  * @param bDeleteOld if true, delete the old Fib -object from the memory
358  * @param bAbsolute if the elementPoint is an absolute value for the wool
359  * fib -object
360  * @return true if the old Fib -object was overwritten and the given
361  * Fib -object fibObject was inserted, else false
362  */
363  virtual bool overwriteObjectWithObject( cFibElement *fibObject, const char cType='u',
364  const unsignedIntFib elementPoint=0, bool bDeleteOld=true,
365  bool bAbsolute=false );
366 
367  /**
368  * This method removes the connected object with the given number in
369  * the order of connected object points.
370  * For this the defining underobject in an listelement will be removed.
371  * If the listelement contains after the operation yust one underobject,
372  * the listelement will be replaced with the underobject.
373  *
374  * @param objectPoint the number of the connected object to remove
375  * @param bDeleteOld if true, delete the connected object from the
376  * memory, else yust remove it's pointers
377  * @param bAbsolute if the objectPoint is an absolute value for the wool
378  * fib -object
379  * @return true if the connected Fib -object was removed, else false
380  */
381  virtual bool removeObject( const unsignedIntFib objectPoint,
382  bool bDeleteOld=true, bool bAbsolute=false );
383 
384  /**
385  * This method checks, if all Fib -elements of this Fib -object
386  * have the underobjects they need to be correct.
387  *
388  * @return true if all Fib -elements of this Fib -object have the
389  * underobjects they need to be correct, else false
390  */
391  virtual bool hasUnderAllObjects( ) const;
392 
393  /**
394  * This method checks, if the Fib -element on the specified position
395  * is deletable.
396  * An deletable Fib -element doesn't make the Fib -object invalid if
397  * it is deleted (e.g. points- and listelements are never deletable).
398  *
399  * @see removeElement()
400  * @see cutElement()
401  * @see getType()
402  * @param cType the type of the Fib -element to check
403  * @param elementPoint the number of the Fib -element, in the order of
404  * Fib -elements of the given type cType, to check
405  * @param bAbsolute if the elementPoint is an absolute value for the wool
406  * fib -object
407  * @param bCheckVariables if true (standardvalue) it will be checked if
408  * the variables the fib -element defines are needed, else the
409  * fib -element will be removed even if its variables are needed elsewher
410  * @return true if the Fib -element is deletable, else false
411  */
412  virtual bool isRemovableElement( const char cType='u', const unsignedIntFib
413  elementPoint=0, bool bAbsolute=false, bool bCheckVariables=true ) const;
414 
415  /**
416  * This method cuts the Fib -element on the specified position.
417  * This works like removeElement(), except that the removed element is
418  * returned.
419  *
420  * @see isDeletableElement()
421  * @see removeElement()
422  * @see getType()
423  * @param cType the type of the Fib -element to cut
424  * @param elementPoint the number of the Fib -element, in the order of
425  * Fib -elements of the given type cType, to cut
426  * @param bAbsolute if the elementPoint is an absolute value for the wool
427  * fib -object
428  * @param bCheckVariables if true (standardvalue) it will be checked if
429  * the variables the fib -element defines are needed, else the
430  * fib -element will be removed even if its variables are needed elsewher
431  * @return the pointer to the cuted Fib -element or NULL, if the Fib
432  * -element couldn't cut
433  */
434  virtual cFibElement *cutElement( const char cType='u', const unsignedIntFib
435  elementPoint=0, bool bAbsolute=false, bool bCheckVariables=true );
436 
437 #ifdef FEATURE_FAST_UPDATE
438  /**
439  * This method deletes this given fib -object with all the fib
440  * elements it contains and is contained in. The memory for the fib
441  * -object is freed.
442  */
443  virtual void deleteObject();
444 #endif //FEATURE_FAST_UPDATE
445 
446  /**
447  * This method moves a Fib -limb -element (cFibLimb) on the specified
448  * position over iHowfar Fib -elements.
449  * Moving is stoped if an invalid Fib -object would result (e.g. no Fib
450  * -element can be moved over an Fib -elements that defines a variable
451  * the moved Fib -element uses).
452  * Moving an Fib -element into an listelement will result in an
453  * listelement with the moved element in everyone of it's underobjects.
454  *
455  * @see isDeletableElement()
456  * @see removeElement()
457  * @see getType()
458  * @param cType the type of the Fib -element to move
459  * @param elementPoint the number of the Fib -element, in the order of
460  * Fib -elements of the given type cType, to move
461  * @param iHowfar the number of Fib -elements over which the to move
462  * Fib -element should be moved; if this value is positiv the Fib
463  * -element will be moved over Fib -elements it contains else over
464  * Fib -elements it is contained in
465  * @param bAbsolute if the elementPoint is an absolute value for the wool
466  * fib -object
467  * @return the number of Fib -Elements over which the to move Fib
468  * -element was moved; if this value is positiv the Fib -element
469  * was moved over Fib -elements it contains else over Fib -elements
470  * it is contained in
471  */
472  virtual intFib moveLimbElement( const char cType='u', const unsignedIntFib
473  elementPoint=0, const intFib iHowfar=1, bool bAbsolute=false );
474 
475 
476 #ifndef FEATURE_EQUAL_FIB_OBJECT
477 
478  /**
479  * This method checks if the given Fib -object is equal to this Fib
480  * -object.
481  * Variables can be others, but must be defined and aused in equivalent
482  * Fib -elements.
483  *
484  * @param fibObject the Fib -object to which this Fib -object should be
485  * equal
486  * @return true if this Fib -object is equal to the given Fib -object,
487  * else false
488  */
489  virtual bool equal( const cFibElement & fibObject ) const;
490 
491 #endif //FEATURE_EQUAL_FIB_OBJECT
492 
493  /**
494  * @return this method returns true if this fib -element is an
495  * leafelement, alse false
496  */
497  virtual bool isLeaf() const;
498 
499 protected:
500 
501 #ifdef FEATURE_FAST_UPDATE
502 
503  /**
504  * This method is a helpmethod for getNumberOfElement() .
505  * Basicly it counts the number of fib -elements of the given type befor
506  * the given fib -element pLastFibElement .
507  *
508  * @see getNumberOfElement()
509  * @see getNumberOfElements()
510  * @param pLastFibElement a pointer to the fib -element which called this
511  * method last
512  * @param cType the type of the fib -elements, for which to evalue the count,
513  * if 'u' fib -elements of all typs are counted
514  * @return the number of fib -elements of the given type cType befor the
515  * given fib -element pLastFibElement
516  */
517  virtual unsignedIntFib getNumberOfElementUp( const cFibElement * pLastFibElement,
518  const char cType ) const;
519 
520  /**
521  * This method is a helpmethod for getNumberOfMovePoint() .
522  * Basicly it counts the number of move points befor the given
523  * fib -element pLastFibElement .
524  *
525  * @see getNumberOfMovePoint()
526  * @see getNumberOfMovePoints()
527  * @param pLastFibElement a pointer to the fib -element which called this
528  * method last
529  * @return the number of movepoints befor the given fib -element pLastFibElement
530  */
531  virtual unsignedIntFib getNumberOfMovePointUp(
532  const cFibElement * pLastFibElement ) const;
533 
534  /**
535  * This method returns the next fib -element in the order of
536  * fib -elements which is above the given fib element.
537  * This method is used, if the method @see getNextFibElement() reaches
538  * an leaf in the object tree.
539  *
540  * @see getNextFibElement()
541  * @param pLastFibElement the fib -element relativ to which the next
542  * fib -element should lay
543  * @return a pointer to the next fib -element in the order of fib -elements
544  * or the NULL pointer if non such exists
545  */
546  virtual cFibElement * getNextFibElementUp( const cFibElement * pLastFibElement );
547 
548  /**
549  * This method returns the next fib -element in the order of
550  * fib -elements which is above the given fib element.
551  * This method is used, if the method @see getNextFibElement() reaches
552  * an leaf in the object tree.
553  *
554  * @see getNextFibElement()
555  * @param pLastFibElement the fib -element relativ to which the next
556  * fib -element should lay
557  * @param cType the type of the fib -element to return
558  * @return a pointer to the next fib -element in the order of fib -elements
559  * or the NULL pointer if non such exists
560  */
561  virtual cFibElement * getNextFibElementUp( const cFibElement * pLastFibElement,
562  char cType );
563 
564  /**
565  * This method returns the lNumber'th fib -element in the order of
566  * fib -elements which is above the given fib -element.
567  * This method is used, if the method @see getConstFibElement() reaches
568  * an leaf in the object tree.
569  *
570  * @see getConstFibElementUp()
571  * @param pLastFibElement the fib -element relativ to which the next
572  * fib -element should lay
573  * @param lNumber the number of the fib -Element to return
574  * @return a pointer to the next fib -element in the order of fib -elements
575  * or the NULL pointer if non such exists
576  */
577  virtual cFibElement * getConstFibElementUp( const cFibElement * pLastFibElement,
578  longFib lNumber ) const;
579 
580  /**
581  * This method returns the lNumber'th fib -element in the order of
582  * fib -elements of the given type cTyp with the given type cTyp
583  * which is above the given fib -element.
584  * This method is used, if the method @see getConstFibElement() reaches
585  * an leaf in the object tree.
586  *
587  * @see getConstFibElementUp()
588  * @param pLastFibElement the fib -element relativ to which the next
589  * fib -element should lay
590  * @param cType the type of the fib -element to return
591  * @param lNumber the number of the fib -Element to return
592  * @return a pointer to the next fib -element in the order of fib -elements
593  * or the NULL pointer if non such exists
594  */
595  virtual cFibElement * getConstFibElementUp( const cFibElement * pLastFibElement,
596  char cType, longFib lNumber ) const;
597 
598 #endif //FEATURE_FAST_UPDATE
599 
600 #ifndef FEATURE_NO_REGISTER_NEW_FIB_
601  /**
602  * With this method a new Fib -element in the Fib -Object is registert
603  * by the other Fib -elements in the Fib -Object.
604  *
605  * @param newFibElement the new Fib -element to register
606  * @param uINumberOfFibElement the number of the new Fib -element in the
607  * order of all Fib -Elements in the Fib -object
608  * @param bDirectionUp the direction in which the registration of the
609  * new Fib -element is performed in the Fib -object tree;
610  * from the position on which the new Fib -Element is added the
611  * method is called for both directions
612  * @return true if the registration was successfull, else false
613  */
614  virtual bool registerNewFibElement( cFibElement *newFibElement,
615  unsignedIntFib uINumberOfFibElement, bool bDirectionUp );
616 
617 
618  /**
619  * With this method a new part Fib -object in the Fib -Object is
620  * registert by the other Fib -elements in the Fib -Object.
621  *
622  * @param newFibObject the new part Fib -object to register
623  * @param uILowerNumberOfFibElements the number of the Fib -element in the
624  * new part Fib -object with the lowest number in the order of all
625  * Fib -Elements in the entire Fib -object
626  * @param uIUpperNumberOfFibElements the number of the Fib -element in the
627  * new part Fib -object with the highest number in the order of all
628  * Fib -Elements in the entire Fib -object
629  * @param bDirectionUp the direction in which the registration of the
630  * new part Fib -object is performed in the Fib -object tree;
631  * @return true if the registration was successfull, else false
632  */
633  virtual bool registerNewFibObject( cFibElement *newFibObject,
634  unsignedIntFib uILowerNumberOfFibElements,
635  unsignedIntFib uIUpperNumberOfFibElements, bool bDirectionUp );
636 #endif //FEATURE_NO_REGISTER_NEW_FIB_
637 
638 #ifndef FEATURE_FAST_UPDATE
639 
640  /**
641  * This method updates the values/ properties off all fib -elements in
642  * this fib -object beginning with this fib -element.
643  * Every underobject should have all it's underobjects.
644  *
645  * @param previosFibElement the prvios fib -element to this fib -element
646  * in the order of fib -elements; if it is NULL ther is no previos
647  * fib -element to this
648  * @param pNextArm the next arm fib -object in the next higher
649  * fib -brancheelement
650  * @return a pointer to the last evalued fib -element;
651  * if NULL an error has occured
652  */
653  virtual cFibElement* updateValues( cFibElement * previosFibElement=NULL,
654  cFibElement * pNextArm=NULL );
655 
656  /**
657  * This method returns the number of the next connected object point
658  * in the order of connected object points that conntains this Fib
659  * -element.
660  *
661  * @param uINumberOfStartFibElement the number, in the order of all
662  * fib -elements, of the fib -element for which the connected object
663  * point is to return
664  * @see getNumberOfObjectPoint
665  * @see getNumberOfObjectPoints()
666  * @return the number of the next connected object point for this Fib
667  * -element
668  */
669  virtual unsignedIntFib getNumberOfObjectPoint(
670  unsignedIntFib uINumberOfStartFibElement ) const;
671 
672  /**
673  * This method returns the numbers of all object points that contain the
674  * elementPoint Fib -element.
675  *
676  * @see elementPointToObjectPoints()
677  * @see getNumberOfElement()
678  * @see getNumberOfElements()
679  * @see getNumberOfObjectPoint()
680  * @see getNumberOfObjectPoints()
681  * @see getType()
682  * @param referenceFibObject the fib -element for which the object points
683  * are to returned
684  * @param uiLastObjectPoint the number of the last object point to the
685  * referenceFibObject
686  * @return a list of the numbers of all object points that contain the
687  * elementPoint Fib -element of the type cType
688  */
689  virtual list<unsignedIntFib> elementPointToObjectPoints(
690  const cFibElement *referenceFibObject,
691  const unsignedIntFib uiLastObjectPoint ) const;
692 
693 #endif //FEATURE_FAST_UPDATE
694 
695  /**
696  * This method sets the each variable, which is defined over an leaf,
697  * to an uniqe integer number greater than the given number
698  * uiLastVariableNumber. While storing this number can be stored to
699  * identify the variable.
700  *
701  * @param uiLastVariableNumber the number which was last use, this
702  * means also is the greatest used, in this limb.
703  * @return the number which was last use, this
704  * means also is the greatest used, in this limb
705  * from the method
706  */
707  virtual unsignedIntFib enumerateVariablesForStoring(
708  unsignedIntFib uiLastVariableNumber = 0 );
709 
710  /**
711  * This method returns a number of (lNumberOfMaxReturnedElements)
712  * Fib -elements beginning from the actual Fib -element in the
713  * given direction of the given type cType.
714  * The actual fib -element will never be included in the returned list.
715  *
716  * @param cType the type of the Fib -elements to return;
717  * 'w' stands for wrong/ not correct fib -elements
718  * @param direction the direction, beginning from the reference
719  * Fib -element, in which the to return Fib -elements should stand
720  * @param lNumberOfMaxReturnedElements the maximal number of
721  * Fib -elements to return
722  * @return a list with the pointers to the to returning Fib -elements
723  */
724  virtual list<cFibElement*> getAllFibElementsFromPosition( char cType,
725  edDirection direction, unsignedLongFib lNumberOfMaxReturnedElements );
726 
727  /**
728  * This method checks if the given variable is defined in the given
729  * direction from this Fib-element.
730  * This is for intern use to get the correct data from
731  * isDefinedVariable() without pCallingFibElement.
732  *
733  * @see cFibVariable
734  * @see isUsedVariable()
735  * @param pVariable the variable to check if it is defined
736  * @param direction the direction from this Fib-element, in which the
737  * variable should be defined; standardvalue is ED_POSITION so yust
738  * this Fib-element will be checked
739  * @param pCallingFibElement the Fib-Element which called this method
740  * @return true if the variable is used, else false
741  */
742  virtual bool isDefinedVariableInternal( const cFibVariable * pVariable,
743  edDirection direction = ED_POSITION,
744  const cFibElement * pCallingFibElement = NULL ) const;
745 
746  /**
747  * This method returns all variables defined in the given direction from
748  * this Fib-element.
749  * This is for intern use to get the correct data from
750  * getDefinedVariables() without pCallingFibElement..
751  *
752  * @see cFibVariable
753  * @see getUsedVariables()
754  * @see isDefinedVariable()
755  * @param direction the direction from this Fib-element, in which the
756  * variable should be used; standardvalue is ED_POSITION so yust
757  * this Fib-element will be checked
758  * @param pCallingFibElement the Fib-Element which called this method
759  * @return the set with all variables used in the given direction from
760  * this Fib-element
761  */
762  virtual list< cFibVariable* > getDefinedVariablesInternal(
763  edDirection direction = ED_HIGHER,
764  const cFibElement * pCallingFibElement = NULL );
765 
766 #ifdef FEATURE_EQUAL_FIB_OBJECT
767 
768  /**
769  * This method checks if the given Fib-object is equal to this fib
770  * -object.
771  * Variables can be others, but must be defined and used in equivalent
772  * Fib-elements.
773  *
774  * @param fibObject the Fib-object to which this Fib-object should be
775  * equal
776  * @param mapEqualRootObjects the root objects of this object that wher
777  * already checked as equal
778  * map entries:
779  * key: the root-element of this Fib object that was checked
780  * value: the to the key correspondending root-element of the
781  * fibObject that was checked and which is equal to the key
782  * root-element
783  * (it is empty if bCheckExternalObjects == false)
784  * @param mapEqualDefinedVariables the Fib elements that defines
785  * variables and are equal;
786  * map entries:
787  * key: the Fib element of this Fib object that was checked
788  * value: the to the key correspondending Fib element of the
789  * fibObject that was checked and which sets its defined
790  * variables to the same values as the key Fib element
791  * @param bCheckExternalObjects if true the external objects of
792  * cExtObject will be compared
793  * @return true if this Fib-object is equal to the given Fib-object,
794  * else false
795  */
796  virtual bool equalInternal( const cFibElement & fibObject,
797  map< const cRoot *, const cRoot * > & mapEqualRootObjects,
798  map< const cFibElement *, const cFibElement * > & mapEqualDefinedVariables,
799  const bool bCheckExternalObjects ) const;
800 
801 #endif //FEATURE_EQUAL_FIB_OBJECT
802 
803 };//end class cFibLeaf
804 
805 
806 }//end namespace fib
807 
808 #endif
809 
810