BloombergLP::bdlt::CalendarCache::getCalendar

Return a shared pointer to the named calendar, loading it if needed.

Synopsis

Declared in <bdlt_calendarcache.h>

bsl::shared_ptr<Calendar const>
getCalendar(char const* calendarName);

Description

Return a shared pointer providing non-modifiable access to the calendar having the specified calendarName in this calendar cache, loading the calendar into the cache using the loader that was supplied at construction if the calendar is not already present in the cache or if the calendar has expired (i.e., per a timeout optionally supplied at construction). If the loader fails, whether in loading a calendar for the first time or in reloading a calendar that has expired, return an empty shared pointer.

Return Value

shared pointer to the calendar, or empty if loading fails

Parameters

NameDescription
calendarNamename of the calendar to retrieve