X-Git-Url: https://git.teslayout.com/public/public/public/?p=anna.git;a=blobdiff_plain;f=include%2Fanna%2Fcomm%2FTransport.hpp;fp=include%2Fanna%2Fcomm%2FTransport.hpp;h=096bc05266509e617a1803b77b261b2923f23cb6;hp=6b6b24c7e13585a981b01d7a8e63876818fdf200;hb=5a6cba5fde2b2f538a7515f8293cc0a8d9589dfa;hpb=af9c86ffb0e28d35ad94d99c5f77e41578c972b4 diff --git a/include/anna/comm/Transport.hpp b/include/anna/comm/Transport.hpp index 6b6b24c..096bc05 100644 --- a/include/anna/comm/Transport.hpp +++ b/include/anna/comm/Transport.hpp @@ -48,7 +48,7 @@ class Transport { int a_overQuotaSize; Message* a_inputMessage; - static Message* nullInputMessage() throw(RuntimeException); + static Message* nullInputMessage() noexcept(false); public: /** @@ -65,7 +65,7 @@ public: /** Returns true if the transport layer has a timming control system activated. */ - bool enableTimeout() const throw() { return a_enableTimeout; } + bool enableTimeout() const { return a_enableTimeout; } /** Activates the timming control system for the ClientSocket which were created @@ -73,17 +73,17 @@ public: is detected in a time interval. \see Communicator::setTimeout. */ - void activateTimeout() throw() { a_enableTimeout = true; } + void activateTimeout() { a_enableTimeout = true; } /** Deactivates the timming control system for the ClientSocket which were created through this transport layer. */ - void deactivateTimeout() throw() { a_enableTimeout = false; } + void deactivateTimeout() { a_enableTimeout = false; } // Internal use: returns associated input message - Message* getInputMessage() throw(RuntimeException) { + Message* getInputMessage() noexcept(false) { return (a_inputMessage == NULL) ? nullInputMessage() : a_inputMessage; } @@ -91,7 +91,7 @@ public: Returns the number of bytes reserved by this protocol for the intermediate buffer. @return number of bytes reserved by this protocol for the intermediate buffer. */ - int getOverQuotaSize() const throw() { return a_overQuotaSize; } + int getOverQuotaSize() const { return a_overQuotaSize; } /** Establece el numero de bytes que puede mantener este procotolo para cada uno de los @@ -101,7 +101,7 @@ public: \param overQuotaSize Numero de maximo de bytes que podemos mantener en la memoria intermedia. */ - void setOverQuotaSize(const int overQuotaSize) throw() { a_overQuotaSize = (overQuotaSize >= MinOverQuotaSize) ? overQuotaSize : MinOverQuotaSize; } + void setOverQuotaSize(const int overQuotaSize) { a_overQuotaSize = (overQuotaSize >= MinOverQuotaSize) ? overQuotaSize : MinOverQuotaSize; } /** Debe calcular el tamao previsto del mensaje actual. @@ -119,7 +119,7 @@ public: longitud del mensaje recibido y lanza una excepcion en este metodo el ClientSocket activara los sistemas de recuperacion, si es posible. */ - virtual int calculeSize(const DataBlock& dataBlock) throw(RuntimeException) = 0; + virtual int calculeSize(const DataBlock& dataBlock) noexcept(false) = 0; /** Debe establecer el modo en que el protocolo va a verificar que el mensaje obtenido @@ -135,7 +135,7 @@ public: \return Un bloque de memoria que contiene el mensaje recibido codificado segn las reglas del protocolo este protocolo de transporte */ - virtual const Message* decode(const DataBlock& message) throw(RuntimeException) = 0; + virtual const Message* decode(const DataBlock& message) noexcept(false) = 0; /** Debe establecer la forma en el protocolo va a preparar el envio a la capa de transporte. @@ -148,13 +148,13 @@ public: \warning De no indicarse ninguna otra implementacin devolvera el mensaje tal y como sea recibido. */ - virtual const DataBlock& code(Message& message) throw(RuntimeException) = 0; + virtual const DataBlock& code(Message& message) noexcept(false) = 0; /** Metodo que inicializa el estado de esta capa de transporte. Sera invocado automaticamente por el nucleo anna.comm. */ - virtual void clear() throw() { a_forCode.clear(); } + virtual void clear() { a_forCode.clear(); } protected: DataBlock a_forCode; /**< Bloque de memoria usado para guardar el contenido de la codificacion */ @@ -176,7 +176,7 @@ protected: Establece la instancia del mensaje asociada a este transporte. \param inputMessage Instancia del mensaje a asociar. */ - void setInputMessage(Message* inputMessage) throw() { a_inputMessage = inputMessage; } + void setInputMessage(Message* inputMessage) { a_inputMessage = inputMessage; } private: