]> git.mxchange.org Git - flightgear.git/blob - src/Main/fg_props.cxx
Merge branch 'jt/runway' into next
[flightgear.git] / src / Main / fg_props.cxx
1 // fg_props.cxx -- support for FlightGear properties.
2 //
3 // Written by David Megginson, started 2000.
4 //
5 // Copyright (C) 2000, 2001 David Megginson - david@megginson.com
6 //
7 // This program is free software; you can redistribute it and/or
8 // modify it under the terms of the GNU General Public License as
9 // published by the Free Software Foundation; either version 2 of the
10 // License, or (at your option) any later version.
11 //
12 // This program is distributed in the hope that it will be useful, but
13 // WITHOUT ANY WARRANTY; without even the implied warranty of
14 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
15 // General Public License for more details.
16 //
17 // You should have received a copy of the GNU General Public License
18 // along with this program; if not, write to the Free Software
19 // Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
20 //
21 // $Id$
22
23 #ifdef HAVE_CONFIG_H
24 #  include "config.h"
25 #endif
26
27 #include <simgear/compiler.h>
28 #include <simgear/structure/exception.hxx>
29 #include <simgear/props/props_io.hxx>
30
31 #include <simgear/magvar/magvar.hxx>
32 #include <simgear/timing/sg_time.hxx>
33 #include <simgear/misc/sg_path.hxx>
34 #include <simgear/sound/soundmgr_openal.hxx>
35
36 #include <Aircraft/aircraft.hxx>
37 #include <FDM/flight.hxx>
38 #include <GUI/gui.h>
39
40 #include "globals.hxx"
41 #include "fg_props.hxx"
42
43
44 static bool winding_ccw = true; // FIXME: temporary
45
46 static bool fdm_data_logging = false; // FIXME: temporary
47
48 static bool frozen = false;     // FIXME: temporary
49
50 using std::string;
51 \f
52 ////////////////////////////////////////////////////////////////////////
53 // Default property bindings (not yet handled by any module).
54 ////////////////////////////////////////////////////////////////////////
55
56 struct LogClassMapping {
57   sgDebugClass c;
58   string name;
59   LogClassMapping(sgDebugClass cc, string nname) { c = cc; name = nname; }
60 };
61
62 LogClassMapping log_class_mappings [] = {
63   LogClassMapping(SG_NONE, "none"),
64   LogClassMapping(SG_TERRAIN, "terrain"),
65   LogClassMapping(SG_ASTRO, "astro"),
66   LogClassMapping(SG_FLIGHT, "flight"),
67   LogClassMapping(SG_INPUT, "input"),
68   LogClassMapping(SG_GL, "gl"),
69   LogClassMapping(SG_VIEW, "view"),
70   LogClassMapping(SG_COCKPIT, "cockpit"),
71   LogClassMapping(SG_GENERAL, "general"),
72   LogClassMapping(SG_MATH, "math"),
73   LogClassMapping(SG_EVENT, "event"),
74   LogClassMapping(SG_AIRCRAFT, "aircraft"),
75   LogClassMapping(SG_AUTOPILOT, "autopilot"),
76   LogClassMapping(SG_IO, "io"),
77   LogClassMapping(SG_CLIPPER, "clipper"),
78   LogClassMapping(SG_NETWORK, "network"),
79   LogClassMapping(SG_INSTR, "instrumentation"),
80   LogClassMapping(SG_SYSTEMS, "systems"),
81   LogClassMapping(SG_UNDEFD, "")
82 };
83
84
85 /**
86  * Get the logging classes.
87  */
88 static const char *
89 getLoggingClasses ()
90 {
91   sgDebugClass classes = logbuf::get_log_classes();
92   static string result;
93   result = "";
94   for (int i = 0; log_class_mappings[i].c != SG_UNDEFD; i++) {
95     if ((classes&log_class_mappings[i].c) > 0) {
96       if (!result.empty())
97         result += '|';
98       result += log_class_mappings[i].name;
99     }
100   }
101   return result.c_str();
102 }
103
104
105 static void
106 addLoggingClass (const string &name)
107 {
108   sgDebugClass classes = logbuf::get_log_classes();
109   for (int i = 0; log_class_mappings[i].c != SG_UNDEFD; i++) {
110     if (name == log_class_mappings[i].name) {
111       logbuf::set_log_classes(sgDebugClass(classes|log_class_mappings[i].c));
112       return;
113     }
114   }
115   SG_LOG(SG_GENERAL, SG_WARN, "Unknown logging class: " << name);
116 }
117
118
119 /**
120  * Set the logging classes.
121  */
122 static void
123 setLoggingClasses (const char * c)
124 {
125   string classes = c;
126   logbuf::set_log_classes(SG_NONE);
127
128   if (classes == "none") {
129     SG_LOG(SG_GENERAL, SG_INFO, "Disabled all logging classes");
130     return;
131   }
132
133   if (classes.empty() || classes == "all") { // default
134     logbuf::set_log_classes(SG_ALL);
135     SG_LOG(SG_GENERAL, SG_INFO, "Enabled all logging classes: "
136            << getLoggingClasses());
137     return;
138   }
139
140   string rest = classes;
141   string name = "";
142   int sep = rest.find('|');
143   while (sep > 0) {
144     name = rest.substr(0, sep);
145     rest = rest.substr(sep+1);
146     addLoggingClass(name);
147     sep = rest.find('|');
148   }
149   addLoggingClass(rest);
150   SG_LOG(SG_GENERAL, SG_INFO, "Set logging classes to "
151          << getLoggingClasses());
152 }
153
154
155 /**
156  * Get the logging priority.
157  */
158 static const char *
159 getLoggingPriority ()
160 {
161   switch (logbuf::get_log_priority()) {
162   case SG_BULK:
163     return "bulk";
164   case SG_DEBUG:
165     return "debug";
166   case SG_INFO:
167     return "info";
168   case SG_WARN:
169     return "warn";
170   case SG_ALERT:
171     return "alert";
172   default:
173     SG_LOG(SG_GENERAL, SG_WARN, "Internal: Unknown logging priority number: "
174            << logbuf::get_log_priority());
175     return "unknown";
176   }
177 }
178
179
180 /**
181  * Set the logging priority.
182  */
183 static void
184 setLoggingPriority (const char * p)
185 {
186   if (p == 0)
187       return;
188   string priority = p;
189   if (priority == "bulk") {
190     logbuf::set_log_priority(SG_BULK);
191   } else if (priority == "debug") {
192     logbuf::set_log_priority(SG_DEBUG);
193   } else if (priority.empty() || priority == "info") { // default
194     logbuf::set_log_priority(SG_INFO);
195   } else if (priority == "warn") {
196     logbuf::set_log_priority(SG_WARN);
197   } else if (priority == "alert") {
198     logbuf::set_log_priority(SG_ALERT);
199   } else {
200     SG_LOG(SG_GENERAL, SG_WARN, "Unknown logging priority " << priority);
201   }
202   SG_LOG(SG_GENERAL, SG_DEBUG, "Logging priority is " << getLoggingPriority());
203 }
204
205
206 /**
207  * Return the current frozen state.
208  */
209 static bool
210 getFreeze ()
211 {
212   return frozen;
213 }
214
215
216 /**
217  * Set the current frozen state.
218  */
219 static void
220 setFreeze (bool f)
221 {
222     frozen = f;
223
224     // Stop sound on a pause
225     SGSoundMgr *s = globals->get_soundmgr();
226     if ( s != NULL ) {
227         if ( f ) {
228             s->pause();
229         } else if (!fgGetBool("/sim/sound/pause")) {
230             s->resume();
231         }
232     }
233 }
234
235
236 /**
237  * Return the number of milliseconds elapsed since simulation started.
238  */
239 static double
240 getElapsedTime_sec ()
241 {
242   return globals->get_sim_time_sec();
243 }
244
245
246 /**
247  * Return the current Zulu time.
248  */
249 static const char *
250 getDateString ()
251 {
252   static char buf[64];          // FIXME
253   struct tm * t = globals->get_time_params()->getGmt();
254   sprintf(buf, "%.4d-%.2d-%.2dT%.2d:%.2d:%.2d",
255           t->tm_year + 1900, t->tm_mon + 1, t->tm_mday,
256           t->tm_hour, t->tm_min, t->tm_sec);
257   return buf;
258 }
259
260
261 /**
262  * Set the current Zulu time.
263  */
264 static void
265 setDateString (const char * date_string)
266 {
267   static const SGPropertyNode *cur_time_override
268         = fgGetNode("/sim/time/cur-time-override", true);
269
270   SGTime * st = globals->get_time_params();
271   struct tm * current_time = st->getGmt();
272   struct tm new_time;
273
274                                 // Scan for basic ISO format
275                                 // YYYY-MM-DDTHH:MM:SS
276   int ret = sscanf(date_string, "%d-%d-%dT%d:%d:%d",
277                    &(new_time.tm_year), &(new_time.tm_mon),
278                    &(new_time.tm_mday), &(new_time.tm_hour),
279                    &(new_time.tm_min), &(new_time.tm_sec));
280
281                                 // Be pretty picky about this, so
282                                 // that strange things don't happen
283                                 // if the save file has been edited
284                                 // by hand.
285   if (ret != 6) {
286     SG_LOG(SG_INPUT, SG_WARN, "Date/time string " << date_string
287            << " not in YYYY-MM-DDTHH:MM:SS format; skipped");
288     return;
289   }
290
291                                 // OK, it looks like we got six
292                                 // values, one way or another.
293   new_time.tm_year -= 1900;
294   new_time.tm_mon -= 1;
295
296                                 // Now, tell flight gear to use
297                                 // the new time.  This was far
298                                 // too difficult, by the way.
299   long int warp =
300     mktime(&new_time) - mktime(current_time) + globals->get_warp();
301   double lon = current_aircraft.fdm_state->get_Longitude();
302   double lat = current_aircraft.fdm_state->get_Latitude();
303   globals->set_warp(warp);
304   st->update(lon, lat, cur_time_override->getLongValue(), warp);
305 }
306
307 /**
308  * Return the GMT as a string.
309  */
310 static const char *
311 getGMTString ()
312 {
313   static char buf[16];
314   struct tm *t = globals->get_time_params()->getGmt();
315   snprintf(buf, 16, "%.2d:%.2d:%.2d",
316       t->tm_hour, t->tm_min, t->tm_sec);
317   return buf;
318 }
319
320 /**
321  * Return the magnetic variation
322  */
323 static double
324 getMagVar ()
325 {
326   return globals->get_mag()->get_magvar() * SGD_RADIANS_TO_DEGREES;
327 }
328
329
330 /**
331  * Return the magnetic dip
332  */
333 static double
334 getMagDip ()
335 {
336   return globals->get_mag()->get_magdip() * SGD_RADIANS_TO_DEGREES;
337 }
338
339
340 /**
341  * Return the current heading in degrees.
342  */
343 static double
344 getHeadingMag ()
345 {
346   double magheading;
347   magheading = current_aircraft.fdm_state->get_Psi() * SGD_RADIANS_TO_DEGREES - getMagVar();
348   if (magheading < 0) magheading += 360;
349   return magheading;
350 }
351
352 static long
353 getWarp ()
354 {
355   return globals->get_warp();
356 }
357
358 static void
359 setWarp (long warp)
360 {
361   globals->set_warp(warp);
362 }
363
364 static long
365 getWarpDelta ()
366 {
367   return globals->get_warp_delta();
368 }
369
370 static void
371 setWarpDelta (long delta)
372 {
373   globals->set_warp_delta(delta);
374 }
375
376 static bool
377 getWindingCCW ()
378 {
379   return winding_ccw;
380 }
381
382 static void
383 setWindingCCW (bool state)
384 {
385   winding_ccw = state;
386   if ( winding_ccw )
387     glFrontFace ( GL_CCW );
388   else
389     glFrontFace ( GL_CW );
390 }
391
392 static bool
393 getFDMDataLogging ()
394 {
395   return fdm_data_logging;
396 }
397
398 static void
399 setFDMDataLogging (bool state)
400 {
401                                 // kludge; no getter or setter available
402   if (state != fdm_data_logging) {
403     fgToggleFDMdataLogging();
404     fdm_data_logging = state;
405   }
406 }
407
408 static const char *
409 getLongitudeString ()
410 {
411   static SGConstPropertyNode_ptr n = fgGetNode("/position/longitude-deg", true);
412   static SGConstPropertyNode_ptr f = fgGetNode("/sim/lon-lat-format", true);
413   static char buf[32];
414   double d = n->getDoubleValue();
415   int format = f->getIntValue();
416   char c = d < 0.0 ? 'W' : 'E';
417
418   if (format == 0) {
419     snprintf(buf, 32, "%3.6f%c", d, c);
420
421   } else if (format == 1) {
422     // dd mm.mmm' (DMM-Format) -- uses a round-off factor tailored to the
423     // required precision of the minutes field (three decimal places),
424     // preventing minute values of 60.
425     double deg = fabs(d) + 5.0E-4 / 60.0;
426     double min = fabs(deg - int(deg)) * 60.0 - 4.999E-4;
427     snprintf(buf, 32, "%d*%06.3f%c", int(d < 0.0 ? -deg : deg), min, c);
428
429   } else {
430     // mm'ss.s'' (DMS-Format) -- uses a round-off factor tailored to the
431     // required precision of the seconds field (one decimal place),
432     // preventing second values of 60.
433     double deg = fabs(d) + 0.05 / 3600.0;
434     double min = (deg - int(deg)) * 60.0;
435     double sec = (min - int(min)) * 60.0 - 0.049;
436     snprintf(buf, 32, "%d*%02d %04.1f%c", int(d < 0.0 ? -deg : deg),
437         int(min), fabs(sec), c);
438   }
439   buf[31] = '\0';
440   return buf;
441 }
442
443 static const char *
444 getLatitudeString ()
445 {
446   static SGConstPropertyNode_ptr n = fgGetNode("/position/latitude-deg", true);
447   static SGConstPropertyNode_ptr f = fgGetNode("/sim/lon-lat-format", true);
448   static char buf[32];
449   double d = n->getDoubleValue();
450   int format = f->getIntValue();
451   char c = d < 0.0 ? 'S' : 'N';
452
453   if (format == 0) {
454     snprintf(buf, 32, "%3.6f%c", d, c);
455
456   } else if (format == 1) {
457     double deg = fabs(d) + 5.0E-4 / 60.0;
458     double min = fabs(deg - int(deg)) * 60.0 - 4.999E-4;
459     snprintf(buf, 32, "%d*%06.3f%c", int(d < 0.0 ? -deg : deg), min, c);
460
461   } else {
462     double deg = fabs(d) + 0.05 / 3600.0;
463     double min = (deg - int(deg)) * 60.0;
464     double sec = (min - int(min)) * 60.0 - 0.049;
465     snprintf(buf, 32, "%d*%02d %04.1f%c", int(d < 0.0 ? -deg : deg),
466         int(min), fabs(sec), c);
467   }
468   buf[31] = '\0';
469   return buf;
470 }
471
472
473
474 \f
475 ////////////////////////////////////////////////////////////////////////
476 // Tie the properties.
477 ////////////////////////////////////////////////////////////////////////
478
479 FGProperties::FGProperties ()
480 {
481 }
482
483 FGProperties::~FGProperties ()
484 {
485 }
486
487 void
488 FGProperties::init ()
489 {
490 }
491
492 void
493 FGProperties::bind ()
494 {
495                                 // Simulation
496   fgTie("/sim/logging/priority", getLoggingPriority, setLoggingPriority);
497   fgTie("/sim/logging/classes", getLoggingClasses, setLoggingClasses);
498   fgTie("/sim/freeze/master", getFreeze, setFreeze);
499
500   fgTie("/sim/time/elapsed-sec", getElapsedTime_sec);
501   fgTie("/sim/time/gmt", getDateString, setDateString);
502   fgSetArchivable("/sim/time/gmt");
503   fgTie("/sim/time/gmt-string", getGMTString);
504
505                                 // Position
506   fgTie("/position/latitude-string", getLatitudeString);
507   fgTie("/position/longitude-string", getLongitudeString);
508
509                                 // Orientation
510   fgTie("/orientation/heading-magnetic-deg", getHeadingMag);
511
512   fgTie("/environment/magnetic-variation-deg", getMagVar);
513   fgTie("/environment/magnetic-dip-deg", getMagDip);
514
515   fgTie("/sim/time/warp", getWarp, setWarp, false);
516   fgTie("/sim/time/warp-delta", getWarpDelta, setWarpDelta);
517
518                                 // Misc. Temporary junk.
519   fgTie("/sim/temp/winding-ccw", getWindingCCW, setWindingCCW, false);
520   fgTie("/sim/temp/fdm-data-logging", getFDMDataLogging, setFDMDataLogging);
521 }
522
523 void
524 FGProperties::unbind ()
525 {
526                                 // Simulation
527   fgUntie("/sim/logging/priority");
528   fgUntie("/sim/logging/classes");
529   fgUntie("/sim/freeze/master");
530
531   fgUntie("/sim/time/elapsed-sec");
532   fgUntie("/sim/time/gmt");
533   fgUntie("/sim/time/gmt-string");
534                                 // Position
535   fgUntie("/position/latitude-string");
536   fgUntie("/position/longitude-string");
537
538                                 // Orientation
539   fgUntie("/orientation/heading-magnetic-deg");
540
541                                 // Environment
542   fgUntie("/environment/magnetic-variation-deg");
543   fgUntie("/environment/magnetic-dip-deg");
544
545   fgUntie("/sim/time/warp");
546   fgUntie("/sim/time/warp-delta");
547
548                                 // Misc. Temporary junk.
549   fgUntie("/sim/temp/winding-ccw");
550   fgUntie("/sim/temp/full-screen");
551   fgUntie("/sim/temp/fdm-data-logging");
552 }
553
554 void
555 FGProperties::update (double dt)
556 {
557                                 // Date and time
558     struct tm *t = globals->get_time_params()->getGmt();
559
560     fgSetInt("/sim/time/utc/year", t->tm_year + 1900);
561     fgSetInt("/sim/time/utc/month", t->tm_mon + 1);
562     fgSetInt("/sim/time/utc/day", t->tm_mday);
563     fgSetInt("/sim/time/utc/hour", t->tm_hour);
564     fgSetInt("/sim/time/utc/minute", t->tm_min);
565     fgSetInt("/sim/time/utc/second", t->tm_sec);
566
567     fgSetDouble("/sim/time/utc/day-seconds",
568                 t->tm_hour * 3600 +
569                 t->tm_min * 60 +
570                 t->tm_sec);
571
572     fgSetInt("/sim/time/local-offset",
573              globals->get_time_params()->get_local_offset());
574 }
575
576
577 \f
578 ////////////////////////////////////////////////////////////////////////
579 // Save and restore.
580 ////////////////////////////////////////////////////////////////////////
581
582
583 /**
584  * Save the current state of the simulator to a stream.
585  */
586 bool
587 fgSaveFlight (std::ostream &output, bool write_all)
588 {
589
590   fgSetBool("/sim/presets/onground", false);
591   fgSetArchivable("/sim/presets/onground");
592   fgSetBool("/sim/presets/trim", false);
593   fgSetArchivable("/sim/presets/trim");
594   fgSetString("/sim/presets/speed-set", "UVW");
595   fgSetArchivable("/sim/presets/speed-set");
596
597   try {
598     writeProperties(output, globals->get_props(), write_all);
599   } catch (const sg_exception &e) {
600     guiErrorMessage("Error saving flight: ", e);
601     return false;
602   }
603   return true;
604 }
605
606
607 /**
608  * Restore the current state of the simulator from a stream.
609  */
610 bool
611 fgLoadFlight (std::istream &input)
612 {
613   SGPropertyNode props;
614   try {
615     readProperties(input, &props);
616   } catch (const sg_exception &e) {
617     guiErrorMessage("Error reading saved flight: ", e);
618     return false;
619   }
620
621   fgSetBool("/sim/presets/onground", false);
622   fgSetBool("/sim/presets/trim", false);
623   fgSetString("/sim/presets/speed-set", "UVW");
624
625   copyProperties(&props, globals->get_props());
626   // When loading a flight, make it the
627   // new initial state.
628   globals->saveInitialState();
629   return true;
630 }
631
632
633 bool
634 fgLoadProps (const char * path, SGPropertyNode * props, bool in_fg_root, int default_mode)
635 {
636     string fullpath;
637     if (in_fg_root) {
638         SGPath loadpath(globals->get_fg_root());
639         loadpath.append(path);
640         fullpath = loadpath.str();
641     } else {
642         fullpath = path;
643     }
644
645     try {
646         readProperties(fullpath, props, default_mode);
647     } catch (const sg_exception &e) {
648         guiErrorMessage("Error reading properties: ", e);
649         return false;
650     }
651     return true;
652 }
653
654
655 \f
656 ////////////////////////////////////////////////////////////////////////
657 // Property convenience functions.
658 ////////////////////////////////////////////////////////////////////////
659
660 SGPropertyNode *
661 fgGetNode (const char * path, bool create)
662 {
663   return globals->get_props()->getNode(path, create);
664 }
665
666 SGPropertyNode * 
667 fgGetNode (const char * path, int index, bool create)
668 {
669   return globals->get_props()->getNode(path, index, create);
670 }
671
672 bool
673 fgHasNode (const char * path)
674 {
675   return (fgGetNode(path, false) != 0);
676 }
677
678 void
679 fgAddChangeListener (SGPropertyChangeListener * listener, const char * path)
680 {
681   fgGetNode(path, true)->addChangeListener(listener);
682 }
683
684 void
685 fgAddChangeListener (SGPropertyChangeListener * listener,
686                      const char * path, int index)
687 {
688   fgGetNode(path, index, true)->addChangeListener(listener);
689 }
690
691 bool
692 fgGetBool (const char * name, bool defaultValue)
693 {
694   return globals->get_props()->getBoolValue(name, defaultValue);
695 }
696
697 int
698 fgGetInt (const char * name, int defaultValue)
699 {
700   return globals->get_props()->getIntValue(name, defaultValue);
701 }
702
703 int
704 fgGetLong (const char * name, long defaultValue)
705 {
706   return globals->get_props()->getLongValue(name, defaultValue);
707 }
708
709 float
710 fgGetFloat (const char * name, float defaultValue)
711 {
712   return globals->get_props()->getFloatValue(name, defaultValue);
713 }
714
715 double
716 fgGetDouble (const char * name, double defaultValue)
717 {
718   return globals->get_props()->getDoubleValue(name, defaultValue);
719 }
720
721 const char *
722 fgGetString (const char * name, const char * defaultValue)
723 {
724   return globals->get_props()->getStringValue(name, defaultValue);
725 }
726
727 bool
728 fgSetBool (const char * name, bool val)
729 {
730   return globals->get_props()->setBoolValue(name, val);
731 }
732
733 bool
734 fgSetInt (const char * name, int val)
735 {
736   return globals->get_props()->setIntValue(name, val);
737 }
738
739 bool
740 fgSetLong (const char * name, long val)
741 {
742   return globals->get_props()->setLongValue(name, val);
743 }
744
745 bool
746 fgSetFloat (const char * name, float val)
747 {
748   return globals->get_props()->setFloatValue(name, val);
749 }
750
751 bool
752 fgSetDouble (const char * name, double val)
753 {
754   return globals->get_props()->setDoubleValue(name, val);
755 }
756
757 bool
758 fgSetString (const char * name, const char * val)
759 {
760   return globals->get_props()->setStringValue(name, val);
761 }
762
763 void
764 fgSetArchivable (const char * name, bool state)
765 {
766   SGPropertyNode * node = globals->get_props()->getNode(name);
767   if (node == 0)
768     SG_LOG(SG_GENERAL, SG_DEBUG,
769            "Attempt to set archive flag for non-existant property "
770            << name);
771   else
772     node->setAttribute(SGPropertyNode::ARCHIVE, state);
773 }
774
775 void
776 fgSetReadable (const char * name, bool state)
777 {
778   SGPropertyNode * node = globals->get_props()->getNode(name);
779   if (node == 0)
780     SG_LOG(SG_GENERAL, SG_DEBUG,
781            "Attempt to set read flag for non-existant property "
782            << name);
783   else
784     node->setAttribute(SGPropertyNode::READ, state);
785 }
786
787 void
788 fgSetWritable (const char * name, bool state)
789 {
790   SGPropertyNode * node = globals->get_props()->getNode(name);
791   if (node == 0)
792     SG_LOG(SG_GENERAL, SG_DEBUG,
793            "Attempt to set write flag for non-existant property "
794            << name);
795   else
796     node->setAttribute(SGPropertyNode::WRITE, state);
797 }
798
799 void
800 fgUntie (const char * name)
801 {
802   if (!globals->get_props()->untie(name))
803     SG_LOG(SG_GENERAL, SG_WARN, "Failed to untie property " << name);
804 }
805
806
807 // end of fg_props.cxx