Remove dynamic exceptions
[anna.git] / include / anna / time / Date.hpp
index 9fea4c2..c661419 100644 (file)
@@ -122,10 +122,10 @@ class Date {
 
 
   // sets the current date/time (time(NULL)) and provided TimeZone as described in constructor
-  void initialize(const char *TZ = NULL) throw();
+  void initialize(const char *TZ = NULL) ;
 
   // main refresh method regarding timestamp
-  void refresh(void) throw();
+  void refresh(void) ;
 
   anna::Mutex a_mutex;
 
@@ -154,7 +154,7 @@ public:
   /**
   * Sets the current date/time (time(NULL)) and provided TimeZone as described in constructor
   */
-  void setNow(const char *TZ = NULL) throw() { initialize(TZ); }
+  void setNow(const char *TZ = NULL) { initialize(TZ); }
 
 
   /**
@@ -173,13 +173,13 @@ public:
   * timezone, only helps to know the valid TZ values and shows how to change
   * the timezone settings if you would want to do that).
   */
-  void setTz(const char *TZ = NULL) throw();
+  void setTz(const char *TZ = NULL) ;
 
 
   /**
    Sets the local host timezone (even if it is based on TZ or in /usr/share/zoneinfo)
   */
-  void setSystemTimezone() throw();
+  void setSystemTimezone() ;
 
 
   /**
@@ -187,8 +187,8 @@ public:
   *
   * @param unixTimestamp Time since 01-Jan-1970 GMT
   */
-  void store(const time_t & unixTimestamp) throw();
-  void storeUnix(const time_t & unixTimestamp) throw() { store(unixTimestamp); }
+  void store(const time_t & unixTimestamp) ;
+  void storeUnix(const time_t & unixTimestamp) { store(unixTimestamp); }
 
 
   /**
@@ -196,7 +196,7 @@ public:
   *
   * @param ntpTimestamp Time since 01-Jan-1900 GMT
   */
-  void storeNtp(const unsigned int &ntpTimestamp) throw();
+  void storeNtp(const unsigned int &ntpTimestamp) ;
 
 
   /**
@@ -206,7 +206,7 @@ public:
   * @param TZ timezone for date/time provided. Default (NULL) assumes the system
   * timezone configuration. Empty string will be interpreted as UTC timezone.
   */
-  void store(const struct tm &date, const char *TZ = NULL) throw(anna::RuntimeException);
+  void store(const struct tm &date, const char *TZ = NULL) noexcept(false);
 
 
   /**
@@ -219,8 +219,8 @@ public:
   * @param strptimeFormat Date/time string format for strptime primitive.
   * See format syntax at http://man7.org/linux/man-pages/man3/strptime.3.html
   */
-  void store(const std::string &stringDate, const char *TZ = NULL, const char *strptimeFormat = "%Y%m%d%H%M%S") throw(anna::RuntimeException);
-  //void store(const std::string &stringDate, const char *tz = NULL, const char *strptimeFormat = "%Y-%m-%d-%H-%M-%S") throw(anna::RuntimeException);
+  void store(const std::string &stringDate, const char *TZ = NULL, const char *strptimeFormat = "%Y%m%d%H%M%S") noexcept(false);
+  //void store(const std::string &stringDate, const char *tz = NULL, const char *strptimeFormat = "%Y-%m-%d-%H-%M-%S") noexcept(false);
 
 
   /**
@@ -291,13 +291,13 @@ public:
   * @return  NULL if TZ is unset, or string for TZ environment variable
   * (empty is allowed and use to be understood as UTC.
   */
-  const char *getTz(void) const throw() { return (a_tz.unsetTZ() ? NULL:a_tz.getValue().c_str()); }
+  const char *getTz(void) const { return (a_tz.unsetTZ() ? NULL:a_tz.getValue().c_str()); }
 
 
   /**
   * Gets the context timezone as string
   */
-  std::string getTzAsString() const throw() { return a_tz.asString(); }
+  std::string getTzAsString() const { return a_tz.asString(); }
 
 
   /**
@@ -305,14 +305,14 @@ public:
   *
   * @return 'tm' struct on the current timezone
   */
-  const struct tm & getTm(void) const throw() { return a_tm; }
+  const struct tm & getTm(void) const { return a_tm; }
 
   /**
   * Gets the week day abbreviation: Sun, Mon, Tue, Wed, Thu, Fri, Sat
   *
   * @return Day of the week
   */
-  const char *getDay(void) const throw();
+  const char *getDay(void) const ;
 
 
   /**
@@ -322,7 +322,7 @@ public:
   *
   * @see getTz
   */
-  std::string yyyymmddHHmmss(void) const throw();
+  std::string yyyymmddHHmmss(void) const ;
 
 
   /**
@@ -330,7 +330,7 @@ public:
   *
   * @return Seconds since 01-Jan-1970 GMT
   */
-  const time_t & getUnixTimestamp(void) const throw() { return a_timestamp; }
+  const time_t & getUnixTimestamp(void) const { return a_timestamp; }
 
 
   /**
@@ -338,7 +338,7 @@ public:
   *
   * @return Seconds since 01-Jan-1900 GMT
   */
-  unsigned int getNtpTimestamp(void) const throw() {
+  unsigned int getNtpTimestamp(void) const {
     unsigned int ntp_timestamp = a_timestamp + TIMESTAMP_OFFSET_NTP1900_OVER_UNIX1970;
     return ntp_timestamp;
   }
@@ -349,7 +349,7 @@ public:
   *
   * @return String with class content
   */
-  std::string asString(void) const throw();
+  std::string asString(void) const ;
 
 
   /**
@@ -357,7 +357,7 @@ public:
   *
   * @return XML with class content
   */
-  anna::xml::Node* asXML(anna::xml::Node* parent) const throw();
+  anna::xml::Node* asXML(anna::xml::Node* parent) const ;
 
 };