BloombergLP::bdlt::DefaultTimetableCache::initialize

Initialize the default timetable cache with no timeout.

Synopsis

Declared in <bdlt_defaulttimetablecache.h>

static
int
initialize(
    TimetableLoader* loader,
    bslma::Allocator* allocator);

Description

Initialize the default TimetableCache object managed by this class to use the specified loader to obtain timetables, to have no timeout, and to use the specified allocator to supply memory. If the default cache is already in the initialized state, this method has no effect. Return 0 on success, and a non-zero value otherwise. The behavior is undefined unless loader and allocator remain valid until a subsequent call to destroy.

Return Value

0 on success, and a non-zero value otherwise

Parameters

NameDescription
loadertimetable loader used to obtain timetables
allocatorallocator used to supply memory