-// ANNA - Anna is Not Nothingness Anymore
-//
-// (c) Copyright 2005-2014 Eduardo Ramos Testillano & Francisco Ruiz Rayo
-//
-// https://bitbucket.org/testillano/anna
-//
-// 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 Google Inc. 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_Host_hpp
struct SortBy {
- static int value(const Server* server) throw();
+ static int value(const Server* server) ;
};
std::string a_name;
@return El nombre logico de esta maquina.
*/
- const std::string& getName() const throw() { return a_name; }
+ const std::string& getName() const { return a_name; }
/**
Crea y registra un nuevo proceso servidor sobre esta maquina (maquina, remotePort) con el nombre indicado.
@return La instancia del nuevo proceso servidor
*/
Server* createServer(const char* name, const int remotePort, const bool autoRecovery, TransportFactory* transportFactory = NULL, const bool ignoreIncomingMessages = false, const bool doConnect = true)
- throw(RuntimeException) {
+ noexcept(false) {
return createServer(std::string(name), remotePort, autoRecovery, transportFactory, ignoreIncomingMessages, doConnect);
}
@return La instancia del nuevo proceso servidor
*/
Server* createServer(const std::string& name, const int remotePort, const bool autoRecovery, TransportFactory* transportFactory = NULL, const bool ignoreIncomingMessages = false, const bool doConnect = true)
- throw(RuntimeException);
+ noexcept(false);
/**
Crea y registra un nuevo proceso servidor sobre esta maquina (maquina, remotePort) con el nombre indicado.
@return La instancia del nuevo proceso servidor
*/
- Server* createServer(const ServerAllocator& serverAllocator) throw(RuntimeException);
+ Server* createServer(const ServerAllocator& serverAllocator) noexcept(false);
/**
Devuelve un iterador al comienzo de la lista de servidores asociados a esta maquina.
\return Un iterador al comienzo de la lista de servidores asociados a esta maquina.
*/
- server_iterator server_begin() throw() { return a_servers.begin(); }
+ server_iterator server_begin() { return a_servers.begin(); }
/**
Devuelve un iterador al comienzo de la lista de servidores asociados a esta maquina.
\return Un iterador al comienzo de la lista de servidores asociados a esta maquina.
*/
- const_server_iterator server_begin() const throw() { return a_servers.begin(); }
+ const_server_iterator server_begin() const { return a_servers.begin(); }
/**
Devuelve un iterador al comienzo de la lista de servidores asociados a esta maquina.
\return Un iterador al final de la lista de servidores asociados a esta maquina.
*/
- server_iterator server_end() throw() { return a_servers.end(); }
+ server_iterator server_end() { return a_servers.end(); }
/**
Devuelve un iterador al comienzo de la lista de servidores asociados a esta maquina.
\return Un iterador al final de la lista de servidores asociados a esta maquina.
*/
- const_server_iterator server_end() const throw() { return a_servers.end(); }
+ const_server_iterator server_end() const { return a_servers.end(); }
/**
Devuelve la instancia del servidor sobre el que esta posicionado el iterador recibido
\param ii Iterador que debera estar comprendido entre begin y end.
\return La instancia del servidor sobre el que esta posicionado el iterador recibido
*/
- static Server* server(server_iterator ii) throw() { return server_container::data(ii); }
+ static Server* server(server_iterator ii) { return server_container::data(ii); }
/**
Devuelve la instancia del servidor sobre el que esta posicionado el iterador recibido
\param ii Iterador que debera estar comprendido entre begin y end.
\return La instancia del servidor sobre el que esta posicionado el iterador recibido
*/
- static const Server* server(const_server_iterator ii) throw() { return server_container::data(ii); }
+ static const Server* server(const_server_iterator ii) { return server_container::data(ii); }
/**
Devuelve un iterador al comienzo de la lista de direcciones IPs asociadas a esta maquina.
\return Un iterador al comienzo de la lista de direcciones IPs asociadas a esta maquina.
*/
- const_device_iterator device_begin() const throw() { return a_devices.begin(); }
+ const_device_iterator device_begin() const { return a_devices.begin(); }
/**
Devuelve un iterador al final de la lista de direcciones IPs asociadas a esta maquina.
\return Un iterador al final de la lista de direcciones IPs asociadas a esta maquina.
*/
- const_device_iterator device_end() const throw() { return a_devices.end(); }
+ const_device_iterator device_end() const { return a_devices.end(); }
/**
Devuelve la instancia de la IP sobre el que esta posicionado el iterador recibido
\param ii Iterador que debera estar comprendido entre begin y end.
\return La instancia de la sobre el que esta posicionado el iterador recibido
*/
- static const Device* device(const_device_iterator ii) throw() { return *ii; }
+ static const Device* device(const_device_iterator ii) { return *ii; }
/**
* Devuelve la instancia del proceso servidor asociado al puerto recibido como parametro. Si
*
* @see #createServer
*/
- const Server* find_server(const int remotePort) const throw();
+ const Server* find_server(const int remotePort) const ;
/**
* Devuelve la instancia del proceso servidor asociado al puerto recibido como parametro. Si
*
* @see #createServer
*/
- Server* find_server(const int remotePort) throw();
+ Server* find_server(const int remotePort) ;
/**
Incorpora un dispositivo de red.
\param device Dispositivo de red a incorporar.
*/
- void assign(const Device* device) throw(RuntimeException);
+ void assign(const Device* device) noexcept(false);
/**
Devuelve \em true si el dispositivo de red recibido fue asignado a esta maquina o \em
\see #assign
*/
bool contains(const Device* device) const
- throw() {
+ {
const_device_iterator end = device_end();
return (std::find(device_begin(), end, device) != end);
}
Devuelve una cadena con la informacin referente a esta maquina.
@return Una cadena con la informacin referente a esta maquina.
*/
- std::string asString() const throw();
+ std::string asString() const ;
/**
Devuelve un nodo XML con la informacin referente a este objeto.
\param parent Nodo XML a partir del cual introducir la informacin.
\return Un nodo XML con la informacin referente a este objeto.
*/
- xml::Node* asXML(xml::Node* parent) const throw(RuntimeException);
+ xml::Node* asXML(xml::Node* parent) const noexcept(false);
protected:
device_container a_devices;
server_container a_servers;
- Server* add(Server*, const int remotePort, const bool doConnect) throw();
+ Server* add(Server*, const int remotePort, const bool doConnect) ;
friend class Network;
};