diff options
author | Nay <dnpd.dd@gmail.com> | 2012-09-17 23:50:08 +0100 |
---|---|---|
committer | Nay <dnpd.dd@gmail.com> | 2012-09-17 23:50:08 +0100 |
commit | 23961d0dce22e234e62f116469f04bb62d8986a7 (patch) | |
tree | ab271f0a3fffa8f21f9ac7fd669f457beb9eb356 /dep/acelite/ace/ACE.h | |
parent | 2431895a54b38e4c0e6444c740ff2298e31e26e2 (diff) | |
parent | 2e21fa6b925c4572d620248f1b149a5d652836b2 (diff) |
Merge remote-tracking branch 'origin/master' into mmaps
Diffstat (limited to 'dep/acelite/ace/ACE.h')
-rw-r--r-- | dep/acelite/ace/ACE.h | 60 |
1 files changed, 41 insertions, 19 deletions
diff --git a/dep/acelite/ace/ACE.h b/dep/acelite/ace/ACE.h index 04b39a85652..58eb1f68947 100644 --- a/dep/acelite/ace/ACE.h +++ b/dep/acelite/ace/ACE.h @@ -4,7 +4,7 @@ /** * @file ACE.h * - * $Id: ACE.h 92060 2010-09-27 18:08:48Z johnnyw $ + * $Id: ACE.h 93276 2011-02-04 20:03:53Z olli $ * * This file contains value added ACE functions that extend the * behavior of the UNIX and Win32 OS calls. @@ -474,15 +474,23 @@ namespace ACE ACE_DIRECTORY_SEPARATOR_CHAR); /** - * Returns the given timestamp in the form - * "hour:minute:second:microsecond." The month, day, and year are - * also stored in the beginning of the @a date_and_time array, which - * is a user-supplied array of size @a time_len> @c ACE_TCHARs. - * Returns 0 if unsuccessful, else returns pointer to beginning of the - * "time" portion of @a date_and_time. If @a - * return_pointer_to_first_digit is 0 then return a pointer to the - * space before the time, else return a pointer to the beginning of - * the time portion. + * Translate the given timestamp to ISO-8601 format. + * + * @param time_value ACE_Time_Value to format. This is assumed to be + * an absolute time value. + * @param date_and_time Array to hold the timestamp. + * @param time_len Size of @a date_and_time in ACE_TCHARs. + * Must be greater than or equal to 27. + * @param return_pointer_to_first_digit If true, returned pointer value + * is to the first time digit, else to the space + * prior to the first time digit. See Return Values. + * + * @retval 0 if unsuccessful, with errno set. If @a time_len is less than + * 27 errno will be EINVAL. + * @retval If successful, pointer to beginning of the "time" portion of + * @a date_and_time. If @a return_pointer_to_first_digit is false + * the pointer is actually to the space before the time, else + * the pointer is to the first time digit. */ extern ACE_Export ACE_TCHAR *timestamp (const ACE_Time_Value& time_value, ACE_TCHAR date_and_time[], @@ -490,15 +498,21 @@ namespace ACE bool return_pointer_to_first_digit = false); /** - * Returns the current timestamp in the form - * "hour:minute:second:microsecond." The month, day, and year are - * also stored in the beginning of the @a date_and_time array, which - * is a user-supplied array of size @a time_len> @c ACE_TCHARs. - * Returns 0 if unsuccessful, else returns pointer to beginning of the - * "time" portion of @a date_and_time. If @a - * return_pointer_to_first_digit is 0 then return a pointer to the - * space before the time, else return a pointer to the beginning of - * the time portion. + * Translate the current time to ISO-8601 timestamp format. + * + * @param date_and_time Array to hold the timestamp. + * @param time_len Size of @a date_and_time in ACE_TCHARs. + * Must be greater than or equal to 27. + * @param return_pointer_to_first_digit If true, returned pointer value + * is to the first time digit, else to the space + * prior to the first time digit. See Return Values. + * + * @retval 0 if unsuccessful, with errno set. If @a time_len is less than + * 27 errno will be EINVAL. + * @retval If successful, pointer to beginning of the "time" portion of + * @a date_and_time. If @a return_pointer_to_first_digit is false + * the pointer is actually to the space before the time, else + * the pointer is to the first time digit. */ extern ACE_Export ACE_TCHAR *timestamp (ACE_TCHAR date_and_time[], size_t time_len, @@ -650,6 +664,14 @@ namespace ACE return !((a < b) || (a > b)); } + /// Helper to avoid comparing floating point values with != + /// (uses < and > operators). + template <typename T> + bool is_inequal (const T& a, const T& b) + { + return !is_equal (a, b); + } + /// Hex conversion utility. extern ACE_Export ACE_TCHAR nibble2hex (u_int n); |