From 1a5f29542ff55be2bf31e164448c0c6e8179ee38 Mon Sep 17 00:00:00 2001 From: Jon Bergli Heier Date: Sun, 2 Jan 2011 04:10:40 +0100 Subject: Killed the 'commands' namespace. --- commands.h | 42 ++++++++++++++++++++---------------------- 1 file changed, 20 insertions(+), 22 deletions(-) (limited to 'commands.h') diff --git a/commands.h b/commands.h index ae5dc84..084dd02 100644 --- a/commands.h +++ b/commands.h @@ -11,35 +11,33 @@ #include #include -namespace commands { - class Commands; +class Commands; - class CommandException : public std::runtime_error { - public: - CommandException(const char *s) : std::runtime_error(s) {}; - CommandException(std::string s) : std::runtime_error(s.c_str()) {}; - }; +class CommandException : public std::runtime_error { + public: + CommandException(const char *s) : std::runtime_error(s) {}; + CommandException(std::string s) : std::runtime_error(s.c_str()) {}; +}; - class Commands { - private: - typedef boost::function (Commands*)> Handler; - std::map handlers; +class Commands { + private: + typedef boost::function (Commands*)> Handler; + std::map handlers; - typedef boost::function (const std::string artist)> FindFunction; - std::map find_handlers; + typedef boost::function (const std::string artist)> FindFunction; + std::map find_handlers; - boost::asio::io_service& io_service; - std::vector& args; + boost::asio::io_service& io_service; + std::vector& args; - std::vector ls(); - std::vector find(); - std::vector update(); + std::vector ls(); + std::vector find(); + std::vector update(); - public: - Commands(boost::asio::io_service& io_service, std::vector& args); - std::vector operator()(); + public: + Commands(boost::asio::io_service& io_service, std::vector& args); + std::vector operator()(); - }; }; #endif -- cgit v1.2.3