Remove dynamic exceptions
[anna.git] / include / anna / comm / Receiver.hpp
index 500dbbf..541523b 100644 (file)
@@ -1,37 +1,9 @@
-// ANNA - Anna is Not Nothingness Anymore
-//
-// (c) Copyright 2005-2014 Eduardo Ramos Testillano & Francisco Ruiz Rayo
-//
-// http://redmine.teslayout.com/projects/anna-suite
-//
-// Redistribution and use in source and binary forms, with or without
-// modification, are permitted provided that the following conditions
-// are met:
-//
-//     * Redistributions of source code must retain the above copyright
-// notice, this list of conditions and the following disclaimer.
-//     * Redistributions in binary form must reproduce the above
-// copyright notice, this list of conditions and the following disclaimer
-// in the documentation and/or other materials provided with the
-// distribution.
-//     *  Neither the name of the copyright holder nor the names of its
-// contributors may be used to endorse or promote products derived from
-// this software without specific prior written permission.
-//
-// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-//
-// Authors: eduardo.ramos.testillano@gmail.com
-//          cisco.tierra@gmail.com
+// ANNA - Anna is Not Nothingness Anymore                                                         //
+//                                                                                                //
+// (c) Copyright 2005-2015 Eduardo Ramos Testillano & Francisco Ruiz Rayo                         //
+//                                                                                                //
+// See project site at http://redmine.teslayout.com/projects/anna-suite                           //
+// See accompanying file LICENSE or copy at http://www.teslayout.com/projects/public/anna.LICENSE //
 
 
 #ifndef anna_comm_Receiver_hpp
@@ -64,7 +36,7 @@ public:
    * Devuelve el nombre lógico de éste receptor.
    * \return el nombre lógico de éste receptor.
    */
-  const std::string& getName() const throw() { return a_name; }
+  const std::string& getName() const { return a_name; }
 
   /**
      Metodo manejador de los mensajes recibidos por el socket. En entornos MT cada socket invocara
@@ -75,32 +47,32 @@ public:
      decodificado aplicando las reglas establecidas por la capa de transporte asociado
      al ClientSocket por el que llega el mensaje.
   */
-  virtual void apply(ClientSocket& clientSocket, const Message& message) throw(RuntimeException) = 0;
+  virtual void apply(ClientSocket& clientSocket, const Message& message) noexcept(false) = 0;
 
   /**
    * Método manejador de la notificación de que el socket va a ser cerrado.
    * param clientSocket Socket cliente que va a ser cerrado.
    */
-  virtual void eventBreakConnection(const comm::ClientSocket& clientSocket) throw() {;}
+  virtual void eventBreakConnection(const comm::ClientSocket& clientSocket) {;}
 
   /**
    * Método manejador de la notificación de que el socket va a ser cerrado.
    * param clientSocket Socket cliente que va a ser cerrado.
    */
-  virtual void eventBreakLocalConnection(const comm::ClientSocket& clientSocket) throw() {;}
+  virtual void eventBreakLocalConnection(const comm::ClientSocket& clientSocket) {;}
 
   /**
    * Método manejador de la notificación de que se ha creado una nueva conexion
    * @param server Proceso servidor con el que hemos establecido la conexion.
    */
-  virtual void eventCreateConnection(const Server* server) throw() {;}
+  virtual void eventCreateConnection(const Server* server) {;}
 
   /**
       Devuelve una cadena con toda la informacion relevante de este objeto.
       \return una cadena con toda la informacion relevante de este objeto.
    */
   virtual std::string asString() const
-  throw() {
+  {
     std::string msg("anna::comm::Receiver { Name: ");
     msg += a_name;
     return msg += " }";
@@ -111,7 +83,7 @@ public:
      \param parent Nodo XML a partir del cual introducir la informacion.
      \return Un nodo XML con la informacion referente a este objeto.
   */
-  virtual xml::Node* asXML(xml::Node* parent) const throw(RuntimeException) {
+  virtual xml::Node* asXML(xml::Node* parent) const noexcept(false) {
     xml::Node* node = parent->createChild("comm.Receiver");
     node->createAttribute("Name", a_name);
     return node;
@@ -127,7 +99,7 @@ protected:
   /**
      Metodo invocado por el ReceiverFactory en el momento de pasar a usar esta instancia.
   */
-  virtual void initialize() throw(RuntimeException) { ; }
+  virtual void initialize() noexcept(false) { ; }
 
 private:
   std::string a_name;