X-Git-Url: https://git.teslayout.com/public/public/public/?a=blobdiff_plain;f=example%2Fcomm%2FdatagramRServer%2Fmain.cpp;h=d2d29d99bdcf000407b29c7b3978f3a8d599fb23;hb=5a6cba5fde2b2f538a7515f8293cc0a8d9589dfa;hp=e348d5d140eff617b3e406506f5c19c03e14d758;hpb=93366a0bda79e6fd6e7dad6316bfcf8cc82f5731;p=anna.git diff --git a/example/comm/datagramRServer/main.cpp b/example/comm/datagramRServer/main.cpp index e348d5d..d2d29d9 100644 --- a/example/comm/datagramRServer/main.cpp +++ b/example/comm/datagramRServer/main.cpp @@ -43,7 +43,8 @@ public: class MyReceiver : public Receiver { public: - static const char* className () throw () { return "MyReceiver"; } + virtual ~MyReceiver() {;} + static const char* className () { return "MyReceiver"; } private: Request a_request; @@ -51,8 +52,8 @@ private: MyCommunicator* a_communicator; MyReceiver () : Receiver ("MyReceiver") { ; } - void initialize () throw (RuntimeException); - void apply (comm::ClientSocket &, const Message&) throw (RuntimeException); + void initialize () noexcept(false); + void apply (comm::ClientSocket &, const Message&) noexcept(false); friend class Allocator ; }; @@ -61,7 +62,7 @@ class ArithmeticServer : public comm::Application { public: ArithmeticServer (); - comm::DatagramSocket* getOutput () throw () { return a_output; } + comm::DatagramSocket* getOutput () { return a_output; } private: MyCommunicator* a_communicator; @@ -69,9 +70,9 @@ private: comm::DatagramSocket* a_input; comm::DatagramSocket* a_output; - void initialize () throw (RuntimeException); - void run () throw (RuntimeException); - xml::Node* asXML (xml::Node* app) const throw (); + void initialize () noexcept(false); + void run () noexcept(false); + xml::Node* asXML (xml::Node* app) const ; }; using namespace std; @@ -117,7 +118,7 @@ ArithmeticServer::ArithmeticServer () : // Inicializa el servidor de sockets. //----------------------------------------------------------------------------------------- void ArithmeticServer::initialize () - throw (RuntimeException) + noexcept(false) { CommandLine& cl (CommandLine::instantiate ()); @@ -144,7 +145,7 @@ void ArithmeticServer::initialize () // Cuando hay un nuevo mensaje invocar�a Communicator::eventReceiveMessage //----------------------------------------------------------------------------------------- void ArithmeticServer::run () - throw (RuntimeException) + noexcept(false) { CommandLine& cl (CommandLine::instantiate ()); @@ -155,7 +156,7 @@ void ArithmeticServer::run () } xml::Node* ArithmeticServer::asXML (xml::Node* app) const - throw () + { xml::Node* node = app::Application::asXML (app); @@ -166,13 +167,13 @@ xml::Node* ArithmeticServer::asXML (xml::Node* app) const } void MyReceiver::initialize () - throw (RuntimeException) + noexcept(false) { a_communicator = app::functions::component (ANNA_FILE_LOCATION); } void MyReceiver::apply (ClientSocket&, const Message& message) - throw (RuntimeException) + noexcept(false) { LOGMETHOD (TraceMethod tm ("MyReceiver", "apply", ANNA_FILE_LOCATION));