From: Leandro Lucarella Date: Mon, 17 Nov 2003 04:31:53 +0000 (+0000) Subject: Se agrega sobrecarga de add_arg(unsigned) a pedido de ricky :) X-Git-Tag: svn_import~281 X-Git-Url: https://git.llucax.com/z.facultad/75.42/plaqui.git/commitdiff_plain/f53d095dd5ffb5afacf5c6f9a23d6cf1985fc237?ds=inline Se agrega sobrecarga de add_arg(unsigned) a pedido de ricky :) --- diff --git a/Server/include/plaqui/server/command.h b/Server/include/plaqui/server/command.h index ac43f47..cd49d43 100644 --- a/Server/include/plaqui/server/command.h +++ b/Server/include/plaqui/server/command.h @@ -114,10 +114,15 @@ namespace Server { const Arguments& get_args(void) const; /** - * Agrega un argumentos. + * Agrega un argumento. */ void add_arg(const std::string& arg); + /** + * Agrega un argumento. + */ + void add_arg(const unsigned& arg); + /** * Obtiene el comando desde un pedido HTTP completo. */ diff --git a/Server/src/command.cpp b/Server/src/command.cpp index 08a73c9..f0e3ef1 100644 --- a/Server/src/command.cpp +++ b/Server/src/command.cpp @@ -92,6 +92,11 @@ void Command::add_arg(const std::string& arg) { build(); } +void Command::add_arg(const unsigned& arg) { + args.push_back(String().from(arg)); + build(); +} + istream& operator>>(istream& is, Command& command) { #ifdef DEBUG cerr << __FILE__ << ": operator>>()" << endl;