54 #ifndef ___C_FIB_ELEMENT_H__
55 #define ___C_FIB_ELEMENT_H__
125 #ifndef FEATURE_FAST_UPDATE
151 #endif //FEATURE_FAST_UPDATE
154 #ifdef FEATURE_SIMPLE_CONSTRUCTOR
164 #else //FEATURE_SIMPLE_CONSTRUCTOR
180 #endif //FEATURE_SIMPLE_CONSTRUCTOR
218 virtual char getType()
const = 0;
229 static string getTypeName(
char cType );
236 virtual bool isValidFibElement()
const = 0;
247 #ifdef FEATURE_FAST_UPDATE
274 virtual cFibElement * getNextFibElement(
char cType ) = 0;
287 bool bAbsolute=
false )
const = 0;
302 bool bAbsolute=
false )
const = 0;
304 #else //FEATURE_FAST_UPDATE
323 virtual cFibElement * getNextFibElement(
char cType );
336 bool bAbsolute=
false )
const;
351 bool bAbsolute=
false )
const;
353 #endif //FEATURE_FAST_UPDATE
366 bool bAbsolute=
false );
381 bool bAbsolute=
false );
400 list<cFibElement*> getAllFibElements(
char cTypeBasis=
'u',
402 unsignedLongFib lNumberOfMaxReturnedElements=0,
bool bAbsolute=
false );
438 list<cVectorProperty> & liVecProperties )
const = 0;
463 const list<char> liCFibElementTyps = list<char>() );
490 list<cVectorProperty> & liVecProperties,
491 const list<char> & liCFibElementTyps ) = 0;
532 virtual bool isUsedVariable(
const cFibVariable *variable ,
561 virtual bool isDefinedVariable(
const cFibVariable *variable ,
591 bool variablesAreDefined(
const set<cFibVariable*> & setVariable ,
610 virtual bool replaceVariable(
cFibVariable *variableOld,
613 #ifdef FEATURE_FAST_UPDATE
628 virtual unsignedIntFib getNumberOfElement(
bool bOfType=
false )
const = 0;
639 #else //FEATURE_FAST_UPDATE
654 virtual unsignedIntFib getNumberOfElement(
bool bOfType=
false )
const;
665 #endif //FEATURE_FAST_UPDATE
689 virtual unsignedIntFib getNumberOfElements(
char cType=
'u' )
const = 0;
723 virtual unsignedIntFib typeElementPointToElementPoint(
const char cType,
743 virtual list<unsignedIntFib> elementPointToObjectPoints(
const char cType,
762 virtual list<unsignedIntFib> getObjectPointsForElement(
763 const cFibElement * pFibElement,
bool bAbsolute=
false )
const;
781 uiObjectPoint,
bool bAbsolute=
false )
const = 0;
805 virtual bool insertElement(
cFibElement *fibElement,
const char cType=
'u',
807 bool bCheckVariables=
true ) = 0;
831 virtual bool insertObjectInElement(
cFibElement *fibObject,
const char cType=
'u',
833 bool bAbsolute=
false ) = 0;
856 virtual bool overwriteObjectWithObject(
cFibElement *fibObject,
const char cType=
'u',
858 bool bAbsolute=
false ) = 0;
875 bool bDeleteOld=
true,
bool bAbsolute=
false ) = 0;
884 virtual bool hasUnderAllObjects()
const = 0;
905 virtual bool isRemovableElement(
const char cType=
'u',
const unsignedIntFib
906 elementPoint=0,
bool bAbsolute=
false,
bool bCheckVariables=
true )
const;
923 virtual bool removeElement(
const char cType=
'u',
const unsignedIntFib
924 elementPoint=0,
bool bAbsolute=
false,
bool bCheckVariables=
true );
946 elementPoint=0,
bool bAbsolute=
false,
bool bCheckVariables=
true ) = 0;
948 #ifdef FEATURE_FAST_UPDATE
955 virtual void deleteObject() = 0;
964 static void deleteObject(
cFibElement * fibObject );
966 #else //FEATURE_FAST_UPDATE
974 static void deleteObject(
cFibElement * fibObject );
975 #endif //FEATURE_FAST_UPDATE
980 virtual bool isMovable()
const;
1009 elementPoint=0,
const intFib iHowfar=1,
bool bAbsolute=
false ) = 0;
1047 elementPoint=0,
bool bAbsolute=
false )
const = 0;
1050 #ifdef FEATURE_EQUAL_FIB_OBJECT
1065 virtual bool equal(
const cFibElement & fibObject,
1066 const bool bCheckExternalObjects=
true )
const;
1081 virtual bool equalElement(
const cFibElement & fibElement,
1082 const bool bCheckExternalObjects=
true )
const;
1100 virtual bool equalValuesSet(
const cFibVariable * variableOwn,
1103 const bool bCheckExternalObjects=
true )
const;
1105 #else //FEATURE_EQUAL_FIB_OBJECT
1118 virtual bool equal(
const cFibElement & fibObject )
const = 0;
1131 virtual bool equalElement(
const cFibElement & fibElement )
const = 0;
1147 virtual bool equalValuesSet(
const cFibVariable * variableOwn,
1151 #endif //FEATURE_EQUAL_FIB_OBJECT
1160 virtual bool storeXml( ostream &stream )
const = 0;
1202 static cFibElement *restoreXml(
const TiXmlNode * pXmlNode,
intFib *outStatus=NULL );
1225 static cFibElement * restoreXml(
const TiXmlNode * pXmlNode,
1226 intFib &outStatus, list<cFibVariable*> & liDefinedVariables );
1236 virtual bool store( ostream &stream )
const;
1263 virtual cRoot * getSuperiorRootElement();
1269 virtual const cRoot * getSuperiorRootElement()
const;
1277 virtual list<longFib> getAllRootObjectIdentifiers()
const;
1285 virtual list<longFib> getAllDatabaseObjectIdentifiers()
const;
1303 virtual list<longFib> getAllAccessibleRootObjectIdentifiers()
const;
1314 virtual cRoot *getAccessibleRootObject(
longFib lIdentifier );
1321 virtual cDomains getValidDomains()
const;
1329 virtual cDomains getValidValueDomains()
const;
1354 virtual bool isBranch()
const;
1360 virtual bool isLimb()
const;
1366 virtual bool isLeaf()
const;
1371 #ifdef FEATURE_FAST_UPDATE
1388 const char cType )
const = 0;
1466 char cType,
longFib lNumber )
const = 0;
1468 #endif //FEATURE_FAST_UPDATE
1484 virtual bool storeBit( ostream & stream,
char & cRestBits,
1485 unsigned char & uiRestBitPosition )
const = 0;
1507 static cFibElement * restoreXmlInternal(
const TiXmlNode * pXmlNode,
1508 intFib &outStatus, list<cFibVariable*> & liDefinedVariables );
1535 cRoot * pNextRoot );
1565 list<cFibVariable*> & liDefinedVariables,
const cDomains & validDomains,
1566 cRoot * pNextRoot );
1568 #ifndef FEATURE_NO_REGISTER_NEW_FIB_
1582 virtual bool registerNewFibElement(
cFibElement *newFibElement,
1601 virtual bool registerNewFibObject(
cFibElement *newfibObject,
1603 unsignedIntFib uIUpperNumberOfFibElements,
bool bDirectionUp ) = 0;
1604 #endif //FEATURE_NO_REGISTER_NEW_FIB_
1613 virtual bool updateAllValues();
1616 #ifdef FEATURE_FAST_UPDATE
1624 virtual void cutConnectionsTo(
const cFibElement * pFibElement );
1657 virtual list<unsignedIntFib> elementPointToObjectPointsUp(
1661 #else //FEATURE_FAST_UPDATE
1725 virtual list<unsignedIntFib> elementPointToObjectPoints(
1729 #endif //FEATURE_FAST_UPDATE
1772 elementPoint = 0,
const unsignedIntFib uiHowfar=1,
bool bAbsolute=
false );
1804 virtual list<cFibElement*> getAllFibElementsFromPosition(
char cType,
1834 virtual bool isDefinedVariableInternal(
const cFibVariable * variable,
1836 const cFibElement * pCallingFibElement = NULL )
const = 0;
1854 virtual list< cFibVariable* > getDefinedVariablesInternal(
1856 const cFibElement * pCallingFibElement = NULL ) = 0;
1858 #ifdef FEATURE_EQUAL_FIB_OBJECT
1890 virtual bool equalInternal(
const cFibElement & fibObject,
1891 map< const cRoot *, const cRoot * > & mapEqualRootObjects,
1892 map< const cFibElement *, const cFibElement * > & mapEqualDefinedVariables,
1893 const bool bCheckExternalObjects )
const = 0;
1923 virtual bool equalElementInternal(
const cFibElement & fibElement,
1924 map< const cRoot *, const cRoot * > & mapEqualRootObjects,
1925 map< const cFibElement *, const cFibElement * > & mapEqualDefinedVariables,
1926 const bool bCheckExternalObjects )
const = 0;
1960 virtual bool equalValuesSetInternal(
const cFibVariable * variableOwn,
1963 map< const cRoot *, const cRoot * > & mapEqualRootObjects,
1964 map< const cFibElement *, const cFibElement * > & mapEqualDefinedVariables,
1965 const bool bCheckExternalObjects )
const;
1967 #endif //FEATURE_EQUAL_FIB_OBJECT