[nemiver/console: 8/11] Use vector of UString for argv of commands



commit 1a52e3f936d67ac5aa468a83c4565e5fc6ba27dd
Author: Fabien Parent <parent f gmail com>
Date:   Fri Mar 2 17:32:11 2012 +0100

    Use vector of UString for argv of commands

 src/common/nmv-console.cc        |    2 +-
 src/common/nmv-console.h         |    6 +++---
 src/dbgengine/nmv-dbg-console.cc |   31 +++++++++++++++----------------
 3 files changed, 19 insertions(+), 20 deletions(-)
---
diff --git a/src/common/nmv-console.cc b/src/common/nmv-console.cc
index 319d78e..6233073 100644
--- a/src/common/nmv-console.cc
+++ b/src/common/nmv-console.cc
@@ -295,7 +295,7 @@ struct Console::Priv {
     execute_command (char *a_buffer)
     {
         std::string command_name;
-        std::vector<std::string> cmd_argv;
+        std::vector<UString> cmd_argv;
 
         std::istringstream is (a_buffer);
         is >> command_name;
diff --git a/src/common/nmv-console.h b/src/common/nmv-console.h
index 0ac41cf..c215728 100644
--- a/src/common/nmv-console.h
+++ b/src/common/nmv-console.h
@@ -76,10 +76,10 @@ public:
         {
         }
 
-        virtual void execute (const std::vector<std::string> &a_argv,
+        virtual void execute (const std::vector<UString> &a_argv,
                               Stream &a_output) = 0;
 
-        virtual void operator() (const std::vector<std::string> &a_argv,
+        virtual void operator() (const std::vector<UString> &a_argv,
                          Stream &a_output)
         {
             execute (a_argv, a_output);
@@ -92,7 +92,7 @@ public:
 
     typedef Command AsynchronousCommand;
     struct SynchronousCommand : public Command{
-        virtual void operator() (const std::vector<std::string> &a_argv,
+        virtual void operator() (const std::vector<UString> &a_argv,
                          Stream &a_output)
         {
             execute (a_argv, a_output);
diff --git a/src/dbgengine/nmv-dbg-console.cc b/src/dbgengine/nmv-dbg-console.cc
index 55d094e..cb0ac29 100644
--- a/src/dbgengine/nmv-dbg-console.cc
+++ b/src/dbgengine/nmv-dbg-console.cc
@@ -75,7 +75,7 @@ struct CommandContinue : public Console::SynchronousCommand {
     }
 
     void
-    execute (const std::vector<std::string>&, Console::Stream&)
+    execute (const std::vector<UString>&, Console::Stream&)
     {
         debugger.do_continue ();
     }
@@ -108,7 +108,7 @@ struct CommandNext : public Console::SynchronousCommand {
     }
 
     void
-    execute (const std::vector<std::string>&, Console::Stream&)
+    execute (const std::vector<UString>&, Console::Stream&)
     {
         debugger.step_over ();
     }
@@ -141,8 +141,7 @@ struct CommandStep : public Console::SynchronousCommand {
     }
 
     void
-    execute (const std::vector<std::string>&,
-             Console::Stream&)
+    execute (const std::vector<UString>&, Console::Stream&)
     {
         debugger.step_in ();
     }
@@ -175,7 +174,7 @@ struct CommandNexti : public Console::SynchronousCommand {
     }
 
     void
-    execute (const std::vector<std::string>&, Console::Stream&)
+    execute (const std::vector<UString>&, Console::Stream&)
     {
         debugger.step_over_asm ();
     }
@@ -208,7 +207,7 @@ struct CommandStepi : public Console::SynchronousCommand {
     }
 
     void
-    execute (const std::vector<std::string>&, Console::Stream&)
+    execute (const std::vector<UString>&, Console::Stream&)
     {
         debugger.step_in_asm ();
     }
@@ -230,7 +229,7 @@ struct CommandStop : public Console::SynchronousCommand {
     }
 
     void
-    execute (const std::vector<std::string>&, Console::Stream&)
+    execute (const std::vector<UString>&, Console::Stream&)
     {
         debugger.stop_target ();
     }
@@ -252,7 +251,7 @@ struct CommandFinish : public Console::SynchronousCommand {
     }
 
     void
-    execute (const std::vector<std::string>&, Console::Stream&)
+    execute (const std::vector<UString>&, Console::Stream&)
     {
         debugger.step_out ();
     }
@@ -275,13 +274,13 @@ struct CommandCall : public Console::SynchronousCommand {
     }
 
     void
-    execute (const std::vector<std::string> &a_argv, Console::Stream &a_stream)
+    execute (const std::vector<UString> &a_argv, Console::Stream &a_stream)
     {
         if (a_argv.size ()) {
             cmd.clear ();
         }
 
-        for (std::vector<std::string>::const_iterator iter = a_argv.begin ();
+        for (std::vector<UString>::const_iterator iter = a_argv.begin ();
              iter != a_argv.end ();
              ++iter) {
             cmd += *iter;
@@ -356,7 +355,7 @@ struct CommandThread : public Console::AsynchronousCommand {
     }
 
     void
-    execute (const std::vector<std::string> &a_argv, Console::Stream &a_stream)
+    execute (const std::vector<UString> &a_argv, Console::Stream &a_stream)
     {
         if (a_argv.size () > 1) {
             a_stream << "Too much parameters.\n";
@@ -420,7 +419,7 @@ struct CommandBreak : public Console::SynchronousCommand {
     }
 
     void
-    execute (const std::vector<std::string> &a_argv, Console::Stream &a_stream)
+    execute (const std::vector<UString> &a_argv, Console::Stream &a_stream)
     {
         IDebugger::Frame &frame = dbg_data.current_frame;
         IDebugger &debugger = dbg_data.debugger;
@@ -501,13 +500,13 @@ struct CommandPrint : public Console::AsynchronousCommand {
     }
 
     void
-    execute (const std::vector<std::string> &a_argv, Console::Stream &a_stream)
+    execute (const std::vector<UString> &a_argv, Console::Stream &a_stream)
     {
         if (a_argv.size ()) {
             expression.clear ();
         }
 
-        for (std::vector<std::string>::const_iterator iter = a_argv.begin ();
+        for (std::vector<UString>::const_iterator iter = a_argv.begin ();
              iter != a_argv.end ();
              ++iter) {
             expression += *iter;
@@ -564,9 +563,9 @@ struct CommandOpen : public Console::SynchronousCommand {
     }
 
     void
-    execute (const std::vector<std::string> &a_argv, Console::Stream&)
+    execute (const std::vector<UString> &a_argv, Console::Stream&)
     {
-        for (std::vector<std::string>::const_iterator iter = a_argv.begin ();
+        for (std::vector<UString>::const_iterator iter = a_argv.begin ();
              iter != a_argv.end ();
              ++iter) {
             UString path = *iter;



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]