X-Git-Url: https://git.teslayout.com/public/public/public/?p=anna.git;a=blobdiff_plain;f=include%2Fanna%2Fcore%2Fmt%2FGuard.hpp;h=5c2874462eaa67721eb49bca00a0f4dc72b29b5b;hp=3c99cf81d09bb74a8536e761b3b0a2dbbb130713;hb=5a6cba5fde2b2f538a7515f8293cc0a8d9589dfa;hpb=af9c86ffb0e28d35ad94d99c5f77e41578c972b4 diff --git a/include/anna/core/mt/Guard.hpp b/include/anna/core/mt/Guard.hpp index 3c99cf8..5c28744 100644 --- a/include/anna/core/mt/Guard.hpp +++ b/include/anna/core/mt/Guard.hpp @@ -38,7 +38,7 @@ public: Constructor. @param object Sobre el que actuar para iniciar la guarda. */ - Guard(const Safe& object) throw(RuntimeException) : a_whatis(NULL) { + Guard(const Safe& object) noexcept(false) : a_whatis(NULL) { lock(a_safeObject = const_cast (&object), NULL); } @@ -46,14 +46,14 @@ public: Constructor. @param object Sobre el que actuar para iniciar la guarda. */ - Guard(const Safe* object) throw(RuntimeException); + Guard(const Safe* object) noexcept(false); /** Constructor. @param object Sobre el que actuar para iniciar la guarda. @param whatis Texto que indica la naturaleza del objeto a bloquear. */ - Guard(const Safe& object, const char* whatis) throw(RuntimeException) : a_whatis(whatis) { + Guard(const Safe& object, const char* whatis) noexcept(false) : a_whatis(whatis) { lock(a_safeObject = const_cast (&object), whatis); } @@ -62,25 +62,25 @@ public: @param object Sobre el que actuar para iniciar la guarda. @param whatis Texto que indica la naturaleza del objeto a bloquear. */ - Guard(const Safe* object, const char* whatis) throw(RuntimeException); + Guard(const Safe* object, const char* whatis) noexcept(false); /** Destructor. Termina la guarda iniciada con el objeto recibido como parametro en el constructor. */ - virtual ~Guard() throw() { deactivate(); } + virtual ~Guard() { deactivate(); } /** Desactiva la seccion critica antes de que termine el ambito de actuacion de la misma. */ - void deactivate() throw(); + void deactivate() ; private: Safe* a_safeObject; const char* a_whatis; - void lock(Safe*, const char* whatis) throw(RuntimeException); + void lock(Safe*, const char* whatis) noexcept(false); }; } //namespace anna