From f53d095dd5ffb5afacf5c6f9a23d6cf1985fc237 Mon Sep 17 00:00:00 2001 From: Leandro Lucarella Date: Mon, 17 Nov 2003 04:31:53 +0000 Subject: [PATCH] Se agrega sobrecarga de add_arg(unsigned) a pedido de ricky :) --- Server/include/plaqui/server/command.h | 7 ++++++- Server/src/command.cpp | 5 +++++ 2 files changed, 11 insertions(+), 1 deletion(-) 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; -- 2.43.0