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
cRoot.h
Go to the documentation of this file.
1 /**
2  * @class cRoot
3  * file name: cRoot.h
4  * @author Betti Oesterholz
5  * @date 05.07.2009
6  * @mail webmaster@BioKom.info
7  *
8  * System: C++
9  *
10  * This class represents the root-Fib-element.
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 class represents the root-element of the Fib-multimedialanguage.
28  * It holds the information for the enviroment of the Fib-Object, like
29  * number of dimensions and domains.
30  *
31  */
32 /*
33 History:
34 05.07.2009 Oesterholz created
35 13.12.2009 Oesterholz storePropertyType() and createStorePropertyOrder() implemented
36 18.04.2010 Oesterholz evalueObject() methods changed: not a function but
37  an object is given to evalue the data
38 27.09.2010 Oesterholz generateNeededDomains() method added
39 07.08.2011 Oesterholz isDefinedVariable() and getDefinedVariables() with
40  pCallingFibElement
41 09.08.2011 Oesterholz changes for cExtObject: (new: liPExtObjectElm,
42  setCallingFibElement(), unsetCallingFibElement() )
43 15.08.2011 Oesterholz syncUnderobjects() renamed to syncSubobjects()
44 19.10.2011 Oesterholz FEATURE_EQUAL_FIB_OBJECT implemented
45 07.11.2011 Oesterholz ExternUnderObjects to ExternSubobjects
46 29.01.2011 Oesterholz FEATURE_EXT_SUBOBJECT_INPUT_VECTOR implemented:
47  the input values are now a vector of values;
48  getValidDomains() + getValidPureValueDomains() bInherit added
49 22.11.2012 Oesterholz Bugfix: a root element can be called more than one
50  time by external objects
51 */
52 
53 #ifndef ___C_ROOT_H__
54 #define ___C_ROOT_H__
55 
56 
57 #include "version.h"
58 
59 #include "fibDatatyps.h"
60 
61 #include "cFibElement.h"
62 #include "cFibBranch.h"
63 #include "cMultimediaInfo.h"
64 #include "cOptionalPart.h"
65 #include "cDomains.h"
66 #include "cVectorChecksum.h"
67 #include "cTypeProperty.h"
68 
69 #include <list>
70 #include <set>
71 
72 
73 namespace fib{
74 
75 //cyclic dependencies
76 class cExtObject;
77 class cFibDatabase;
78 
79 
80 class cRoot: public cFibBranch{
81 
82 friend class cFibElement;
83 friend class cProperty;
84 friend class cFibBranch;
85 friend class cExtObject;
86 friend class cExtSubobject;
87 
88 private:
89 
90  /**
91  * The main -Fib object of this root-object.
92  * The pointer to the main -Fib object should also be stored as the
93  * first element in the fibUnderObjects property of the cFibBranch
94  * class. So a lot methods can be implemented ther and don't have to
95  * overwritten in this cRoot class.
96  */
98 
99  /**
100  * The sub -root-objects of this root-object.
101  * The first element of the pair is the sub -root-object identifier
102  * and the secound a pointer to the sub -root-object.
103  * The pointers to the sub -root-objects should also be stored in the
104  * same order in the fibUnderObjects property of the cFibBranch class.
105  * So a lot methods can be implemented ther and don't have to
106  * overwritten in this cRoot class.
107  */
108  list< pair< longFib, cRoot * > > liSubRootObjects;
109 
110  /**
111  * The multimediainfo of this root-element.
112  */
114 
115  /**
116  * The optionalpart of this root-element.
117  */
119 
120  /**
121  * The domains of this root-element.
122  */
124 
125  /**
126  * The domains for elementvalues of this root-element.
127  */
129 
130  /**
131  * The pointer to the checksumvektor of this root-element or NULL if
132  * non such exists.
133  */
135 
136  /**
137  * This list contains the input variables of the root-element.
138  * The first value of an entry pair ist the Variable and the secound
139  * is the standardvalue for the variable.
140  */
141  list< pair< cFibVariable *, doubleFib > > liInputVariables;
142 
143 #ifndef FEATURE_EXT_SUBOBJECT_INPUT_VECTOR
144 //TODO remove
145  /**
146  * This is the list for extern subobjects.
147  * The list entries are the number of output varaibles for the extern
148  * subobjects.
149  */
150  list< unsignedIntFib > liExternSubobjects;
151 #endif //FEATURE_EXT_SUBOBJECT_INPUT_VECTOR
152 
153  /**
154  * This set contains the identifiers of used database objects.
155  */
156  set< longFib > setDatabaseIdentifiers;
157 
158 //the next filed are for intern evaluation
159 
160  /**
161  * The propertytypes, in the order they will be counted when stored.
162  * This list will be created when storeBit() is called, so the
163  * properties can be stored.
164  * This is not real class data, but helpdata for storing. (const
165  * methods shouldn't fear to change this.)
166  *
167  * @see storeBit()
168  */
169  list< cTypeProperty > liStorePropertyOrder;
170 
171  /**
172  * The stored input variables of this root-object.
173  * It is neccessary to store the values of the input variables, while
174  * storing the object, because the values of the input variables will be
175  * set to ther number for storing, but the values of the input variables
176  * could be change from a user beforhand and shouldn't change while
177  * storing.
178  * This is not real class data, but helpdata for storing. (const
179  * methods shouldn't fear to change this.)
180  *
181  * @see backupVariablesValues()
182  */
183  list< list< cFibVariable * > > liLiStoredInputVariables;
184 
185  /**
186  * A pointer to the extern object element which calls /uses this
187  * root-object.
188  * @see cExtObject
189  * @see getCallingExtObject()
190  * @see setCallingFibElement()
191  * @see unsetCallingFibElement()
192  * @see evalueObject()
193  */
194  list< cExtObject * > liPExtObjectElm;
195 
196  /**
197  * The stored input variables of this root-object.
198  * It is neccessary to store the values of the input variables, while
199  * storing the object, because the values of the input variables will be
200  * set to ther number for storing, but the values of the input variables
201  * could be change from a user beforhand and shouldn't change while
202  * storing.
203  * This is not real class data, but helpdata for storing. (const
204  * methods shouldn't fear to change this.)
205  *
206  * @see cExtObject
207  * @see liPExtObjectElm()
208  * @see setCallingFibElement()
209  * @see unsetCallingFibElement()
210  * @see evalueObject()
211  */
212  list< list< cFibVariable * > > liLiStoredBelowVariables;
213 
214 
215  /**
216  * The object for the Fib database.
217  */
219 
220 public:
221 
222 #ifdef FEATURE_SIMPLE_CONSTRUCTOR
223 
224  /**
225  * parameterconstructor
226  *
227  * @param pInMainFibObject the main Fib object of this root-element
228  * @param pInSuperiorRootElement the root-Element in which this
229  * root-element is an subobject
230  */
231  cRoot( cFibElement * pInMainFibObject = NULL,
232  cRoot * pInSuperiorRootElement = NULL );
233 
234 #else //FEATURE_SIMPLE_CONSTRUCTOR
235 
236  /**
237  * parameterconstructor
238  *
239  * @param pInSuperiorRootElement the root-Element in which this
240  * root-element is an subobject
241  * @param pInPreviousFibElement the Fib Element which stands in th order
242  * of Fib-elements befor this Fib-element
243  * @param pInMainFibObject the main Fib object of this root-element
244  */
245  cRoot( cRoot * pInSuperiorRootElement = NULL,
246  cFibElement * pInPreviousFibElement = NULL,
247  cFibElement * pInMainFibObject = NULL );
248 
249 #endif //FEATURE_SIMPLE_CONSTRUCTOR
250 
251  /**
252  * copyconstructor
253  * This copyconstructor constructs a copy of the given root-Element.
254  * It dosn't copy other root-elements than the given, even if ther are
255  * in the root-element.
256  *
257  * @param rootElement the root-element to copy
258  */
259  cRoot( const cRoot &rootElement );
260 
261 
262 protected:
263 
264  /**
265  * The constructor for restoring a rootyelement from an TinyXml element.
266  *
267  * @param pXmlNode a pointer to the TinyXml node the Fib object is stored in
268  * @param outStatus An reference to an integervalue where the errorvalue
269  * can be stored to.
270  * possible errorvalues are:
271  * - 0 loading successful
272  * - -1 loading error, invalid pXmlElement
273  * - -2 loading error, invalid data in pXmlElement
274  * - 1 loading warning, invalid data in pXmlElement, error could be corrected
275  * - 2 loading warning, invalid data in pXmlElement, maybe the loaded
276  * object is wrong
277  * @param liDefinedVariables a list with the defined variables for the
278  * to restore Fib element, every variable should have it's number
279  * (the number under which it is stored) as it's value
280  */
281  cRoot( const TiXmlElement * pXmlElement, intFib &outStatus,
282  list<cFibVariable*> & liDefinedVariables );
283 
284 
285  /**
286  * This method restores a rootobject from the stream where it is
287  * stored in the compressed Fib format.
288  * This method is for internal use only.
289  *
290  * @param iBitStream the stream where this rootobject is stored to in,
291  * because this stream is an cReadBits, any number of bits can be
292  * readed from it
293  * @param outStatus An reference to an integervalue where the errorvalue
294  * can be stored to. If the pointer is NULL no errorvalue will be
295  * given back.
296  * possible errorvalues are:
297  * - 0 loading successful
298  * - -1 loading error, invalid stream
299  * - -2 loading error, invalid data in stream
300  * - 1 loading warning, invalid data in stream, error could be corrected
301  * - 2 loading warning, invalid data in stream, maybe the loaded
302  * object is wrong
303  * @param pNextRoot the next higher root-element for the to restore
304  * Fib elements, or the last restored root-element;
305  * if NULL the next Fib element restored will be an root-element
306  */
307  cRoot( cReadBits & iBitStream, intFib & outStatus, cRoot * pNextRoot );
308 
309 public:
310 
311  /**
312  * desstructor
313  */
314  virtual ~cRoot();
315 
316 
317  /**
318  * @see getTypeName
319  * @return a character for the typ of the Fib-element
320  * Types are:
321  * - u: element of unknown typ
322  * - p: point
323  * - l: list-element
324  * - y: property
325  * - c: comment
326  * - a: area
327  * - f: function
328  * - i: if-condition
329  * - o: extern object element
330  * - s: extern subobject element
331  * - v: set-element
332  * - m: matrix element
333  * - r: root-element
334  */
335  virtual char getType() const;
336 
337  /**
338  * This method checks, if this Fib element is an valid Fib element.
339  *
340  * @return true if this Fib element is an valid Fib element, else false
341  */
342  virtual bool isValidFibElement() const;
343 
344  /**
345  * This method checks, if all Fib-elements of this Fib-object
346  * have the subobjects they need to be correct.
347  *
348  * @return true if all Fib-elements of this Fib-object have the
349  * subobjects they need to be correct, else false
350  */
351  virtual bool hasUnderAllObjects() const;
352 
353  /**
354  * This method evaluades the Fib object.
355  *
356  * @param evaluePosition a reference to the object with the
357  * evaluePosition() method to evalue /store the positions and ther
358  * properties; everytime a point (to evalue) is reached in the
359  * evaluation, this method is called with the position and the
360  * properties of the point; @see iEvaluePosition
361  * @param objectPoint the object point in the order of true partobjects
362  * to evalue
363  * @param liVecProperties a list with the property vectors which should
364  * be global for the evalued object
365  * @return if the evalueation was successfull true, else false
366  */
367  virtual bool evalueObject( iEvaluePosition & evaluePosition,
368  const unsignedIntFib objectPoint,
369  list<cVectorProperty> & liVecProperties ) const;
370 
371  /**
372  * This method evaluades the Fib object.
373  * Evertime a Fib elements, with a type of the given type chars in
374  * liCFibElementTyps, is reached while evaluation, it is given
375  * back with the properties which it has.
376  * Ever pointelement is given back. The type chars for pointelements
377  * don't need to be in the list liCFibElementTyps.
378  *
379  * @param evalueFibElement a reference to the object with the
380  * evalueElement() method to evalue /store the Fib elements and ther
381  * properties; everytime a Fib element (with one of the type given
382  * in liCFibElementTyps) is reached in the evaluation, the method
383  * evalueElement() of this objects is called with the Fib element
384  * and the properties of the Fib element; @see iEvalueFibElement
385  * @param objectPoint the object point in the order of true partobjects
386  * to evalue
387  * @param liVecProperties a list with the property vectors which should
388  * be global for the evalued object
389  * @param liCFibElementTyps a list with the type chars (@see getType)
390  * of the Fib elements to return
391  * @return if the evalueation was successfull true, else false
392  */
393  virtual bool evalueObject( iEvalueFibElement & evalueFibElement,
394  const unsignedIntFib objectPoint,
395  list<cVectorProperty> & liVecProperties,
396  const list<char> & liCFibElementTyps );
397 
398  /**
399  * This method evaluades a value for the time needed to evalue the
400  * object.
401  * This value should not exceed lMaxTime, if the value for the time
402  * is greater than lMaxTime the evaluation will be stopt and lMaxTime
403  * returned. If lMaxTime is 0 (for infinity) the evaluation won't be
404  * stoped, this is the standard case.
405  *
406  * @see evalueObject()
407  * @param lMaxTime the maximum time for the evaluation, the returned
408  * exceed this value; the value 0 stands for infinity, so the
409  * evaluation won't be stoped
410  * @return a value for the time needed to evalue the object
411  */
412  virtual unsignedLongFib getTimeNeed( unsignedLongFib lMaxTime=0 ) const;
413 
414  /**
415  * This method evaluades the size of the Fib-object in bits in the
416  * compressed file form.
417  * The optionalpart field of root-elements will not be ignored.
418  *
419  * @see store()
420  * @return the size of the Fib-object in bits in the compressed form
421  */
422  virtual unsignedLongFib getCompressedSize() const;
423 
424  /**
425  * This method evaluades the size of the Fib-object in bits in the
426  * compressed file form.
427  *
428  * @see store()
429  * @param bWriteOptionalPart if true the size of the optionalpart is
430  * evalued, else it is ignored
431  * @return the size of the Fib-object in bits in the compressed form
432  */
433  virtual unsignedLongFib getCompressedSize( bool bWriteOptionalPart ) const;
434 
435  /**
436  * @return true if this Fib element is movebel else false
437  */
438  virtual bool isMovable() const;
439 
440 
441  /**
442  * This method copies the Fib-element on the specified position.
443  * Variables which are not defined in the Fib-element but used
444  * don't change ther reference.
445  *
446  * @see getType()
447  * @param cType the type of the Fib-element to copy
448  * @param elementPoint the number of the Fib-element, in the order of
449  * Fib-elements of the given type cType, to copy
450  * @param bAbsolute if the lNumber is an absolute value for the wool
451  * Fib object
452  * @return the copy of the Fib element
453  */
454  virtual cFibElement *copyElement( const char cType='u', const unsignedIntFib
455  elementPoint=0, bool bAbsolute=false ) const;
456 
457 #ifndef FEATURE_EQUAL_FIB_OBJECT
458 
459  /**
460  * This method checks if the given Fib-object is equal to this Fib
461  * -object.
462  * Variables can be others, but must be defined and used in equivalent
463  * Fib-elements.
464  *
465  * @param fibObject the Fib-object to which this Fib-object should be
466  * equal
467  * @return true if this Fib-object is equal to the given Fib-object,
468  * else false
469  */
470  virtual bool equal( const cFibElement & fibObject ) const;
471 
472  /**
473  * This method checks if the given Fib element is equal to this fib
474  * -element.
475  * The subobjects arn't compared, not even ther count is compared.
476  * Used variables can be others.
477  *
478  * @param fibElement the Fib element to which this Fib element should be
479  * equal
480  * @return true if this Fib element is equal to the given Fib object,
481  * else false
482  */
483  virtual bool equalElement( const cFibElement & fibElement ) const;
484 
485  /**
486  * This method checks if the given Fib-element sets the variable to
487  * the same values as this Fib element.
488  *
489  * @param variableOwn a pointer to a defined variable in this Fib element,
490  * it is compared to the equivalent variable fibElement in the given
491  * Fib element fibElement
492  * @param fibElement the Fib-element to which this Fib-element should be
493  * compared
494  * @param variable a pointer to a defined variable in the other
495  * Fib element fibElement
496  * @return true if this Fib-element sets the variable to the same
497  * values as this Fib element
498  */
499  virtual bool equalValuesSet( const cFibVariable * variableOwn,
500  const cFibElement & fibElement,
501  const cFibVariable * variable ) const;
502 
503 #endif //FEATURE_EQUAL_FIB_OBJECT
504 
505  /**
506  * This method stores this Fib-object in the XML -format into the
507  * given stream.
508  *
509  * @param stream the stream where this Fib-object should be stored to
510  * @return true if this Fib-object is stored, else false
511  */
512  virtual bool storeXml( ostream &stream ) const;
513 
514 
515  /**
516  * This method inserts the given Fib-element fibElement on the
517  * specified position. The replaced Fib-element will be the subobject
518  * of the inserted Fib-element fibElement.
519  *
520  * @see getNumberOfElement()
521  * @see getNumberOfElements()
522  * @see getType()
523  * @param cType the type of the Fib-element insted of which the given
524  * Fib-element fibElement should be inserted
525  * @param elementPoint the number of the Fib-element, in the order of
526  * Fib-elements of the given type cType, in which position the given
527  * Fib-element fibElement should be inserted; if 0 the given
528  * fibElement will be inserted under this Fib-element
529  * @param fibElement the Fib-element to insert
530  * @param bAbsolute if the lNumber is an absolute value for the wool
531  * Fib object
532  * @param bCheckVariables if true (standardvalue) it will be checked if
533  * the variables the Fib-element defines are needed, else the
534  * Fib-element will be removed even if its variables are needed elsewher
535  * @return true if the Fib-element fibElement was inserted, else false
536  */
537  virtual bool insertElement( cFibElement *fibElement, const char cType='u',
538  const unsignedIntFib elementPoint=0, bool bAbsolute=false,
539  bool bCheckVariables=true );
540 
541 
542  /**
543  * This method inserts the given Fib-object fibObject on the
544  * specified position. On the specified position a listelement will
545  * be inserted, with the old Fib-object and the given Fib-object
546  * fibObject as its subobjects.
547  *
548  * @see getNumberOfElement()
549  * @see getNumberOfElements()
550  * @see overwriteObjectWithObject()
551  * @see getType()
552  * @param cType the type of the Fib-element, on which position the
553  * given Fib-object fibObject should be inserted
554  * @param elementPoint the number of the Fib-element, in the order of
555  * Fib-elements of the given type cType, on which position the given
556  * Fib-object fibObject should be inserted
557  * @param fibObject the Fib-object to insert
558  * @param first if true, the inserted object will be the first
559  * subobject of the new listelement
560  * @param bAbsolute if the lNumber is an absolute value for the wool
561  * Fib object
562  * @return true if the Fib-object fibObject was inserted, else false
563  */
564  virtual bool insertObjectInElement( cFibElement *fibObject, const char cType='u',
565  const unsignedIntFib elementPoint=0, bool first=true,
566  bool bAbsolute=false );
567 
568  /**
569  * This method overwrites the Fib-object on specified position with
570  * the given Fib-object fibObject. The Fib-object on specified
571  * position will be replaced with the given Fib-object fibObject.
572  *
573  * @see getNumberOfElement()
574  * @see getNumberOfElements()
575  * @see insertObjectInElement()
576  * @see getType()
577  * @param cType the type of the Fib-element, on which position the
578  * given Fib-object fibObject should be inserted
579  * @param elementPoint the number of the Fib-element, in the order of
580  * Fib-elements of the given type cType, on which position the given
581  * Fib-object fibObject should be inserted
582  * @param fibObject the Fib-object to insert
583  * @param bDeleteOld if true, delete the old Fib-object from the memory
584  * @param bAbsolute if the elementPoint is an absolute value for the wool
585  * Fib object
586  * @return true if the old Fib-object was overwritten and the given
587  * Fib-object fibObject was inserted, else false
588  */
589  virtual bool overwriteObjectWithObject( cFibElement *fibObject, const char cType='u',
590  const unsignedIntFib elementPoint=0, bool bDeleteOld=true,
591  bool bAbsolute=false );
592 
593  /**
594  * This method cuts the Fib-element on the specified position.
595  * This works like removeElement(), except that the removed element is
596  * returned.
597  *
598  * @see isDeletableElement()
599  * @see removeElement()
600  * @see getType()
601  * @param cType the type of the Fib-element to cut
602  * @param elementPoint the number of the Fib-element, in the order of
603  * Fib-elements of the given type cType, to cut
604  * @param bAbsolute if the elementPoint is an absolute value for the wool
605  * Fib object
606  * @param bCheckVariables if true (standardvalue) it will be checked if
607  * the variables the Fib element defines are needed, else the
608  * Fib element will be removed even if its variables are needed elsewher
609  * @return the pointer to the cuted Fib-element or NULL, if the Fib
610  * -element couldn't cut
611  */
612  virtual cFibElement *cutElement( const char cType='u', const unsignedIntFib
613  elementPoint=0, bool bAbsolute=false, bool bCheckVariables=true );
614 
615  /**
616  * This method moves a Fib-limb -element (cFibLimb) on the specified
617  * position over iHowfar Fib-elements.
618  * Moving is stoped if an invalid Fib-object would result (e.g. no Fib
619  * -element can be moved over an Fib-elements that defines a variable
620  * the moved Fib-element uses).
621  * Moving an Fib-element into an listelement will result in an
622  * listelement with the moved element in everyone of it's subobjects.
623  *
624  * @see isDeletableElement()
625  * @see removeElement()
626  * @see getType()
627  * @param cType the type of the Fib-element to move
628  * @param elementPoint the number of the Fib-element, in the order of
629  * Fib-elements of the given type cType, to move
630  * @param iHowfar the number of Fib-elements over which the to move
631  * Fib-element should be moved; if this value is positiv the Fib
632  * -element will be moved over Fib-elements it contains else over
633  * Fib-elements it is contained in
634  * @param bAbsolute if the elementPoint is an absolute value for the wool
635  * Fib object
636  * @return the number of Fib-Elements over which the to move Fib
637  * -element was moved; if this value is positiv the Fib-element
638  * was moved over Fib-elements it contains else over Fib-elements
639  * it is contained in
640  */
641  virtual intFib moveLimbElement( const char cType='u', const unsignedIntFib
642  elementPoint=0, const intFib iHowfar=1, bool bAbsolute=false );
643 
644 
645  /**
646  * @see szDatabasePath
647  * @return a string to the actual set database path, the string is empty
648  * if no database path is set
649  */
650  static std::string getDatabasePath();
651 
652  /**
653  * This function sets the Fib database path to the given path if possible.
654  *
655  * @see szDatabasePath
656  * @param szInDatabasePath the path to the folder with the Fib database
657  * objects
658  * @return true if the given Fib database path exists and was set, else
659  * false and the database path is not changed
660  */
661  static bool setDatabasePath( const char * szInDatabasePath );
662 
663  /**
664  * This function sets the Fib database path to the given path if posible.
665  *
666  * @see szDatabasePath
667  * @param szInDatabasePath the path to the folder with the Fib database
668  * objects
669  * @return true if the given Fib database path exists and was set, else
670  * false and the database path is not changed
671  */
672  static bool setDatabasePath( const std::string szInDatabasePath );
673 
674 
675  /**
676  * This method returns the identifiers of all root-objects of this
677  * object.
678  *
679  * @return the identifiers of all root-objects of this object
680  */
681  virtual list<longFib> getAllRootObjectIdentifiers() const;
682 
683  /**
684  * This method returns the identifiers of all database objects, in the
685  * actual database.
686  *
687  * @return the identifiers of all database objects
688  */
689  virtual list<longFib> getAllDatabaseObjectIdentifiers() const;
690 
691  /**
692  * This method returns the root-object for the given identifier.
693  * If non such exists the Nullpoint NULL is returned.
694  *
695  * @param lIdentifier the identifier of the root-object to return
696  * @return the root-object for the given identifier or NULL if non
697  * such exists
698  */
699  virtual cRoot * getRootObject( longFib lIdentifier );
700 
701  /**
702  * This method returns the identifiers of all from this Fib-element
703  * accessible root-objects of this object.
704  *
705  * @return the identifiers of all accessible root-objects
706  */
707  virtual list<longFib> getAllAccessibleRootObjectIdentifiers() const;
708 
709  /**
710  * This method returns the from this Fib-element accessible root
711  * -object for the given identifier. If non such exists the Nullpoint
712  * NULL is returned.
713  *
714  * @param lIdentifier the identifier of the root-object to return
715  * @return the accessible root-object for the given identifier or NULL
716  * if non such exists
717  */
718  virtual cRoot * getAccessibleRootObject( longFib lIdentifier );
719 
720 
721  /**
722  * This method returns the domains that are valid for this Fib-element.
723  *
724  * @return the domains that are valid for this Fib-element
725  */
726  virtual cDomains getValidDomains() const;
727 
728  /**
729  * This method returns the domains that are valid for this Fib-element.
730  *
731  * @param bInherit if true just inherited domains of this root element will
732  * be returned else if false all domains will be returned
733  * @return the domains that are valid for this Fib-element
734  */
735  virtual cDomains getValidDomains( const bool bInherit ) const;
736 
737  /**
738  * This method returns the value domains that are valid for this
739  * Fib element.
740  * Just value domains are returned.
741  *
742  * @see getValidValueDomains()
743  * @see getValidDomains()
744  * @param bInherit if true just inherited domains of this root element will
745  * be returned else if false all domains will be returned
746  * @return the value domains that are valid for this Fib-element
747  */
748  cDomains getValidPureValueDomains( const bool bInherit = false ) const;
749 
750  /**
751  * This method returns the domains for value that are valid for this
752  * Fib element.
753  * Missing value domains are added from the (non value) domains.
754  *
755  * @see getValidPureValueDomains()
756  * @see getValidDomains()
757  * @return the value domains that are valid for this Fib-element
758  */
759  virtual cDomains getValidValueDomains() const;
760 
761  /**
762  * This method returns the number of dimensions in this
763  * Fib-Multimediaobject.
764  *
765  * @return the number of dimensions in
766  */
767  virtual unsignedIntFib getNumberOfDimensions() const;
768 
769  /**
770  * This method returns in which direction the iDimensionNumber dimension
771  * is mapped.
772  *
773  * @param iDimensionNumber the number of the dimension for which the
774  * mapping is to be returned
775  * @return the direction in which the iDimensionNumber dimension is
776  * mapped
777  */
778  virtual unsignedIntFib getDimensionMapping( unsignedIntFib iDimensionNumber ) const;
779 
780 
781 /*
782  * Root -element methods
783  */
784 
785  /**
786  * This method sets the main -Fib object to the given pInMainFibObject.
787  *
788  * @param pInMainFibObject a pointer to the main -Fib object to set
789  * @return true if the main -Fib object is set to pInMainFibObject, else false
790  */
791  bool setMainFibObject( cFibElement * pInMainFibObject );
792 
793  /**
794  * @return a pointer to the multimediainfo of this root-element
795  */
797 
798  /**
799  * @return a pointer to the optionalpart of this root-element or
800  * NULL if non such exists.
801  */
803 
804  /**
805  * @return a pointer to the domains of this root-element
806  */
807  cDomains * getDomains();
808 
809  /**
810  * @return a pointer to the compressed/ value domains of this
811  * root-element
812  */
814 
815  /**
816  * This method generates all domains, wich are needed to store this
817  * Fib-object.
818  * Most generated domains are added as value domains of this root-element.
819  *
820  * the generated domains are for the typs:
821  * - cTypeArea
822  * - cTypeUnderFunction
823  * - cTypeExtObject
824  * - cTypeExtSubobject (added as domains if wrong exists)
825  * - cTypeFibSet
826  * - cTypeFibMatrix
827  *
828  * @param bAddAllValueDomains if true all domains, which are added as value
829  * domains, are added without checking if they are needed
830  */
831  void generateNeededDomains( const bool bAddAllValueDomains = false );
832 
833  /**
834  * @return the count of input variables for the main Fib object of
835  * this root-object
836  */
838 
839  /**
840  * This method sets the number of input variables, the main Fib object
841  * of this root-object should have, to the given number. It will
842  * create or delete variables as necessary.
843  * Standardvalue of new varibles is the nullvalue of the standarddomain
844  * for input variables. Variables which are still in use can't be
845  * deleted. The delete process will beginn on the end of the input
846  * variablen list and stop if enght variables are deleted or an
847  * variable can't be deleted.
848  *
849  * @param uiNumberOfInputVariables the number of input variables the main
850  * Fib object of this root-object should have
851  * @return true if the number of input variables is set to the given
852  * value, else false
853  */
854  bool setNumberOfInputVariables( unsignedIntFib uiNumberOfInputVariables );
855 
856  /**
857  * @return a list with the input variables of this root-object.
858  */
859  list<cFibVariable*> getInputVariables();
860 
861  /**
862  * @param uiNumberOfInputVariable the number of the input variable to
863  * return
864  * @return the uiNumberOfInputVariable input variable of this root-object
865  */
866  cFibVariable * getInputVariable( unsignedIntFib uiNumberOfInputVariable );
867 
868  /**
869  * @param uiNumberOfInputVariable the number of the input variable for
870  * which the standardvalue is to be return
871  * @return the standardvalue of the uiNumberOfInputVariable
872  * input variable of this root-object
873  */
875  unsignedIntFib uiNumberOfInputVariable ) const;
876 
877  /**
878  * This Method sets the standardvalue of uiNumberOfInputVariable
879  * input variable.
880  *
881  * @param uiNumberOfInputVariable the number of the input variable for
882  * which the standardvalue is to be set
883  * @param dValue the value to which the standardvalue is to be set
884  * @return true if the standardvalue of the uiNumberOfInputVariable
885  * input variable of this root-object is set do dValue,
886  * else false
887  */
889  unsignedIntFib uiNumberOfInputVariable, doubleFib dValue );
890 
891 
892 
893  /**
894  * @return the count of extern subobjects this root-object has
895  */
897 
898  /**
899  * This method returns the number of output variables of the
900  * uiNumberOfExtSubobject'th extern subobject in this root-object, or
901  * 0 if the subobject dosn't exists.
902  *
903  * @param uiNumberOfExtSubobject the number of the subobject for which
904  * the number of output variables is to be returned
905  * @return the count of output variables of the uiNumberOfExtSubobject'th
906  * extern subobject in this root-object, or 0 if the
907  * subobject dosn't exists
908  */
910  unsignedIntFib uiNumberOfExtSubobject ) const;
911 
912 #ifndef FEATURE_EXT_SUBOBJECT_INPUT_VECTOR
913 
914  /**
915  * This method sets the number of the extern subobjects this
916  * root-object has to the given value uiNumberOfExternUnderObjects.
917  * It automaticly creates or delets extern subobjects to or from the
918  * end of the extern subobjectslist, till uiNumberOfExternUnderObjects
919  * subobjects exsists or the operation is not possible.
920  * Underobjects wich are still in use/ still exists in the main -fib
921  * -object of this root-object can't be deleted.
922  * The number of output variables of the created subobjects will be
923  * set to 0.
924  *
925  * @param uiNumberOfExternUnderObjects the number of extern
926  * subobjects this root-object should have
927  * @return true if the number of extern subobjects is set to
928  * uiNumberOfExternUnderObjects, else false
929  */
931  unsignedIntFib uiNumberOfExternUnderObjects );
932 
933  /**
934  * This method sets the number of output variables of the
935  * uiNumberOfUnderObject extern subobject in this root-object to
936  * the given value uiNumberOfVariables.
937  *
938  * @param uiNumberOfUnderObject the number of the subobject for which
939  * the number of output variables is to be set
940  * @param uiNumberOfVariables the number of output variables the
941  * uiNumberOfUnderObject subobject of this root-object should have
942  * @return true if the number of output variables of the
943  * uiNumberOfUnderObject subobject was set to uiNumberOfVariables,
944  * else false
945  */
947  unsignedIntFib uiNumberOfUnderObject,
948  unsignedIntFib uiNumberOfVariables );
949 
950 #endif //FEATURE_EXT_SUBOBJECT_INPUT_VECTOR
951 
952  /**
953  * This method checks the extern subobject of this root-object.
954  * It is checked if:
955  * - every subobject in main -Fib object of this root-object
956  * is also defined in the root-object
957  * - the number of output variables in the definition and the
958  * subobject Fib element(s) are the same
959  * - ever subobject which is defined in this root-object is used
960  * somewhere in the main -Fib object
961  *
962  * @param iErrorNumber a pointer to an integerfild, wher an errornumber
963  * can be stored; or NULL (standardvalue) if no errornumber should
964  * be given back
965  * possible errornumbers:
966  * - 0 no error, everything is OK
967  * - -1 no main -Fib object
968  * - -10 an subobject definition is missing
969  * - -11 different number of output variables
970  * - -12 not every defined subobject is used
971  * - -13 the numbers of the subobjects dosn't go from 1 till n
972  * @return the number of the first not correct extern subobject in
973  * this root-object or 0 if every subobject is OK
974  */
976  intFib * iErrorNumber=NULL );
977 
978  /**
979  * This method generates the extern subobject definitions for this
980  * root-object.
981  * possible errors which aborts the generation process:
982  * - the number of output variables in the the subobject
983  * Fib elements are not the same
984  * -the numbers of the subobjects dosn't go from 1 till n
985  *
986  * @param iErrorNumber a pointer to an integerfild, wher an errornumber
987  * can be stored; or NULL (standardvalue) if no errornumber should
988  * be given back
989  * possible errornumbers:
990  * - 0 no error, everything is OK
991  * - -1 no main -Fib object
992  * - -11 different number of output variables
993  * - -13 the numbers of the subobjects dosn't go from 1 till n
994  * @return the number of the first not correct extern subobject in
995  * this root-object or 0 if every subobject is OK
996  */
998  intFib * iErrorNumber=NULL );
999 
1000 
1001  /**
1002  * @return the count of sub -root-objects in this root-object
1003  */
1005 
1006  /**
1007  * This method returns the uiNumberOfUnderObject sub -root-object
1008  * of this root-element or the pair <0,NULL>, if non such exists.
1009  * The returned pair first element is the identifier of the sub -root
1010  * -object and the secound is a pointer to the sub -root-object.
1011  *
1012  * @param uiNumberOfUnderObject the number of the sub -root-object to
1013  * return
1014  * @return the uiNumberOfUnderObject't sub -root-objects of this
1015  * root-object as an (idenitifier, root-object -pointer) -pair or
1016  * the pair <0,NULL>, if non such exists
1017  */
1018  pair<longFib, cRoot*> getSubRootObject( unsignedIntFib uiNumberOfUnderObject );
1019 
1020 
1021  /**
1022  * This method returns the number of the sub -root-object with the
1023  * identifier lIdentifier in this root-element or 0 if non such exists.
1024  *
1025  * @param lIdentifier identifier of the sub -root-object for which
1026  * the number should be returned return
1027  * @return the number of the sub -root-object with the identifier
1028  * lIdentifier in this root-element or 0 if non such exists
1029  */
1030  unsignedIntFib getSubRootObjectNumber( longFib lIdentifier ) const;
1031 
1032  /**
1033  * This method returns the sub -root-object with the identifier
1034  * lIdentifier in this root-element or NULL if non such exists.
1035  *
1036  * @param lIdentifier identifier of the sub -root-object which
1037  * should be returned return
1038  * @return the sub -root-object with the identifier lIdentifier
1039  * in this root-element or NULL if non such exists
1040  */
1041  cRoot * getSubRootObjectForIdentifier( longFib lIdentifier );
1042 
1043  /**
1044  * This method adds the given root-object to the sub -root-object
1045  * -list of this root-element.
1046  * This will fail if:
1047  * - ther is no root-object (rootObject=NULL)
1048  * - the identifier lIdentifier is allready in use somewher in this
1049  * wool object
1050  *
1051  * @param lIdentifier the identifier the root-object should have
1052  * @param pRootObject a pointer to the root-object to add; the object
1053  * will not be copied, so don't delete it
1054  * @param uiPosition the position on which the root-object is to insert
1055  * in this root-element sub -object -list (counting begins with 1)
1056  * @return true if the root-object pRootObject was inserted, else false
1057  */
1058  bool addSubRootObject( longFib lIdentifier, cRoot * pRootObject,
1059  unsignedIntFib uiPosition=0 );
1060 
1061 
1062  /**
1063  * This method deletes the uiSubRootObjectNumber'th sub -root-object
1064  * in this root-element.
1065  *
1066  * @param uiSubRootObjectNumber the number of the sub -root-object in
1067  * the sub -root-object -list to delete
1068  * @param bDeleteOld if true the sub -root-object will be removed from
1069  * the memory, else yust the reference will be removed from this
1070  * root-element; default is true
1071  * @return true if the uiSubRootObjectNumber'th sub root-object was
1072  * deleted, else false
1073  */
1074  bool deleteSubRootObject( unsignedIntFib uiSubRootObjectNumber,
1075  bool bDeleteOld=true );
1076 
1077  /**
1078  * This method returns all identifiers of all sub -root-objects in
1079  * this root-element.
1080  *
1081  * @return all identifiers of all sub -root-objects in this root-element
1082  */
1083  list< longFib > getAllSubRootObjectIdentifiers() const;
1084 
1085 
1086  /**
1087  * @return a set with all database identifiers that are given in this
1088  * root-element as used database objects
1089  * @see setDatabaseIdentifiers
1090  */
1091  set< longFib > getUsedDatabaseIdentifiers() const;
1092 
1093  /**
1094  * This method adds the given database identifier to the used database
1095  * identifiers of this root-element.
1096  * @see setDatabaseIdentifiers
1097  *
1098  * @param lIdentifier the identifer of a database object to add as used
1099  * by this root-element
1100  */
1101  void addUsedDatabaseIdentifier( const longFib lIdentifier );
1102 
1103  /**
1104  * This method deletes the given database identifier from the used
1105  * database identifiers of this root-element.
1106  * @see setDatabaseIdentifiers
1107  *
1108  * @param lIdentifier the identifer of a database object to delete
1109  * @return true if the identifier was deleted, else false
1110  */
1111  bool deleteUsedDatabaseIdentifier( const longFib lIdentifier );
1112 
1113 
1114  /**
1115  * @return the checksumvektor of this root-element or NULL if no such
1116  * exists
1117  */
1119 
1120  /**
1121  * This method sets the checksumm for this root-element.
1122  * If no checksumvektor or a NULL -pointer is given, the checksum
1123  * property for this root-element is disabled.
1124  *
1125  * @param checksum the checksumvektor this root-element should have;
1126  * if NULL (standardvalue ) the checksum will be disabled for this
1127  * root-element
1128  */
1129  void setChecksum( const cVectorChecksum * checksum = NULL);
1130 
1131 
1132 protected:
1133 
1134  /**
1135  * This method stores this Fib-object in the compressed Fib-format
1136  * into the given stream.
1137  * It is needed becouse the stream can yust store byts but the size of
1138  * Fib elements can be any number of bits. Because of that ther have to
1139  * be a possibility to exchange the missing bits betwean the Fib elements.
1140  *
1141  * @see store
1142  * @param stream the stream where this Fib-object should be stored to
1143  * @param cRestBits the not yet writen bits which should be stored
1144  * @param uiRestBitPosition the number of bits in the cRestBits which
1145  * should be writen respectively containing valid information
1146  * @return true if this Fib-object is stored, else false
1147  */
1148  virtual bool storeBit( ostream & stream, char & cRestBits,
1149  unsigned char & uiRestBitPosition ) const;
1150 
1151  /**
1152  * This method stores this Fib-object in the compressed Fib-format
1153  * into the given stream.
1154  * It is needed becouse the stream can yust store byts but the size of
1155  * Fib elements can be any number of bits. Because of that ther have to
1156  * be a possibility to exchange the missing bits betwean the Fib elements.
1157  *
1158  * @see store
1159  * @param stream the stream where this Fib-object should be stored to
1160  * @param cRestBits the not yet writen bits which should be stored
1161  * @param uiRestBitPosition the number of bits in the cRestBits which
1162  * should be writen respectively containing valid information
1163  * @param bWriteOptionalPart if true the optionalpart is written
1164  * @return true if this Fib-object is stored, else false
1165  */
1166  virtual bool storeBit( ostream & stream, char & cRestBits,
1167  unsigned char & uiRestBitPosition, bool bWriteOptionalPart ) const;
1168 
1169 #ifdef FEATURE_FAST_UPDATE
1170 
1171  /**
1172  * This method cuts the connections of this Fib element to the
1173  * given Fib element.
1174  *
1175  * @param pFibElement the Fib element to which to cut the connection
1176  */
1177  virtual void cutConnectionsTo( const cFibElement * pFibElement );
1178 
1179  /**
1180  * This method updates the Fib element counters of all branchelements in
1181  * this branchelement.
1182  *
1183  * @return the numbers with which the Fib element counters wher updated
1184  */
1185  virtual cFibObjectCounts updateCounters();
1186 
1187 #endif //FEATURE_FAST_UPDATE
1188 
1189  /**
1190  * This method stores the actual variables of this root element, so
1191  * they can restored later.
1192  * This method also restores the variable values. Yust one set of values
1193  * can be stored.
1194  *
1195  * @param bStoreValues is true the variables values will be stored, else
1196  * the stored variables will be restored.
1197  */
1198  void backupVariablesValues( bool bStoreValues = true );
1199 
1200  /**
1201  * This method syncronises the subobjects of this cRoot -class with
1202  * the subobjectslist fibUnderObjects of the cFibBranch class.
1203  */
1204  void syncSubobjects();
1205 
1206  /**
1207  * This method returns the identifiers of all root-objects in the
1208  * direction down of this root-element.
1209  *
1210  * @see getAllRootObjectIdentifiers()
1211  * @return the identifiers of all root-objects in the direction down
1212  */
1213  list<longFib> getAllDownRootObjectIdentifiers() const;
1214 
1215  /**
1216  * This method returns the root-object in the direction down for the
1217  * given identifier.
1218  * If non such exists the Nullpoint NULL is returned.
1219  *
1220  * @param lIdentifier the identifier of the root-object to return
1221  * @return the root-object for the given identifier or NULL if non
1222  * such exists
1223  */
1224  cRoot * getRootObjectDown( longFib lIdentifier );
1225 
1226  /**
1227  * This method returns the identifiers of all from this Fib-element
1228  * accessible root-objects of this object.
1229  *
1230  * @param pRoot a pointer to the root element, for which the
1231  * root-elements should be accessible
1232  * @return the identifiers of all accessible root-objects
1233  */
1234  list<longFib> getAllAccessibleRootObjectIdentifiers( const cRoot *pRoot ) const;
1235 
1236  /**
1237  * This method returns the from this Fib-element accessible root
1238  * -object for the given identifier. If non such exists the Nullpoint
1239  * NULL is returned.
1240  *
1241  * @param pRoot a pointer to the root element, for which the
1242  * root-elements should be accessible
1243  * @param lIdentifier the identifier of the root-object to return
1244  * @return the accessible root-object for the given identifier or NULL
1245  * if non such exists
1246  */
1247  cRoot * getAccessibleRootObject( longFib lIdentifier, const cRoot *pRoot );
1248 
1249 
1250  /**
1251  * This method creates the propertytypelist, with the propertytypes in the
1252  * order they will be counted when stored.
1253  *
1254  * @see storeBit()
1255  * @see liStorePropertyOrder
1256  */
1257  bool createStorePropertyOrder();
1258 
1259  /**
1260  * This method evalues the bits needed to store a property type.
1261  *
1262  * @see storeBit()
1263  * @see storePropertyType()
1264  * @see createStorePropertyOrder()
1265  * @see liStorePropertyOrder
1266  */
1268 
1269  /**
1270  * This method stores the given propertytype in the compressed file format.
1271  *
1272  * @see restorePropertyType()
1273  * @see storeBit()
1274  * @see createStorePropertyOrder()
1275  * @see liStorePropertyOrder
1276  * @param stream the stream where this Fib-object should be stored to
1277  * @param cRestBits the not yet writen bits which should be stored
1278  * @param uiRestBitPosition the number of bits in the cRestBits which
1279  * should be writen respectively containing valid information
1280  * @param propertyType the propertytype to store
1281  * @return true if this Fib-object is stored, else false
1282  */
1283  bool storePropertyType( ostream & stream, char & cRestBits,
1284  unsigned char & uiRestBitPosition, const cTypeProperty & propertyType ) const;
1285 
1286  /**
1287  * This method restores a propertytype from a stream in the compressed file format.
1288  *
1289  * @see storePropertyType()
1290  * @see storeBit()
1291  * @see createStorePropertyOrder()
1292  * @see liStorePropertyOrder
1293  * @param iBitStream the stream where this propertytype is stored to in,
1294  * because this stream is an cReadBits, any number of bits can be
1295  * readed from it
1296  * @param outStatus An reference to an integervalue where the errorvalue
1297  * can be stored to. If the pointer is NULL no errorvalue will be
1298  * given back.
1299  * possible errorvalues are:
1300  * - 0 loading successful
1301  * - -1 loading error, invalid stream
1302  * - -2 loading error, invalid data in stream
1303  * - 1 loading warning, invalid data in stream, error could be corrected
1304  * - 2 loading warning, invalid data in stream, maybe the loaded
1305  * object is wrong
1306  * @return the restored property or the propertytype NONE if it couldn't be restored
1307  */
1308  cTypeProperty restorePropertyType( cReadBits & iBitStream, intFib & outStatus ) const;
1309 
1310 
1311  /**
1312  * This method exports the comment values into the optional part.
1313  * It also enumerates the comments.
1314  * This functionality is for compressed storing of an Fib object.
1315  * @see storeBit()
1316  * @see cRoot( cReadBits & iBitStream, intFib & outStatus, cRoot * pNextRoot )
1317  * @return a pointer to an optional part with the comments texts in it;
1318  * Beware: You have to delete it after usage
1319  */
1321 
1322  /**
1323  * This method removes all comment values from the optional part,
1324  * which wher stored ther for compressed storing.
1325  * It will also put the extracted comments into ther commentelements.
1326  * @see vecComments
1327  * @see getCommentValues()
1328  * @see storeBit()
1329  * @see cRoot( cReadBits & iBitStream, intFib & outStatus, cRoot * pNextRoot )
1330  */
1332 
1333 
1334  /**
1335  * This method copies the connected object with the given number in the
1336  * order of connected objects.
1337  * For this every Fib-element, beginning from this Fib-element, that
1338  * is part of the connected object will be copied.
1339  * Variables which are not defined in the connected object but used
1340  * don't change ther reference.
1341  * It is an helpmethod for the copy method. It dosn't update the
1342  * structural information of the created Fib object.
1343  *
1344  * @param iObjectPoint the number of the connected object to copy;
1345  * the standartvalue is 0 for coping the complet actual object
1346  * @return the copy of the connected object or NULL if non such exists
1347  */
1348  virtual cRoot * copyInternal( const unsignedIntFib iObjectPoint=0 ) const;
1349 
1350  /**
1351  * This method checks if the given variable is defined in the given
1352  * direction from this Fib-element.
1353  * This is for intern use to get the correct data from
1354  * isDefinedVariable() without pCallingFibElement.
1355  *
1356  * @see cFibVariable
1357  * @see isUsedVariable()
1358  * @param pVariable the variable to check if it is defined
1359  * @param direction the direction from this Fib-element, in which the
1360  * variable should be defined; standardvalue is ED_POSITION so yust
1361  * this Fib-element will be checked
1362  * @param pCallingFibElement the Fib-Element which called this method
1363  * @return true if the variable is used, else false
1364  */
1365  virtual bool isDefinedVariableInternal( const cFibVariable * pVariable,
1366  edDirection direction = ED_POSITION,
1367  const cFibElement * pCallingFibElement = NULL ) const;
1368 
1369  /**
1370  * This method returns all variables defined in the given direction from
1371  * this Fib-element.
1372  * This is for intern use to get the correct data from
1373  * getDefinedVariables() without pCallingFibElement..
1374  *
1375  * @see cFibVariable
1376  * @see getUsedVariables()
1377  * @see isDefinedVariable()
1378  * @param direction the direction from this Fib-element, in which the
1379  * variable should be used; standardvalue is ED_POSITION so yust
1380  * this Fib-element will be checked
1381  * @param pCallingFibElement the Fib-Element which called this method
1382  * @return the set with all variables used in the given direction from
1383  * this Fib-element
1384  */
1385  virtual list< cFibVariable* > getDefinedVariablesInternal(
1386  edDirection direction = ED_HIGHER,
1387  const cFibElement * pCallingFibElement = NULL );
1388 
1389 
1390  /**
1391  * This method returns the extern object element which calls /uses this
1392  * root-object.
1393  *
1394  * @see liPExtObjectElm
1395  * @see setCallingFibElement()
1396  * @see unsetCallingFibElement()
1397  * @see cExtObject
1398  * @see evalueObject()
1399  * @return extern object element which calls /uses this root-object
1400  * (if NULL non exists)
1401  */
1403 
1404  /**
1405  * This method sets the given extern object element as the element
1406  * which calls /uses this root-object.
1407  *
1408  * @see liPExtObjectElm
1409  * @see unsetCallingFibElement()
1410  * @see cExtObject
1411  * @see evalueObject()
1412  * @param pInExtObjectElm extern object element which calls /uses this
1413  * root-object (if NULL @see unsetCallingFibElement() will be called)
1414  */
1415  void setCallingFibElement( cExtObject * pInExtObjectElm );
1416 
1417  /**
1418  * This Method unsets the actual calling / using Fib-element.
1419  * @see liPExtObjectElm
1420  * @see setCallingFibElement()
1421  * @see evalueObject()
1422  */
1423  void unsetCallingFibElement();
1424 
1425 #ifdef FEATURE_EQUAL_FIB_OBJECT
1426 
1427  /**
1428  * This method checks if the given Fib-object is equal to this fib
1429  * -object.
1430  * Variables can be others, but must be defined and used in equivalent
1431  * Fib-elements.
1432  *
1433  * @param fibObject the Fib-object to which this Fib-object should be
1434  * equal
1435  * @param mapEqualRootObjects the root objects of this object that wher
1436  * already checked as equal
1437  * map entries:
1438  * key: the root-element of this Fib object that was checked
1439  * value: the to the key correspondending root-element of the
1440  * fibObject that was checked and which is equal to the key
1441  * root-element
1442  * (it is empty if bCheckExternalObjects == false)
1443  * @param mapEqualDefinedVariables the Fib elements that defines
1444  * variables and are equal;
1445  * map entries:
1446  * key: the Fib element of this Fib object that was checked
1447  * value: the to the key correspondending Fib element of the
1448  * fibObject that was checked and which sets its defined
1449  * variables to the same values as the key Fib element
1450  * @param bCheckExternalObjects if true the external objects of
1451  * cExtObject will be compared
1452  * @return true if this Fib-object is equal to the given Fib-object,
1453  * else false
1454  */
1455  virtual bool equalInternal( const cFibElement & fibObject,
1456  map< const cRoot *, const cRoot * > & mapEqualRootObjects,
1457  map< const cFibElement *, const cFibElement * > & mapEqualDefinedVariables,
1458  const bool bCheckExternalObjects ) const;
1459 
1460  /**
1461  * This method checks if the given Fib-element is equal to this fib
1462  * -element.
1463  * The subobjects arn't compared, not even ther count is compared.
1464  * Used variables can be others.
1465  *
1466  * @param fibElement the Fib-element to which this Fib-element should be
1467  * equal
1468  * @param mapEqualRootObjects the root objects of this object that wher
1469  * already checked as equal
1470  * map entries:
1471  * key: the root-element of this Fib object that was checked
1472  * value: the to the key correspondending root-element of the
1473  * fibObject that was checked and which is equal to the key
1474  * root-element
1475  * (it is empty if bCheckExternalObjects == false)
1476  * @param mapEqualDefinedVariables the Fib elements that defines
1477  * variables and are equal;
1478  * map entries:
1479  * key: the Fib element of this Fib object that was checked
1480  * value: the to the key correspondending Fib element of the
1481  * fibObject that was checked and which sets its defined
1482  * variables to the same values as the key Fib element
1483  * @param bCheckExternalObjects if true the external objects of
1484  * cExtObject will be compared
1485  * @return true if this Fib-element is equal to the given Fib-object,
1486  * else false
1487  */
1488  virtual bool equalElementInternal( const cFibElement & fibElement,
1489  map< const cRoot *, const cRoot * > & mapEqualRootObjects,
1490  map< const cFibElement *, const cFibElement * > & mapEqualDefinedVariables,
1491  const bool bCheckExternalObjects ) const;
1492 
1493 
1494  /**
1495  * This method checks if the given Fib-element sets the variable to
1496  * the same values as this Fib-element.
1497  *
1498  * @param variableOwn a pointer to a defined variable in this Fib-element,
1499  * it is compared to the equivalent variable fibElement in the given
1500  * Fib-element fibElement
1501  * @param fibElement the Fib-element to which this Fib-element should be
1502  * compared
1503  * @param variable a pointer to a defined variable in the other
1504  * Fib-element fibElement
1505  * @param mapEqualRootObjects the root objects of this object that wher
1506  * already checked as equal
1507  * map entries:
1508  * key: the root-element of this Fib object that was checked
1509  * value: the to the key correspondending root-element of the
1510  * fibObject that was checked and which is equal to the key
1511  * root-element
1512  * (it is empty if bCheckExternalObjects == false)
1513  * @param mapEqualDefinedVariables the Fib elements that defines
1514  * variables and are equal;
1515  * map entries:
1516  * key: the Fib element of this Fib object that was checked
1517  * value: the to the key correspondending Fib element of the
1518  * fibObject that was checked and which sets its defined
1519  * variables to the same values as the key Fib element
1520  * @param bCheckExternalObjects if true the external objects of
1521  * cExtObject will be compared
1522  * @return true if this Fib-element sets the variable to the same
1523  * values as this Fib-element
1524  */
1525  virtual bool equalValuesSetInternal( const cFibVariable * variableOwn,
1526  const cFibElement & fibElement,
1527  const cFibVariable * variable,
1528  map< const cRoot *, const cRoot * > & mapEqualRootObjects,
1529  map< const cFibElement *, const cFibElement * > & mapEqualDefinedVariables,
1530  const bool bCheckExternalObjects ) const;
1531 
1532 #endif //FEATURE_EQUAL_FIB_OBJECT
1533 
1534 };
1535 }//namespace fib
1536 
1537 #endif //___C_ROOT_H__
1538 
1539 
1540 
1541 
1542 
1543