[#BloombergLP-baltzo-DataFileLoader] = xref:BloombergLP.adoc[BloombergLP]::xref:BloombergLP/baltzo.adoc[baltzo]::DataFileLoader :relfileprefix: ../../ :mrdocs: 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. == Synopsis Declared in `<baltzo_datafileloader.h>` [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- class DataFileLoader : public xref:BloombergLP/baltzo/Loader.adoc[Loader] ---- == Base Classes [cols="1,4"] |=== | Name| Description | `xref:BloombergLP/baltzo/Loader.adoc[Loader]` | This class provides a protocol (a pure abstract interface) for loading a time zone object. |=== == Type Aliases [cols="1,4"] |=== | Name| Description | xref:BloombergLP/baltzo/DataFileLoader/allocator_type.adoc[`allocator_type`] | Allocator type used by this class. |=== == Member Functions [cols="1,4"] |=== | Name| Description | xref:BloombergLP/baltzo/DataFileLoader/2constructor-08.adoc[`DataFileLoader`] [.small]#[constructor]# | Constructors | xref:BloombergLP/baltzo/DataFileLoader/2destructor.adoc[`~DataFileLoader`] [.small]#[destructor]# [.small]#[virtual]# | Destroy this data‐file loader. | xref:BloombergLP/baltzo/DataFileLoader/configureRootPath.adoc[`configureRootPath`] | 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. | xref:BloombergLP/baltzo/DataFileLoader/configureRootPathIfPlausible.adoc[`configureRootPathIfPlausible`] | 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`. | xref:BloombergLP/baltzo/DataFileLoader/get_allocator.adoc[`get_allocator`] | 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. | xref:BloombergLP/baltzo/DataFileLoader/isRootPathPlausible.adoc[`isRootPathPlausible`] | 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. | xref:BloombergLP/baltzo/DataFileLoader/loadTimeZone.adoc[`loadTimeZone`] [.small]#[virtual]# | Load into the specified `result` the time‐zone information for the time zone identified by the specified `timeZoneId`. The `result` will have a sentinel transition at 01‐01‐001, meeting the first two requirements for a "well‐formed" object (see `baltzo::ZoneinfoUtil::isWellFormed` documentation). 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. | xref:BloombergLP/baltzo/DataFileLoader/loadTimeZoneFilePath-09.adoc[`loadTimeZoneFilePath`] | `loadTimeZoneFilePath` overloads | xref:BloombergLP/baltzo/DataFileLoader/loadTimeZoneRaw.adoc[`loadTimeZoneRaw`] | Load into the specified `result` the time‐zone information for the time zone identified by the specified `timeZoneId` exactly in accordance with the original data. The `result` may not be a "well‐formed" object (see `baltzo::ZoneinfoUtil::isWellFormed` documentation for details). 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. Note that time zone data files created by certain versions of the `zic` time zone compiler will have a sentinel transition prior to 01‐01‐0001 (the first representable `Datetime` value) and the `result` will therefore be non‐well formed (use `loadTimeZone` instead). | xref:BloombergLP/baltzo/DataFileLoader/rootPath.adoc[`rootPath`] | 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. | xref:BloombergLP/baltzo/DataFileLoader/2conversion.adoc[`operator BloombergLP::bslmf::NestedTraitDeclaration<DataFileLoader, UsesBslmaAllocator>`] | Nested trait declaration for `bslma::UsesBslmaAllocator`. |=== == Static Member Functions [cols="1,4"] |=== | Name| Description | xref:BloombergLP/baltzo/DataFileLoader/isPlausibleZoneinfoRootPath.adoc[`isPlausibleZoneinfoRootPath`] | 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. |=== [.small]#Created with https://www.mrdocs.com[MrDocs]#