X-Git-Url: https://git.teslayout.com/public/public/public/?p=anna.git;a=blobdiff_plain;f=source%2Fcomm%2FService.cpp;fp=source%2Fcomm%2FService.cpp;h=80c64a821cb400c51f42f204da9e4262daa7ce4a;hp=ce86dbe0c462c3cc922dbc974279651331ef6228;hb=5a6cba5fde2b2f538a7515f8293cc0a8d9589dfa;hpb=af9c86ffb0e28d35ad94d99c5f77e41578c972b4 diff --git a/source/comm/Service.cpp b/source/comm/Service.cpp index ce86dbe..80c64a8 100644 --- a/source/comm/Service.cpp +++ b/source/comm/Service.cpp @@ -18,7 +18,7 @@ using namespace std; using namespace anna; void comm::Service::attach(comm::Server* server) -throw(RuntimeException) { +noexcept(false) { LOGMETHOD(TraceMethod tm(Logger::Local7, "comm::Service", "attach", ANNA_FILE_LOCATION)); comm::Delivery::add(server); server->attach(this); @@ -28,7 +28,7 @@ throw(RuntimeException) { // (1) Cuando no queda ningun recurso disponible se devuelve una excepcion //---------------------------------------------------------------------------------- comm::Server* comm::Service::send(comm::Message& message) -throw(RuntimeException) { +noexcept(false) { LOGMETHOD(TraceMethod tm(Logger::Local7, "comm::Service", "send", ANNA_FILE_LOCATION)); comm::Server* tryServer = NULL; comm::Server* init = NULL; @@ -63,7 +63,7 @@ throw(RuntimeException) { } comm::Server* comm::Service::send(comm::Message* message) -throw(RuntimeException) { +noexcept(false) { if(message == NULL) throw RuntimeException("comm::Service::send | Cannot send a NULL message", ANNA_FILE_LOCATION); @@ -71,7 +71,7 @@ throw(RuntimeException) { } int comm::Service::broadcast(comm::Message& message) -throw() { +{ using namespace anna::comm; int result = 0; @@ -94,7 +94,7 @@ throw() { } int comm::Service::broadcast(comm::Message* message) -throw() { +{ if(message == NULL) { Logger::write(Logger::Error, "comm::Service::broadcast | Cannot broadcast a NULL message", ANNA_FILE_LOCATION); return 0; @@ -104,7 +104,7 @@ throw() { } string comm::Service::asString() const -throw() { +{ string result("comm::Service { "); result += Delivery::asString(); result += " | Critical: "; @@ -113,7 +113,7 @@ throw() { } xml::Node* comm::Service::asXML(xml::Node* parent) const -throw() { +{ xml::Node* service = parent->createChild("comm.Service"); Delivery::asXML(service); service->createAttribute("Critical", functions::asString(a_isCritical)); @@ -122,13 +122,13 @@ throw() { /*static*/ comm::Server* comm::Service::server(comm::Delivery::iterator& ii) -throw() { +{ return static_cast (Delivery::resource(ii)); } /*static*/ const comm::Server* comm::Service::server(comm::Delivery::const_iterator& ii) -throw() { +{ return static_cast (Delivery::resource(ii)); }