|
FEDEM Model Database
R8.0
Source code of the FEDEM model database
|
Typedefs | |
| using | FmHeadMap = std::map< int, FmRingStart * > |
Functions | |
| void | init () |
| void | removeInstances () |
| void | initHeadMap (FmHeadMap &headMap, FmFuncTree *&funcTree) |
| void | sortHeadMap (const FmHeadMap &headMap, FmHeadMap &sortedHeadMap, bool reverse=false) |
| FmModelMemberBase * | createObject (int classTypeId) |
| FmMechanism * | newMechanism () |
| FmRingStart * | getHead (int classTypeID) |
| FmRingStart * | getHead (int classTypeID, const std::vector< int > &assemblyID, const FmHeadMap *root=NULL) |
| bool | findIDrange (const FmBase *obj, int &fromID, int &toID) |
| FmBase * | findID (int type, int IDnr, const std::vector< int > &assemblyID={}) |
| FmBase * | findID (const std::string &type, int IDnr, const std::vector< int > &assemblyID={}) |
| void | getAllPaths (std::vector< FFaField< std::string > * > &allPathNames, const FmSubAssembly *subAss=NULL) |
| void | translateRelativePaths (const std::string &oldModelPath, const std::string &newModelPath, const FmSubAssembly *subAss=NULL) |
| bool | purgeJointComponents () |
| bool | updateModelVersionOnSave (bool warnOnNewVersion) |
| bool | reportAll (std::ostream &os=std::cout, bool writeMetaData=true, const FmHeadMap *headMap=NULL, const char *metaData=NULL) |
| void | reportMembers (std::ostream &os, const FmHeadMap *headMap) |
| void | displayAll (const FmHeadMap *headMap=NULL) |
| bool | eraseAll (bool showProgress=false) |
| void | forAllInDB (FFaDynCB2< bool &, FmBase * > &toBeCalled4EachHead, FFaDynCB1< FmBase * > &toBeCalled4Each, const FmHeadMap *root=NULL) |
| int | getObjectCount (int type, const FmHeadMap *root=NULL) |
| void | getQuery (std::vector< FmModelMemberBase * > &toBeFilled, FmQuery *query) |
| bool | getAllOfType (std::vector< FmModelMemberBase * > &toBeFilled, int typeID, const FmSubAssembly *subAss=NULL, const char *tag=NULL) |
| bool | hasObjectsOfType (int typeID, const FmHeadMap *root=NULL) |
| void | getFEParts (std::vector< FmPart * > &toFill, bool reverseOrder=false) |
| void | getUnsavedParts (std::vector< FmPart * > &toFill) |
| void | getAllParts (std::vector< FmPart * > &toFill, const FmSubAssembly *subAss=NULL, bool thisLevelOnly=false) |
| void | getAllBeams (std::vector< FmBeam * > &toFill, const FmSubAssembly *subAss=NULL, bool thisLevelOnly=false) |
| void | getAllLinks (std::vector< FmLink * > &toFill, const FmSubAssembly *subAss=NULL, bool thisLevelOnly=false) |
| void | getAllTriads (std::vector< FmTriad * > &toFill, const FmSubAssembly *subAss=NULL, bool thisLevelOnly=false) |
| void | getAllFunctions (std::vector< FmMathFuncBase * > &toFill, const FmSubAssembly *subAss=NULL, bool thisLevelOnly=false) |
| void | getAllSplines (std::vector< FmfSpline * > &toFill) |
| void | getAllMultiVarFuncs (std::vector< FmfMultiVarBase * > &toFill) |
| void | getAllDeviceFunctions (std::vector< FmfDeviceFunction * > &toFill) |
| void | getAllJoints (std::vector< FmJointBase * > &toFill) |
| void | getAllHPs (std::vector< FmHPBase * > &toFill) |
| void | getAllGears (std::vector< FmGear * > &toFill) |
| void | getAllRackPinions (std::vector< FmRackPinion * > &toFill) |
| void | getAllCylJoints (std::vector< FmCylJoint * > &toFill) |
| void | getAllCamJoints (std::vector< FmCamJoint * > &toFill) |
| void | getAllRevJoints (std::vector< FmRevJoint * > &toFill) |
| void | getAllBallJoints (std::vector< FmBallJoint * > &toFill) |
| void | getAllFreeJoints (std::vector< FmFreeJoint * > &toFill) |
| void | getAllRigidJoints (std::vector< FmRigidJoint * > &toFill) |
| void | getAllPrismJoints (std::vector< FmPrismJoint * > &toFill) |
| void | getAllControlLines (std::vector< FmCtrlLine * > &toFill) |
| void | getAllLoads (std::vector< FmLoad * > &toFill) |
| void | getAllAxialSprings (std::vector< FmAxialSpring * > &toFill) |
| void | getAllJointSprings (std::vector< FmJointSpring * > &toFill) |
| void | getAllSpringChars (std::vector< FmSpringChar * > &toFill) |
| void | getAllAxialDampers (std::vector< FmAxialDamper * > &toFill) |
| void | getAllJointDampers (std::vector< FmJointDamper * > &toFill) |
| void | getAllSensors (std::vector< FmSensorBase * > &toFill) |
| void | getAllEngines (std::vector< FmEngine * > &engines) |
| void | getAllExternalCtrlSys (std::vector< FmExternalCtrlSys * > &toFill) |
| void | getAllRefPlanes (std::vector< FmRefPlane * > &toFill) |
| void | getAllStickers (std::vector< FmSticker * > &toFill) |
| void | getAllControlOutput (std::vector< FmcOutput * > &toFill) |
| void | getAllControlInput (std::vector< FmcInput * > &toFill) |
| void | getAllControlElements (std::vector< FmCtrlInputElementBase * > &toFill) |
| void | getAllBladeDesigns (std::vector< FmBladeDesign * > &toFill) |
| void | getAllSimulationEvents (std::vector< FmSimulationEvent * > &toFill, bool reverseOrder=false) |
| bool | readAll (const std::string &name, char ignoreFileVersion=0) |
| int | readFMF (std::istream &is) |
| void | unknownKeyword (const char *keyWord, const FmBase *obj) |
| FmGlobalViewSettings * | getActiveViewSettings (bool createIfNone=true) |
| FmAnalysis * | getActiveAnalysis (bool createIfNone=true) |
| FmModesOptions * | getModesOptions (bool createIfNone=true) |
| FmGageOptions * | getGageOptions (bool createIfNone=true) |
| FmFppOptions * | getFppOptions (bool createIfNone=true) |
| FmModelExpOptions * | getModelExportOptions (bool createIfNone=true) |
| FmVesselMotion * | getActiveRAO () |
| double | getPositionTolerance () |
| double | getParallelTolerance () |
| void | setParallelTolerance (double eps) |
| const FaVec3 & | getGrav () |
| void | drawGVector () |
| FaMat34 | getSeaCS () |
| bool | useSeaCS () |
| void | drawSea () |
| FmLink * | getEarthLink () |
| FmSensorBase * | getTimeSensor (bool createIfNone=true) |
| FmSeaState * | getSeaStateObject (bool createIfNone=true) |
| FmAirState * | getAirStateObject (bool createIfNone=true) |
| FmMechanism * | getMechanismObject (bool createIfNone=true) |
| FmTurbine * | getTurbineObject (int ID=0) |
| void | emergencyExitSave () |
| void | eraseAllStickers () |
| void | eraseAllControlObjects () |
| bool | hasObjects (int typeID, const FmHeadMap *root=NULL) |
| const FFaVersionNumber & | getModelFileVer () |
| const FmHeadMap * | getHeadMap (const FmSubAssembly *subAss=NULL) |
| FmSubAssembly * | getSubAssembly (const std::vector< int > &assemblyID) |
| FmModelMemberBase * | findObject (int baseID) |
| bool | insertInBaseIDMap (FmModelMemberBase *pt) |
| void | removeFromBaseIDMap (FmModelMemberBase *pt) |
| int | getFreeBaseID () |
| void | resolveObject (FmBase *obj) |
| void | initAfterResolveObject (FmBase *obj) |
| using FmDB::FmHeadMap = typedef std::map<int,FmRingStart*> |
| FmModelMemberBase * FmDB::createObject | ( | int | classTypeId | ) |
| void FmDB::displayAll | ( | const FmHeadMap * | headMap = NULL | ) |
| void FmDB::drawGVector | ( | ) |
| void FmDB::drawSea | ( | ) |
| void FmDB::emergencyExitSave | ( | ) |
| bool FmDB::eraseAll | ( | bool | showProgress = false | ) |
| void FmDB::eraseAllControlObjects | ( | ) |
| void FmDB::eraseAllStickers | ( | ) |
| FmBase * FmDB::findID | ( | const std::string & | type, |
| int | IDnr, | ||
| const std::vector< int > & | assemblyID = {} |
||
| ) |
| FmBase * FmDB::findID | ( | int | type, |
| int | IDnr, | ||
| const std::vector< int > & | assemblyID = {} |
||
| ) |
| bool FmDB::findIDrange | ( | const FmBase * | obj, |
| int & | fromID, | ||
| int & | toID | ||
| ) |
| FmModelMemberBase * FmDB::findObject | ( | int | baseID | ) |
| void FmDB::forAllInDB | ( | FFaDynCB2< bool &, FmBase * > & | toBeCalledForEachHead, |
| FFaDynCB1< FmBase * > & | toBeCalledForEach, | ||
| const FmHeadMap * | root = NULL |
||
| ) |
Traverses all the objects in the DB. For each group of objects toBeCalledForEachHead is called, and the CB is supposed to set the passed bool variable to false if the current group is not to be traversed.
Groups that do not contain any objects are ignored.
| FmAnalysis * FmDB::getActiveAnalysis | ( | bool | createIfNone = true | ) |
| FmVesselMotion * FmDB::getActiveRAO | ( | ) |
| FmGlobalViewSettings * FmDB::getActiveViewSettings | ( | bool | createIfNone = true | ) |
| FmAirState * FmDB::getAirStateObject | ( | bool | createIfNone = true | ) |
| void FmDB::getAllAxialDampers | ( | std::vector< FmAxialDamper * > & | toFill | ) |
| void FmDB::getAllAxialSprings | ( | std::vector< FmAxialSpring * > & | toFill | ) |
| void FmDB::getAllBallJoints | ( | std::vector< FmBallJoint * > & | toFill | ) |
| void FmDB::getAllBeams | ( | std::vector< FmBeam * > & | toFill, |
| const FmSubAssembly * | subAss = NULL, |
||
| bool | thisLevelOnly = false |
||
| ) |
| void FmDB::getAllBladeDesigns | ( | std::vector< FmBladeDesign * > & | toFill | ) |
| void FmDB::getAllCamJoints | ( | std::vector< FmCamJoint * > & | toFill | ) |
| void FmDB::getAllControlElements | ( | std::vector< FmCtrlInputElementBase * > & | toFill | ) |
| void FmDB::getAllControlInput | ( | std::vector< FmcInput * > & | toFill | ) |
| void FmDB::getAllControlLines | ( | std::vector< FmCtrlLine * > & | toFill | ) |
| void FmDB::getAllControlOutput | ( | std::vector< FmcOutput * > & | toFill | ) |
| void FmDB::getAllCylJoints | ( | std::vector< FmCylJoint * > & | toFill | ) |
| void FmDB::getAllDeviceFunctions | ( | std::vector< FmfDeviceFunction * > & | toFill | ) |
| void FmDB::getAllEngines | ( | std::vector< FmEngine * > & | engines | ) |
| void FmDB::getAllExternalCtrlSys | ( | std::vector< FmExternalCtrlSys * > & | toFill | ) |
| void FmDB::getAllFreeJoints | ( | std::vector< FmFreeJoint * > & | toFill | ) |
| void FmDB::getAllFunctions | ( | std::vector< FmMathFuncBase * > & | toFill, |
| const FmSubAssembly * | subAss = NULL, |
||
| bool | thisLevelOnly = false |
||
| ) |
| void FmDB::getAllGears | ( | std::vector< FmGear * > & | toFill | ) |
| void FmDB::getAllHPs | ( | std::vector< FmHPBase * > & | toFill | ) |
| void FmDB::getAllJointDampers | ( | std::vector< FmJointDamper * > & | toFill | ) |
| void FmDB::getAllJoints | ( | std::vector< FmJointBase * > & | toFill | ) |
| void FmDB::getAllJointSprings | ( | std::vector< FmJointSpring * > & | toFill | ) |
| void FmDB::getAllLinks | ( | std::vector< FmLink * > & | toFill, |
| const FmSubAssembly * | subAss = NULL, |
||
| bool | thisLevelOnly = false |
||
| ) |
| void FmDB::getAllLoads | ( | std::vector< FmLoad * > & | toFill | ) |
| void FmDB::getAllMultiVarFuncs | ( | std::vector< FmfMultiVarBase * > & | toFill | ) |
| bool FmDB::getAllOfType | ( | std::vector< FmModelMemberBase * > & | toBeFilled, |
| int | classTypeID, | ||
| const FmSubAssembly * | subAss = NULL, |
||
| const char * | tag = NULL |
||
| ) |
This fills a vector of all objects in the DB of requested type. The function returns false if no objects of the type queried for are found.
| void FmDB::getAllParts | ( | std::vector< FmPart * > & | toFill, |
| const FmSubAssembly * | subAss = NULL, |
||
| bool | thisLevelOnly = false |
||
| ) |
| void FmDB::getAllPaths | ( | std::vector< FFaField< std::string > * > & | allPathNames, |
| const FmSubAssembly * | subAss = NULL |
||
| ) |
Utility to collect all fields in the model containing a file path.
| void FmDB::getAllPrismJoints | ( | std::vector< FmPrismJoint * > & | toFill | ) |
| void FmDB::getAllRackPinions | ( | std::vector< FmRackPinion * > & | toFill | ) |
| void FmDB::getAllRefPlanes | ( | std::vector< FmRefPlane * > & | toFill | ) |
| void FmDB::getAllRevJoints | ( | std::vector< FmRevJoint * > & | toFill | ) |
| void FmDB::getAllRigidJoints | ( | std::vector< FmRigidJoint * > & | toFill | ) |
| void FmDB::getAllSensors | ( | std::vector< FmSensorBase * > & | toFill | ) |
| void FmDB::getAllSimulationEvents | ( | std::vector< FmSimulationEvent * > & | toFill, |
| bool | reverseOrder = false |
||
| ) |
| void FmDB::getAllSplines | ( | std::vector< FmfSpline * > & | toFill | ) |
| void FmDB::getAllSpringChars | ( | std::vector< FmSpringChar * > & | toFill | ) |
| void FmDB::getAllStickers | ( | std::vector< FmSticker * > & | toFill | ) |
| void FmDB::getAllTriads | ( | std::vector< FmTriad * > & | toFill, |
| const FmSubAssembly * | subAss = NULL, |
||
| bool | thisLevelOnly = false |
||
| ) |
| FmLink * FmDB::getEarthLink | ( | ) |
| void FmDB::getFEParts | ( | std::vector< FmPart * > & | toFill, |
| bool | reverseOrder = false |
||
| ) |
| FmFppOptions * FmDB::getFppOptions | ( | bool | createIfNone = true | ) |
| int FmDB::getFreeBaseID | ( | ) |
| FmGageOptions * FmDB::getGageOptions | ( | bool | createIfNone = true | ) |
| const FaVec3 & FmDB::getGrav | ( | ) |
| FmRingStart * FmDB::getHead | ( | int | classTypeID | ) |
| FmRingStart * FmDB::getHead | ( | int | classTypeID, |
| const std::vector< int > & | assemblyID, | ||
| const FmHeadMap * | root = NULL |
||
| ) |
| const FmHeadMap * FmDB::getHeadMap | ( | const FmSubAssembly * | subAss = NULL | ) |
| FmMechanism * FmDB::getMechanismObject | ( | bool | createIfNone = true | ) |
| FmModelExpOptions * FmDB::getModelExportOptions | ( | bool | createIfNone = true | ) |
| const FFaVersionNumber & FmDB::getModelFileVer | ( | ) |
| FmModesOptions * FmDB::getModesOptions | ( | bool | createIfNone = true | ) |
| int FmDB::getObjectCount | ( | int | type, |
| const FmHeadMap * | root = NULL |
||
| ) |
| double FmDB::getParallelTolerance | ( | ) |
| double FmDB::getPositionTolerance | ( | ) |
| void FmDB::getQuery | ( | std::vector< FmModelMemberBase * > & | toBeFilled, |
| FmQuery * | query | ||
| ) |
| FaMat34 FmDB::getSeaCS | ( | ) |
| FmSeaState * FmDB::getSeaStateObject | ( | bool | createIfNone = true | ) |
| FmSubAssembly * FmDB::getSubAssembly | ( | const std::vector< int > & | assemblyID | ) |
| FmSensorBase * FmDB::getTimeSensor | ( | bool | createIfNone = true | ) |
| FmTurbine * FmDB::getTurbineObject | ( | int | ID = 0 | ) |
| void FmDB::getUnsavedParts | ( | std::vector< FmPart * > & | toFill | ) |
| bool FmDB::hasObjects | ( | int | typeID, |
| const FmHeadMap * | root = NULL |
||
| ) |
| bool FmDB::hasObjectsOfType | ( | int | typeID, |
| const FmHeadMap * | root = NULL |
||
| ) |
| void FmDB::init | ( | ) |
| void FmDB::initAfterResolveObject | ( | FmBase * | obj | ) |
| void FmDB::initHeadMap | ( | FmHeadMap & | headMap, |
| FmFuncTree *& | funcTree | ||
| ) |
Initialization for headMap containing all entities in a model. The initialization creates one FmRingStart object for each type of object, and sets up a parent-child relationship if neccesary for use in the GUI.
The order of creation of the FmRingStart objects determines the "natural order" of DB objects, mainly used for the output order on the model file.
It is strongly advisable to add new objects at the end to keep diff'ing new and old model files as clean as possible.
| bool FmDB::insertInBaseIDMap | ( | FmModelMemberBase * | pt | ) |
| FmMechanism * FmDB::newMechanism | ( | ) |
| bool FmDB::purgeJointComponents | ( | ) |
Erase all joint dof spring, dampers, loads and motions that are not active. Typically invoked before a "Save", to reduce the size of the model file.
| bool FmDB::readAll | ( | const std::string & | name, |
| char | ignoreFileVersion = 0 |
||
| ) |
Reads the model file named name into the database.
First it does some checks on the file to find the version it was saved in. The version is kept in an FmDB-internal variable for further reference.
The model file version number is parsed through the following scheme: Files starting with "FEDEMMODELFILE" and something different from "{V.0.9b ASCII}" afterwards will have that text parsed into version number. Files starting with "FEDEMMODELFILE {V.0.9b ASCII}" and with "Module version:" in the second line, will have the text following "Module version:" parsed into version number. Files starting with "FEDEMMODELFILE {V.0.9b ASCII}", without "Module version:" in the second line but with "BASE_ID" within its first 1000 lines, are assumed to be of version 2.5 - 2.5m1 Files starting with "FEDEMMODELFILE {V.0.9b ASCII}", without "Module version:" in the second line and no "BASE_ID" within its first 1000 lines, are assumed to be of version 2.1.2
| int FmDB::readFMF | ( | std::istream & | is | ) |
| void FmDB::removeFromBaseIDMap | ( | FmModelMemberBase * | pt | ) |
| void FmDB::removeInstances | ( | ) |
This cleans up the heap-allocated singelton objects in FmDB which are not related to a mechanism model as such. Used mainly in test programs to verify no memory leaks, etc.
| bool FmDB::reportAll | ( | std::ostream & | os = std::cout, |
| bool | writeMetaData = true, |
||
| const FmHeadMap * | headMap = NULL, |
||
| const char * | metaData = NULL |
||
| ) |
| void FmDB::reportMembers | ( | std::ostream & | os, |
| const FmHeadMap * | headMap | ||
| ) |
| void FmDB::resolveObject | ( | FmBase * | obj | ) |
| void FmDB::setParallelTolerance | ( | double | eps | ) |
| void FmDB::sortHeadMap | ( | const FmHeadMap & | headMap, |
| FmHeadMap & | sortedHeadMap, | ||
| bool | reverse = false |
||
| ) |
| void FmDB::translateRelativePaths | ( | const std::string & | oldPath, |
| const std::string & | newPath, | ||
| const FmSubAssembly * | subAss = NULL |
||
| ) |
Utility to translate all relative paths in the model such that they are correct after saving, when changing the model file path of the model. Used by "Save As..." and "Export Digital Twin...".
| void FmDB::unknownKeyword | ( | const char * | keyWord, |
| const FmBase * | obj | ||
| ) |
| bool FmDB::updateModelVersionOnSave | ( | bool | warnOnNewVersion | ) |
| bool FmDB::useSeaCS | ( | ) |