X-Git-Url: https://git.teslayout.com/public/public/public/?p=anna.git;a=blobdiff_plain;f=include%2Fanna%2Fdbms%2FDate.hpp;h=c5c6f2fae03c84a583a48aefa7e1390852efd33e;hp=92e96cc75d1e66571b13113652cacbf47c1cfbc3;hb=5a6cba5fde2b2f538a7515f8293cc0a8d9589dfa;hpb=af9c86ffb0e28d35ad94d99c5f77e41578c972b4 diff --git a/include/anna/dbms/Date.hpp b/include/anna/dbms/Date.hpp index 92e96cc..c5c6f2f 100644 --- a/include/anna/dbms/Date.hpp +++ b/include/anna/dbms/Date.hpp @@ -167,21 +167,21 @@ public: \return El contenido de esta fecha. \warning Si el metodo Data::isNull devolvio \em true el contenido de la estructura no esta definido. */ - const tm& getValue() const throw() { return a_value; } + const tm& getValue() const { return a_value; } /** Devuelve el contenido de esta fecha. \return El contenido de esta fecha. \warning Si el metodo Data::isNull devolvio \em true el contenido de la estructura no esta definido. */ - tm& getValue() throw() { return a_value; } + tm& getValue() { return a_value; } /** * Interpreta el contenido de la fecha y lo transfiere al buffer. * \return El buffer que contiene esta fecha interpretada con el formato indicado en el contructor. * \warning El resultado sera NULL en caso de no poder interpretar correctamente la fecha. */ - virtual const char* getCStringValue() const throw(); + virtual const char* getCStringValue() const ; /** * Interpreta el contenido de esta fecha como el numero de segundos transcurridos desde el 1 de Enero de 1970. @@ -191,112 +191,112 @@ public: * Si el contenido de la columna sociada es nulo este metodo devolvera 0. Si la conversion a * segundos no puede ser realizada devolvera -1. */ - Second getSecondValue() const throw() { return Second((Data::isNull() == true) ? 0 : mktime(&const_cast (this)->a_value)); } + Second getSecondValue() const { return Second((Data::isNull() == true) ? 0 : mktime(&const_cast (this)->a_value)); } /** * Devuelve el formato indicado en el constructor de la clase. * \return El formato indicado en el constructor de la clase. */ - const char* getFormat() const throw() { return a_format; } + const char* getFormat() const { return a_format; } /** * Devuelve el año contenido por esta fecha. * \return El año contenido por esta fecha. */ - int getYear() const throw() { return a_value.tm_year + 1900; } + int getYear() const { return a_value.tm_year + 1900; } /** * Devuelve el mes contenido por esta fecha. * \return El mes contenido por esta fecha. */ - int getMonth() const throw() { return a_value.tm_mon + 1; } + int getMonth() const { return a_value.tm_mon + 1; } /** * Devuelve el dia del mes contenido por esta fecha. * \return El dia del mes contenido por esta fecha. */ - int getDay() const throw() { return a_value.tm_mday; } + int getDay() const { return a_value.tm_mday; } /** * Devuelve la hora del dia contenida en la fecha. * \return La hora del dia contenida en la fecha. * \warning Verifique que el tipo 'Date' de su RDBMS es capaz de contener horas, minutos y segundos. */ - int getHour() const throw() { return a_value.tm_hour; } + int getHour() const { return a_value.tm_hour; } /** * Devuelve el minuto de la hora contenida en la fecha. * \return El minuto de la hora contenida en la fecha. * \warning Verifique que el tipo 'Date' de su RDBMS es capaz de contener horas, minutos y segundos. */ - int getMinute() const throw() { return a_value.tm_min; } + int getMinute() const { return a_value.tm_min; } /** * Devuelve el segundo de la hora contenida en la fecha. * \return El segundo de la hora contenida en la fecha. * \warning Verifique que el tipo 'Date' de su RDBMS es capaz de contener horas, minutos y segundos. */ - int getSecond() const throw() { return a_value.tm_sec; } + int getSecond() const { return a_value.tm_sec; } /** * Establece el año de esta fecha * \param year Año de la fecha. Debe ser mayor de 1900. */ - void setYear(const int year) throw(RuntimeException) { set("Year", a_value.tm_year, year - 1900, 0, -1); } + void setYear(const int year) noexcept(false) { set("Year", a_value.tm_year, year - 1900, 0, -1); } /** * Establece mes de esta fecha. * \param month Mes de la fecha. Debe estar comprendido entre 1 y 12. */ - void setMonth(const int month) throw(RuntimeException) { set("Month", a_value.tm_mon, month - 1, 0, 11); } + void setMonth(const int month) noexcept(false) { set("Month", a_value.tm_mon, month - 1, 0, 11); } /** * Establece el dia del mes de esta fecha. * \param day Dia del mes. Debe estar comprendido entre 1 y 31. */ - void setDay(const int day) throw(RuntimeException) { set("Day", a_value.tm_mday, day, 1, 31); } + void setDay(const int day) noexcept(false) { set("Day", a_value.tm_mday, day, 1, 31); } /** * Establece la hora de esta fecha. * \param hour Hora del dia. Debe estar comprendida entre 0 y 23. * \warning Verifique que el tipo 'Date' de su RDBMS es capaz de contener horas, minutos y segundos. */ - void setHour(const int hour) throw(RuntimeException) { set("Hour", a_value.tm_hour, hour, 0, 23); } + void setHour(const int hour) noexcept(false) { set("Hour", a_value.tm_hour, hour, 0, 23); } /** * Establece el minuto de esta fecha. * \param minute Minuto de la hora del dia. Debe estar comprendida entre 0 y 59. * \warning Verifique que el tipo 'Date' de su RDBMS es capaz de contener horas, minutos y segundos. */ - void setMinute(const int minute) throw(RuntimeException) { set("Minute", a_value.tm_min, minute, 0, 59); } + void setMinute(const int minute) noexcept(false) { set("Minute", a_value.tm_min, minute, 0, 59); } /** * Establece el segundo de esta fecha. * \param second Segungo de la hora del dia. Debe estar comprendida entre 0 y 60. * \warning Verifique que el tipo 'Date' de su RDBMS es capaz de contener horas, minutos y segundos. */ - void setSecond(const int second) throw(RuntimeException) { set("Second", a_value.tm_sec, second, 0, 60); } + void setSecond(const int second) noexcept(false) { set("Second", a_value.tm_sec, second, 0, 60); } /** Interpreta la cadena recibida segun el formato indicado en el constructor y la asigna a esta instancia, pero requiere que al invocar al constructor de esta fecha se indique el formato usado para traducir. \param str Cadena de la que copiar. */ - void setValue(const char* str) throw(RuntimeException); + void setValue(const char* str) noexcept(false); /** Interpreta la cadena recibida segun el formato indicado en el constructor y la asigna a esta instancia, pero requiere que al invocar al constructor de esta fecha se indique el formato usado para traducir. \param str Cadena de la que copiar. */ - void setValue(const std::string& str) throw(RuntimeException) { setValue(str.c_str()); } + void setValue(const std::string& str) noexcept(false) { setValue(str.c_str()); } /** * Establece esta fecha con los segundos transcurridos desde el 1/1/1970. * \param second Numeros de segundos transcurridos desde el 1 de Enero de 1970. * \see anna::functions::second */ - void setValue(const Second &second) throw(RuntimeException); + void setValue(const Second &second) noexcept(false); /** Operador de copia. @@ -304,13 +304,13 @@ public: \return La instancia de esta fecha. \warning Solo copia el contenido de la fecha recibida, no cambia el formato de interpretacion de la fecha origen. */ - Date& operator = (const Date& date) throw(RuntimeException); + Date& operator = (const Date& date) noexcept(false); /** Devuelve una cadena con la informacion referente a esta instancia. \return Una cadena con la informacion referente a esta instancia. */ - virtual std::string asString() const throw(); + virtual std::string asString() const ; protected: char* a_format; @@ -326,8 +326,8 @@ protected: explicit Date(const Type::_v type, const bool isNulleable, const char* format); private: - void set(const char* what, int& variable, const int value, const int min, const int max) throw(RuntimeException); - void do_clear() throw() { anna_memset(&a_value, 0, sizeof(a_value)); } + void set(const char* what, int& variable, const int value, const int min, const int max) noexcept(false); + void do_clear() { anna_memset(&a_value, 0, sizeof(a_value)); } }; }