X-Git-Url: https://git.teslayout.com/public/public/public/?p=anna.git;a=blobdiff_plain;f=include%2Fanna%2Fcore%2Futil%2FSecond.hpp;fp=include%2Fanna%2Fcore%2Futil%2FSecond.hpp;h=7f7fde65c1b4c83a9a7b8890cba2b70d065bd72a;hp=b8614f11479548a990f72ecc583bfa73817f4a58;hb=5a6cba5fde2b2f538a7515f8293cc0a8d9589dfa;hpb=af9c86ffb0e28d35ad94d99c5f77e41578c972b4 diff --git a/include/anna/core/util/Second.hpp b/include/anna/core/util/Second.hpp index b8614f1..7f7fde6 100644 --- a/include/anna/core/util/Second.hpp +++ b/include/anna/core/util/Second.hpp @@ -71,62 +71,62 @@ public: * Conversor a numérico. * \return El valor asociado a esta instancia. */ - operator type_t () const throw() { return a_value; } + operator type_t () const { return a_value; } /** * \internal */ - type_t& refValue() throw() { return a_value; } + type_t& refValue() { return a_value; } - Second& operator= (const type_t other) throw() { a_value = other; return *this; } + Second& operator= (const type_t other) { a_value = other; return *this; } - Second& operator= (const Second& other) throw() { a_value = other.a_value; return *this; } + Second& operator= (const Second& other) { a_value = other.a_value; return *this; } - Second& operator= (const Millisecond& other) throw(); + Second& operator= (const Millisecond& other) ; - Second& operator= (const Microsecond& other) throw(); + Second& operator= (const Microsecond& other) ; - bool operator== (const Second& other) const throw() { return a_value == other.a_value; } + bool operator== (const Second& other) const { return a_value == other.a_value; } - bool operator== (const Millisecond& other) const throw(); + bool operator== (const Millisecond& other) const ; - bool operator== (const Microsecond& other) const throw(); + bool operator== (const Microsecond& other) const ; - bool operator!= (const Second& other) const throw() { return a_value != other.a_value; } + bool operator!= (const Second& other) const { return a_value != other.a_value; } - bool operator!= (const Millisecond& other) const throw(); + bool operator!= (const Millisecond& other) const ; - bool operator!= (const Microsecond& other) const throw(); + bool operator!= (const Microsecond& other) const ; - bool operator> (const Second& other) const throw() { return a_value > other.a_value; } + bool operator> (const Second& other) const { return a_value > other.a_value; } - bool operator> (const Millisecond& other) const throw(); + bool operator> (const Millisecond& other) const ; - bool operator> (const Microsecond& other) const throw(); + bool operator> (const Microsecond& other) const ; - bool operator< (const Second& other) const throw() { return a_value < other.a_value; } + bool operator< (const Second& other) const { return a_value < other.a_value; } - bool operator< (const Millisecond& other) const throw(); + bool operator< (const Millisecond& other) const ; - bool operator< (const Microsecond& other) const throw(); + bool operator< (const Microsecond& other) const ; - bool operator>= (const Second& other) const throw() { return a_value >= other.a_value; } + bool operator>= (const Second& other) const { return a_value >= other.a_value; } - bool operator>= (const Millisecond& other) const throw() { return (operator==(other) == true) ? true : operator>(other); } + bool operator>= (const Millisecond& other) const { return (operator==(other) == true) ? true : operator>(other); } - bool operator>= (const Microsecond& other) const throw() { return (operator==(other) == true) ? true : operator>(other); } + bool operator>= (const Microsecond& other) const { return (operator==(other) == true) ? true : operator>(other); } - bool operator<= (const Second& other) const throw() { return a_value <= other.a_value; } + bool operator<= (const Second& other) const { return a_value <= other.a_value; } - bool operator<= (const Millisecond& other) const throw() { return (operator==(other) == true) ? true : operator<(other); } + bool operator<= (const Millisecond& other) const { return (operator==(other) == true) ? true : operator<(other); } - bool operator<= (const Microsecond& other) const throw() { return (operator==(other) == true) ? true : operator<(other); } + bool operator<= (const Microsecond& other) const { return (operator==(other) == true) ? true : operator<(other); } /** * Devuelve el valor asociado a esta instancia. * \return el valor asociado a esta instancia. */ - type_t getValue() const throw() { return a_value; } + type_t getValue() const { return a_value; } /** Devuelve una cadena con la hora en formato 'dd/mm/yyyy hh:mm:ss'. @@ -135,7 +135,7 @@ public: \see man strftime */ - std::string asDateTime(const char* format = "%d/%0m/%Y %T") const throw(); + std::string asDateTime(const char* format = "%d/%0m/%Y %T") const ; /** Devuelve una cadena con la hora en formato 'dd/mm/yyyy hh:mm:ss'. @@ -146,33 +146,33 @@ public: \see man strftime */ - const char* asDateTime(char* result, const char* format = "%d/%0m/%Y %T") const throw(); + const char* asDateTime(char* result, const char* format = "%d/%0m/%Y %T") const ; /** * Devuelve una cadena con el valor de esta instancia y las unidades "sec". * \return una cadena con el valor de esta instancia y las unidades "sec". */ - std::string asString() const throw(); + std::string asString() const ; /** * Devuelve la hora actual de sistema expresada en segundos transcurridos desde el 1 de Enero de 1970 * \return la hora actual de sistema expresada en segundos transcurridos desde el 1 de Enero de 1970 */ - static Second getTime() throw(); + static Second getTime() ; /** * Devuelve la hora actual de sistema expresada en segundos transcurridos desde el 1 de Enero de 1970 aplicando * las correciones correspondientes a la hora local. * \return la hora actual de sistema expresada en segundos transcurridos desde el 1 de Enero de 1970 */ - static Second getLocalTime() throw(); + static Second getLocalTime() ; /** * Obtiene los microsegundos del valor contenido en la cadena recibida como parámetro. * \param value Cadena que contiene los microsegundos habrá sido obtenida con #asString. * \return los microsegundos del valor contenido en la cadena recibida como parámetro. */ - static Second fromString(const std::string& value) throw(RuntimeException); + static Second fromString(const std::string& value) noexcept(false); private: type_t a_value; @@ -180,35 +180,35 @@ private: friend class Millisecond; friend class Microsecond; - friend class Second operator + (const Second& left, const Second& right) throw(); - friend class Second operator - (const Second& left, const Second& right) throw(); - friend class Second operator / (const Second& left, const Second& right) throw(); - friend class Second operator / (const Second& left, const int right) throw(); - friend class Second operator / (const Second& left, const unsigned int right) throw(); + friend class Second operator + (const Second& left, const Second& right) ; + friend class Second operator - (const Second& left, const Second& right) ; + friend class Second operator / (const Second& left, const Second& right) ; + friend class Second operator / (const Second& left, const int right) ; + friend class Second operator / (const Second& left, const unsigned int right) ; }; inline Second operator + (const Second& left, const Second& right) -throw() { +{ return Second(left.a_value + right.a_value); } inline Second operator - (const Second& left, const Second& right) -throw() { +{ return Second(left.a_value - right.a_value); } inline Second operator / (const Second& left, const Second& right) -throw() { +{ return Second(left.a_value / right.a_value); } inline Second operator / (const Second& left, const int right) -throw() { +{ return Second(left.a_value / right); } inline Second operator / (const Second& left, const unsigned int right) -throw() { +{ return Second(left.a_value / right); }