]> git.mxchange.org Git - flightgear.git/blobdiff - src/FDM/JSBSim/FGPropertyManager.cpp
Latest JSBSim updates -- includes fix for control surface animations.
[flightgear.git] / src / FDM / JSBSim / FGPropertyManager.cpp
index 1253d6d2d03884684fd6bbfb1801a7305c02c753..2a33172ad2bf63423a85031ea5baf403031c3912 100644 (file)
@@ -102,6 +102,32 @@ string FGPropertyManager::GetName( void ) {
   return string( getName() );
 }  
 
+//%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+
+string FGPropertyManager::GetFullyQualifiedName(void) {
+    vector<string> stack;
+    stack.push_back( getDisplayName(true) );
+    SGPropertyNode* tmpn=getParent();
+    bool atroot=false;
+    while( !atroot ) {
+     stack.push_back( tmpn->getDisplayName(true) );
+     if( !tmpn->getParent() ) 
+      atroot=true;
+     else 
+      tmpn=tmpn->getParent();
+    }
+    
+    string fqname="";
+    for(unsigned i=stack.size()-1;i>0;i--) {
+      fqname+= stack[i];
+      fqname+= "/";
+    }
+    fqname+= stack[0];
+    return fqname;  
+       
+}    
+    
+    
 //%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 
 bool FGPropertyManager::GetBool (const string &name, bool defaultValue)