X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=src%2FNetwork%2Fprops.cxx;h=3504f99c8c75115730f0a0584e6e49310d05a8f4;hb=0aabc112b4f586f94365ccf1e906d6e4fb78dc10;hp=b0526c8ab254a9ec179b2e5cc3446530105e4916;hpb=4cc853e2a2d3f827516eb9ee8996e85100200c12;p=flightgear.git diff --git a/src/Network/props.cxx b/src/Network/props.cxx index b0526c8ab..3504f99c8 100644 --- a/src/Network/props.cxx +++ b/src/Network/props.cxx @@ -34,7 +34,7 @@ #include #include -#include STL_STRSTREAM +#include #include
#include
@@ -43,7 +43,7 @@ #include "props.hxx" -SG_USING_STD(strstream); +SG_USING_STD(stringstream); SG_USING_STD(ends); /** @@ -211,18 +211,18 @@ PropsChannel::foundTerminator() push( line.c_str() ); } } else if ( command == "dump" ) { - strstream buf; + stringstream buf; if ( tokens.size() <= 1 ) { writeProperties( buf, node ); buf << ends; // null terminate the string - push( buf.str() ); + push( buf.str().c_str() ); push( getTerminator() ); } else { SGPropertyNode *child = node->getNode( tokens[1].c_str() ); if ( child ) { writeProperties ( buf, child ); buf << ends; // null terminate the string - push( buf.str() ); + push( buf.str().c_str() ); push( getTerminator() ); } else { node_not_found_error( tokens[1] ); @@ -330,6 +330,14 @@ PropsChannel::foundTerminator() = args.getNode("subsystem", i-2, true); node->setStringValue( tokens[i].c_str() ); } + } else if ( tokens[1] == "set-sea-level-air-temp-degc" ) { + for ( unsigned int i = 2; i < tokens.size(); ++i ) { + cout << "props: set-sl command = " << tokens[i] + << endl; + SGPropertyNode *node + = args.getNode("temp-degc", i-2, true); + node->setStringValue( tokens[i].c_str() ); + } } else if ( tokens[1] == "set-outside-air-temp-degc" ) { for ( unsigned int i = 2; i < tokens.size(); ++i ) { cout << "props: set-oat command = " << tokens[i] @@ -476,6 +484,7 @@ FGProps::open() bool FGProps::close() { + SG_LOG( SG_IO, SG_INFO, "closing FGProps" ); return true; }