From a8cdb9d0fe7a6f9e065142f7372901f91e3c13ce Mon Sep 17 00:00:00 2001
From: Stephen Roderick <kiwi.net@mac.com>
Date: Sat, 23 Apr 2011 08:01:18 -0400
Subject: [PATCH 2/5] scripting: Cope with boost v1.46 namespace changes

---
 src/scripting/ProgramGraphParser.cpp  |    4 ++--
 src/scripting/ProgramGraphParser2.cpp |    6 +++---
 src/scripting/StateGraphParser.cpp    |    9 ++++-----
 src/scripting/ValueChangeParser.cpp   |    3 +--
 4 files changed, 10 insertions(+), 12 deletions(-)

diff --git a/src/scripting/ProgramGraphParser.cpp b/src/scripting/ProgramGraphParser.cpp
index 355f0e0..ce97a15 100644
--- a/src/scripting/ProgramGraphParser.cpp
+++ b/src/scripting/ProgramGraphParser.cpp
@@ -49,7 +49,7 @@
 
 namespace RTT
 {
-  using namespace boost;
+  using boost::bind;
   using namespace detail;
 
 
@@ -342,7 +342,7 @@ namespace RTT
       // Fake a 'return' statement at the last line.
       program_builder->returnFunction( new ConditionTrue, mpositer.get_position().line - ln_offset );
       program_builder->proceedToNext( mpositer.get_position().line - ln_offset );
-      shared_ptr<ProgramInterface> mfunc = program_builder->endFunction( mpositer.get_position().line - ln_offset );
+      boost::shared_ptr<ProgramInterface> mfunc = program_builder->endFunction( mpositer.get_position().line - ln_offset );
 
       // export the function in the context's interface.
       if (exportf) {
diff --git a/src/scripting/ProgramGraphParser2.cpp b/src/scripting/ProgramGraphParser2.cpp
index d93123a..155a100 100644
--- a/src/scripting/ProgramGraphParser2.cpp
+++ b/src/scripting/ProgramGraphParser2.cpp
@@ -44,7 +44,7 @@
 
 namespace RTT
 {
-  using namespace boost;
+  using boost::bind;
   using namespace detail;
 
     namespace {
@@ -119,8 +119,8 @@ namespace RTT
         str_p( "if" )
             >> condition
             >> expect_then( str_p("then") )
-            >> (callpart | returnpart | continuepart)[lambda::var(commonparser.skipeol) = false]
-            >> commonparser.eos[lambda::var(commonparser.skipeol) = true];
+            >> (callpart | returnpart | continuepart)[boost::lambda::var(commonparser.skipeol) = false]
+            >> commonparser.eos[boost::lambda::var(commonparser.skipeol) = true];
 
     continuepart = str_p("continue")[ bind( &ProgramGraphParser::seencontinue, this)];
 
diff --git a/src/scripting/StateGraphParser.cpp b/src/scripting/StateGraphParser.cpp
index 4de62dd..fca682a 100644
--- a/src/scripting/StateGraphParser.cpp
+++ b/src/scripting/StateGraphParser.cpp
@@ -58,7 +58,6 @@
 
 namespace RTT
 {
-    using namespace boost;
     using namespace detail;
     using boost::bind;
 
@@ -172,7 +171,7 @@ namespace RTT
         // Zero or more declarations and Zero or more states
         statemachinecontent = *( varline | state | transitions | transition);
 
-        varline = vardec[lambda::var(commonparser->skipeol) = false] >> commonparser->eos[lambda::var(commonparser->skipeol) = true];
+        varline = vardec[boost::lambda::var(commonparser->skipeol) = false] >> commonparser->eos[boost::lambda::var(commonparser->skipeol) = true];
 
         vardec = subMachinedecl | machinememvar | machineparam;
 
@@ -223,7 +222,7 @@ namespace RTT
             | transitions
             | transition
             | exit
-            | (machinememvar[lambda::var(commonparser->skipeol) = false] >> commonparser->eos[lambda::var(commonparser->skipeol) = true]);
+            | (machinememvar[boost::lambda::var(commonparser->skipeol) = false] >> commonparser->eos[boost::lambda::var(commonparser->skipeol) = true]);
 
         precondition = str_p( "precondition")
             >> conditionparser->parser()[ bind( &StateGraphParser::seenprecondition, this)] ;
@@ -298,8 +297,8 @@ namespace RTT
 
         selector =  str_p( "select" ) >> expect_select_ident(( commonparser->identifier[ bind( &StateGraphParser::seenselect, this, _1, _2) ]
                                            >> *("or" >> commonparser->identifier[ bind( &StateGraphParser::seenselect, this, _1, _2) ])
-                                          )[lambda::var(commonparser->skipeol) = false]
-                                                       >> commonparser->eos[lambda::var(commonparser->skipeol) = true]);
+                                          )[boost::lambda::var(commonparser->skipeol) = false]
+                                                       >> commonparser->eos[boost::lambda::var(commonparser->skipeol) = true]);
 
     }
 
diff --git a/src/scripting/ValueChangeParser.cpp b/src/scripting/ValueChangeParser.cpp
index 2268218..7f6ebc7 100644
--- a/src/scripting/ValueChangeParser.cpp
+++ b/src/scripting/ValueChangeParser.cpp
@@ -47,11 +47,10 @@
 namespace RTT
 {
     using namespace detail;
+    using boost::bind;
 
     using namespace std;
 
-    using namespace boost;;
-
     namespace {
         assertion<std::string> expect_open("Open brace expected.");
         assertion<std::string> expect_close("Closing brace expected (or could not find out what this line means).");
-- 
1.7.4.4

