X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=simgear%2Fstructure%2FSGExpression.hxx;h=2cfa3dc8909d629959816210282535f3be13f37c;hb=10375086ed794770fcb97591ec19c60c0fcdaff1;hp=c5ef8761ffbbca2e3773128fabb42fd89491c163;hpb=1a5467aec86437001faf009310c54c2b2a7851a6;p=simgear.git diff --git a/simgear/structure/SGExpression.hxx b/simgear/structure/SGExpression.hxx index c5ef8761..2cfa3dc8 100644 --- a/simgear/structure/SGExpression.hxx +++ b/simgear/structure/SGExpression.hxx @@ -26,7 +26,8 @@ #include #include #include - +#include + #include #include #include @@ -900,6 +901,11 @@ typedef SGExpression SGExpressionf; typedef SGExpression SGExpressiond; typedef SGExpression SGExpressionb; +typedef SGSharedPtr SGExpressioni_ref; +typedef SGSharedPtr SGExpressionf_ref; +typedef SGSharedPtr SGExpressiond_ref; +typedef SGSharedPtr SGExpressionb_ref; + /** * Global function to make an expression out of properties. @@ -944,7 +950,7 @@ namespace simgear { struct ParseError : public sg_exception { - ParseError(const string& message = std::string()) + ParseError(const std::string& message = std::string()) : sg_exception(message) {} }; @@ -1009,7 +1015,7 @@ namespace simgear { public: size_t addBinding(const std::string& name, expression::Type type); - bool findBinding(const string& name, VariableBinding& result) const; + bool findBinding(const std::string& name, VariableBinding& result) const; std::vector bindings; }; @@ -1026,7 +1032,7 @@ namespace simgear ParserMap& map = getParserMap(); ParserMap::iterator itr = map.find(exp->getName()); if (itr == map.end()) - throw ParseError(string("unknown expression ") + exp->getName()); + throw ParseError(std::string("unknown expression ") + exp->getName()); exp_parser parser = itr->second; return (*parser)(exp, this); }