Constructors
Synopses
Declared in <bdlt_timetablecache.h>
Create an empty timetable cache that uses the specified loader to load timetables on demand and has no timeout. Optionally specify a basicAllocator used to supply memory. If basicAllocator is 0, the currently installed default allocator is used. Timetables loaded into this cache remain valid for retrieval until they have been explicitly invalidated (via either the invalidate or invalidateAll methods), or until this object is destroyed. The behavior is undefined unless loader remains valid throughout the lifetime of this cache.
explicit
TimetableCache(
TimetableLoader* loader,
bslma::Allocator* basicAllocator = 0);
Create an empty timetable cache that uses the specified loader to load timetables on demand and has the specified timeout interval indicating the length of time that timetables remain valid for subsequent retrieval from the cache after they have been loaded. Optionally specify a basicAllocator used to supply memory. If basicAllocator is 0, the currently installed default allocator is used. The behavior is undefined unless bsls::TimeInterval() <= timeout <= bsls::TimeInterval(INT_MAX, 0), and loader remains valid throughout the lifetime of this cache. Note that a timeout value of 0 indicates that a timetable will be loaded into the cache by each (successful) call to the getTimetable method.
TimetableCache(
TimetableLoader* loader,
bsls::TimeInterval const& timeout,
bslma::Allocator* basicAllocator = 0);
Created with MrDocs