X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=src%2FMain%2Ffg_props.hxx;h=41772ff358345d94f66eeab7b8f9563e9f26d7ae;hb=0f9f0924121e680c68a1f6388d13a4c84ad1ded6;hp=8a53147c7395e18e9ffea06fcad40bab01de81bc;hpb=9409d5e35e7553f71568758be6500f776c2072c5;p=flightgear.git diff --git a/src/Main/fg_props.hxx b/src/Main/fg_props.hxx index 8a53147c7..41772ff35 100644 --- a/src/Main/fg_props.hxx +++ b/src/Main/fg_props.hxx @@ -6,14 +6,13 @@ #ifndef __FG_PROPS_HXX #define __FG_PROPS_HXX 1 -#include -#include -#include +#include + #include +#include -#include "globals.hxx" +#include
- //////////////////////////////////////////////////////////////////////// // Property management. //////////////////////////////////////////////////////////////////////// @@ -42,7 +41,7 @@ public: * just the ones flagged as archivable. * @return true if the flight was saved successfully. */ -extern bool fgSaveFlight (ostream &output, bool write_all = false); +extern bool fgSaveFlight (std::ostream &output, bool write_all = false); /** @@ -54,7 +53,7 @@ extern bool fgSaveFlight (ostream &output, bool write_all = false); * @param input The input stream to read the XML from. * @return true if the flight was restored successfully. */ -extern bool fgLoadFlight (istream &input); +extern bool fgLoadFlight (std::istream &input); /** @@ -69,7 +68,7 @@ extern bool fgLoadFlight (istream &input); * otherwise. */ extern bool fgLoadProps (const char * path, SGPropertyNode * props, - bool in_fg_root = true); + bool in_fg_root = true, int default_mode = 0); @@ -532,5 +531,18 @@ fgTie (const char * name, T * obj, int index, } +class FGMakeUpperCase : public SGPropertyChangeListener { +public: + void valueChanged(SGPropertyNode *node) { + if (node->getType() != simgear::props::STRING) + return; + + char *s = const_cast(node->getStringValue()); + for (; *s; s++) + *s = toupper(*s); + } +}; + + #endif // __FG_PROPS_HXX