Quick Links:

bal | bbl | bdl | bsl

Static Public Member Functions

baltzo::DefaultZoneinfoCache Struct Reference

#include <baltzo_defaultzoneinfocache.h>

List of all members.

Static Public Member Functions

static ZoneinfoCachedefaultCache (ZoneinfoCache *cache=0)
static const char * defaultZoneinfoDataLocation ()
static void loadDefaultZoneinfoDataLocations (bsl::vector< const char * > *locations)
static void loadDefaultZoneinfoDataLocations (std::vector< const char * > *locations)
static ZoneinfoCachesetDefaultCache (ZoneinfoCache *cache)

Detailed Description

This struct provides a namespace for functions that manage and access the default time-zone data cache.

See Component baltzo_defaultzoneinfocache


Member Function Documentation

static ZoneinfoCache* baltzo::DefaultZoneinfoCache::defaultCache ( ZoneinfoCache cache = 0  )  [static]

Return the default ZoneinfoCache object for this process if the optionally specified cache is 0, and cache otherwise. If cache is 0, and the default Zoneinfo cache object has not been set -- either explicitly with a call to setDefaultCache, or implicitly through a prior call to this method -- then initialize a new ZoneinfoCache object, set the default cache object to the newly created object, and return its address.

static const char* baltzo::DefaultZoneinfoCache::defaultZoneinfoDataLocation (  )  [static]

Return a null terminated (C-style) string describing the default file-system path of the (expected) root of the Zoneinfo Database time-zone information files. The returned string will be the current value of the BDE_ZONEINFO_ROOT_PATH environment variable, if set, or else one of a (priority ordered) sequence of (platform-specific) standard directories, if one of those directories exists and contains a sub-set of expected files, and the current directory, otherwise. The behavior is undefined if the returned address is dereferenced after a subsequent call to the putenv POSIX function to set the BDE_ZONEINFO_ROOT_PATH environment variable.

static void baltzo::DefaultZoneinfoCache::loadDefaultZoneinfoDataLocations ( bsl::vector< const char * > *  locations  )  [static]
static void baltzo::DefaultZoneinfoCache::loadDefaultZoneinfoDataLocations ( std::vector< const char * > *  locations  )  [static]
static ZoneinfoCache* baltzo::DefaultZoneinfoCache::setDefaultCache ( ZoneinfoCache cache  )  [static]

Set the address of the default ZoneinfoCache object to the specified cache. Return the address of the default cache object that was set by a previous call to this method, or 0 if no call to this method was previously executed. The behavior is undefined unless (1) cache remains valid until the last operation is performed on this process's default cache, or a subsequent call to setDefaultCache, and (2) this method is not called from one thread while another thread is attempting to access the default time zone cache instance (i.e., this method is not thread-safe). Note that this method is intended for use only by the owner of main (and for testing purposes) where the caller affirmatively takes responsibility for the behavior of all clients of the default time zone cache.


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