]> git.mxchange.org Git - simgear.git/blobdiff - simgear/structure/SGExpression.hxx
Allow Command-manager singleton to be deleted.
[simgear.git] / simgear / structure / SGExpression.hxx
index c5ef8761ffbbca2e3773128fabb42fd89491c163..2cfa3dc8909d629959816210282535f3be13f37c 100644 (file)
@@ -26,7 +26,8 @@
 #include <vector>
 #include <functional>
 #include <set>
-   
+#include <string>
+
 #include <simgear/props/condition.hxx>
 #include <simgear/props/props.hxx>
 #include <simgear/math/interpolater.hxx>
@@ -900,6 +901,11 @@ typedef SGExpression<float> SGExpressionf;
 typedef SGExpression<double> SGExpressiond;
 typedef SGExpression<bool> SGExpressionb;
 
+typedef SGSharedPtr<SGExpressioni> SGExpressioni_ref;
+typedef SGSharedPtr<SGExpressionf> SGExpressionf_ref;
+typedef SGSharedPtr<SGExpressiond> SGExpressiond_ref;
+typedef SGSharedPtr<SGExpressionb> 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<VariableBinding> 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);
       }