]> git.llucax.com Git - z.facultad/75.42/plaqui.git/blobdiff - Server/src/command.cpp
Se agrega generacion de XML para dar el estado actual de la planta simulada.
[z.facultad/75.42/plaqui.git] / Server / src / command.cpp
index 5448ea6be47c9db393818916d48dfb82d04c8293..08a73c9b36ae4a9bd5cb18bec05325d667acd2ff 100644 (file)
@@ -44,12 +44,13 @@ Command::~Command(void) {
 #endif // DEBUG
 }
 
-Command::Command(const string& target, const string& command):
-               target(target), command(command) {
+Command::Command(const string& _target, const string& _command) {
 #ifdef DEBUG
        cerr << __FILE__ << ": target = " << target << " | "
                        << "command = " << command << endl;
 #endif // DEBUG
+       set_target(_target);
+       set_command(_command);
 }
 
 void Command::build(void) {
@@ -108,7 +109,7 @@ istream& operator>>(istream& is, Command& command) {
        } else {
                command.target = "";
        }
-       if (command.args.size() > 1) {
+       if (command.args.size() > 0) {
                command.command = command.args[0];
                command.args.erase(command.args.begin());
        } else {