summaryrefslogtreecommitdiffstats
path: root/src/madc.cpp
diff options
context:
space:
mode:
authorMatthias Schiffer <matthias@gamezock.de>2008-09-19 11:23:44 +0200
committerMatthias Schiffer <matthias@gamezock.de>2008-09-19 11:23:44 +0200
commit45c735361b483bd44b5b59c3fb4b055ddbad129a (patch)
treeaf0ee90049224fe13a60eee70e82300a8b1deb35 /src/madc.cpp
parent113b1f4bbdecfab24ed9781b730a76a442adad6f (diff)
downloadmad-45c735361b483bd44b5b59c3fb4b055ddbad129a.tar
mad-45c735361b483bd44b5b59c3fb4b055ddbad129a.zip
Benutze using namespace in den Hauptsourcen
Diffstat (limited to 'src/madc.cpp')
-rw-r--r--src/madc.cpp24
1 files changed, 13 insertions, 11 deletions
diff --git a/src/madc.cpp b/src/madc.cpp
index 48b15c9..828a2bf 100644
--- a/src/madc.cpp
+++ b/src/madc.cpp
@@ -33,8 +33,10 @@
#include <readline/readline.h>
#include <readline/history.h>
+using namespace Mad;
-static Mad::Client::CommandParser *parser;
+
+static Client::CommandParser *parser;
static struct pollfd fds[2];
@@ -72,16 +74,16 @@ int main(int argc, char *argv[]) {
std::exit(1);
}
- Mad::Common::Backends::ConsoleLogger logger;
- Mad::Common::Logger::registerLogger(&logger);
+ Common::Backends::ConsoleLogger logger;
+ Common::Logger::registerLogger(&logger);
- Mad::Net::Connection::init();
+ Net::Connection::init();
- Mad::Common::RequestManager::init(false);
- Mad::Net::ClientConnection *connection = new Mad::Net::ClientConnection;
+ Common::RequestManager::init(false);
+ Net::ClientConnection *connection = new Net::ClientConnection;
try {
- connection->connect(Mad::Net::IPAddress(argv[1]));
+ connection->connect(Net::IPAddress(argv[1]));
std::cerr << "Connecting to " << argv[1] << "..." << std::flush;
@@ -94,7 +96,7 @@ int main(int argc, char *argv[]) {
std::cerr << " connected." << std::endl << std::endl;
- Mad::Common::RequestManager::getRequestManager()->registerConnection(connection);
+ Common::RequestManager::getRequestManager()->registerConnection(connection);
parser = new Mad::Client::CommandParser(connection);
parser->signalFinished().connect(sigc::ptr_fun(activateReadline));
@@ -116,15 +118,15 @@ int main(int argc, char *argv[]) {
delete parser;
- Mad::Common::RequestManager::getRequestManager()->unregisterConnection(connection);
+ Common::RequestManager::getRequestManager()->unregisterConnection(connection);
}
catch(Mad::Common::Exception &e) {
- Mad::Common::Logger::log(Mad::Common::Logger::CRITICAL, "Connection error: " + e.strerror());
+ Common::Logger::log(Common::Logger::CRITICAL, "Connection error: " + e.strerror());
}
delete connection;
- Mad::Net::Connection::deinit();
+ Net::Connection::deinit();
return 0;
}