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 <Safe*>(&object), NULL);
}
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 <Safe*>(&object), whatis);
}
@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