Quick Links:

bal | bbl | bdl | bsl

Public Types | Static Public Member Functions

balber::BerUtil_TimezoneOffsetImpUtil Struct Reference

#include <balber_berutil.h>

List of all members.

Public Types

enum  { k_MIN_OFFSET = -1439, k_MAX_OFFSET = 1439, k_TIMEZONE_LENGTH = 2 }

Static Public Member Functions

static bool isValidTimezoneOffsetInMinutes (int value)
static int getTimezoneOffsetInMinutes (int *value, bsl::streambuf *streamBuf)
static int getTimezoneOffsetInMinutesIfValid (int *value, bsl::streambuf *streamBuf)
static int putTimezoneOffsetInMinutes (bsl::streambuf *streamBuf, int value)

Detailed Description

This component-private utility struct provides a namespace for a suite of functions and constants used by BerUtil to encode and decode time-zone values.

See Component balber_berutil


Member Enumeration Documentation

anonymous enum
Enumerator:
k_MIN_OFFSET 

The minimum number of minutes in a valid time-zone offset.

k_MAX_OFFSET 

The maximum number of minutes in a valid time-zone offset.

k_TIMEZONE_LENGTH 

The number of octets used in the encoding of a time-zone offset value. This number is constant: all time-zone values are encoded using 2 octets regardless of numeric value.


Member Function Documentation

static bool balber::BerUtil_TimezoneOffsetImpUtil::isValidTimezoneOffsetInMinutes ( int  value  )  [static]

Return true if the specified value is a valid time-zone offset, and return false otherwise. A time-zone offset is valid if it is greater than or equal to k_MIN_OFFSET and less than or equal to k_MAX_OFFSET.

static int balber::BerUtil_TimezoneOffsetImpUtil::getTimezoneOffsetInMinutes ( int *  value,
bsl::streambuf *  streamBuf 
) [static]

Read from the specified streamBuf and load to the specified value of the time-zone offset.

static int balber::BerUtil_TimezoneOffsetImpUtil::getTimezoneOffsetInMinutesIfValid ( int *  value,
bsl::streambuf *  streamBuf 
) [static]

Read a time zone offset value from the specified streamBuf. If the offset is greater than or equal to k_MIN_OFFSET and less than or equal to k_MAX_OFFSET then load the value of the offset to the specified value and return zero, otherwise do not modify the value addressed by value and return non-zero.

static int balber::BerUtil_TimezoneOffsetImpUtil::putTimezoneOffsetInMinutes ( bsl::streambuf *  streamBuf,
int  value 
) [static]

Write to the specified streamBuf the value of the specified time-zone offset value. The behavior is undefined unless k_MIN_OFFSET <= value and value <= k_MAX_OFFSET.


The documentation for this struct was generated from the following file: