List of all members.
Detailed Description
This component provides a concrete implementation of the DataLoader
protocol for loading, into a Zoneinfo
, the properties of a time zone defined by an Zoneinfo (TZ Database) binary file located on the file system.
See Component baltzo_datafileloader
Member Typedef Documentation
Constructor & Destructor Documentation
baltzo::DataFileLoader::DataFileLoader |
( |
|
) |
|
baltzo::DataFileLoader::DataFileLoader |
( |
const allocator_type & |
allocator |
) |
[explicit] |
Create an unconfigured data-file loader. Optionally specify an allocator
(e.g., the address of a bslma::Allocator
object) to supply memory; otherwise, the default allocator is used.
virtual baltzo::DataFileLoader::~DataFileLoader |
( |
|
) |
[virtual] |
Destroy this data-file loader.
Member Function Documentation
static bool baltzo::DataFileLoader::isPlausibleZoneinfoRootPath |
( |
const char * |
path |
) |
[static] |
Return true
if there currently exists a directory at the specified file-system path
that appears to contain Zoneinfo time-zone information files. This method verifies (at a minimum) that path
is a valid directory, and contains files for a subset of common time-zone identifiers, but does not guarantee path
is currently (or will remain) a correctly configured Zoneinfo database containing a complete set of time-zone data.
void baltzo::DataFileLoader::configureRootPath |
( |
const char * |
path |
) |
|
Unconditionally set, to the specified path
, the root of the file-system directory hierarchy from which this loader will read Zoneinfo binary time-zone information files.
int baltzo::DataFileLoader::configureRootPathIfPlausible |
( |
const char * |
path |
) |
|
Set, to the specified path
, the root of the file-system directory hierarchy from which this loader will read Zoneinfo binary time-zone information files. Return 0 on success, and a non-zero value (without no effect) if path
is not a directory that appears to contain valid Zoneinfo data, as determined by calling isPlausibleZoneinfoRootPath
on path
.
virtual int baltzo::DataFileLoader::loadTimeZone |
( |
Zoneinfo * |
result, |
|
|
const char * |
timeZoneId | |
|
) |
| | [virtual] |
Load into the specified result
the time-zone information for the time zone identified by the specified timeZoneId
. Return 0 on success, and a non-zero value otherwise. A return status of ErrorCode::k_UNSUPPORTED_ID
indicates that timeZoneId
is not recognized. If an error occurs during this operation, result
will be left in a valid, but unspecified state.
Implements baltzo::Loader.
int baltzo::DataFileLoader::loadTimeZoneFilePath |
( |
bsl::string * |
result, |
|
|
const char * |
timeZoneId | |
|
) |
| | const |
int baltzo::DataFileLoader::loadTimeZoneFilePath |
( |
std::string * |
result, |
|
|
const char * |
timeZoneId | |
|
) |
| | const |
Load into the specified result
the file-system path to the Zoneinfo binary data file corresponding to the specified timeZoneId
relative to the configured rootPath
. Return 0 on success, and a non-zero value otherwise. On error, result
is left in a valid, but unspecified state. The behavior is undefined unless either configureRootPath
or configureRootPathIfValid
has been called successfully. Note that this operation does not verify result
refers to a valid file on the file system, or whether the file (if it exists) contains valid Zoneinfo data.
const bsl::string& baltzo::DataFileLoader::rootPath |
( |
|
) |
const |
Return the root of the directory hierarchy from which this loader will attempt to load Zoneinfo binary data files. The behavior is undefined unless either configureRootPath
has been called or configureRootPathIfValid
has been called successfully.
bool baltzo::DataFileLoader::isRootPathPlausible |
( |
|
) |
const |
Return true
if the directory returned by the rootPath
method exists and appears to contain valid Zoneinfo time-zone information files, as determined by calling isPlausibleZoneinfoRootPath
on the value returned by the rootPath
method.
Return the allocator used by this object to supply memory. Note that if no allocator was supplied at construction the default allocator in effect at construction is used.
The documentation for this class was generated from the following file: