6 #ifndef ACE_TIME_ZONE_PROCESSOR_CACHE_H
7 #define ACE_TIME_ZONE_PROCESSOR_CACHE_H
10 #include "TimeOffset.h"
11 #include "OffsetDateTime.h"
12 #include "BasicZoneProcessor.h"
13 #include "ExtendedZoneProcessor.h"
25 template <
typename ZP>
30 mZoneProcessors(zoneProcessors)
34 uint8_t
size()
const {
return mSize; }
47 ZP* zoneProcessor = findUsingZoneKey(zoneKey);
48 if (zoneProcessor)
return zoneProcessor;
51 zoneProcessor = &mZoneProcessors[mCurrentIndex];
53 if (mCurrentIndex >= mSize) mCurrentIndex = 0;
54 zoneProcessor->setZoneKey(zoneKey);
63 for (uint8_t i = 0; i < mSize; i++) {
64 ZP* zoneProcessor = &mZoneProcessors[i];
65 zoneProcessor->resetTransitionCache();
84 ZP* findUsingZoneKey(uintptr_t zoneKey) {
85 for (uint8_t i = 0; i < mSize; i++) {
86 ZP* zoneProcessor = &mZoneProcessors[i];
87 if (zoneProcessor->equalsZoneKey(zoneKey)) {
96 uint8_t mCurrentIndex = 0;
97 ZP*
const mZoneProcessors;
104 using BasicZoneProcessorCacheBase =
105 ZoneProcessorCacheBaseTemplate<BasicZoneProcessor>;
111 using ExtendedZoneProcessorCacheBase =
112 ZoneProcessorCacheBaseTemplate<ExtendedZoneProcessor>;
125 template <u
int8_t SIZE>
151 template <u
int8_t SIZE>
175 template <u
int8_t SIZE>
179 template <u
int8_t SIZE>
An implementation of a BasicZoneProcessorCacheBase where the cache of size SIZE is embedded into the ...
A specific implementation of BasicZoneProcessorTemplate that uses ZoneXxxBrokers which read from zone...
An implementation of an ExtendedZoneProcessorCacheBase where the cache of size SIZE is embedded into ...
A specific implementation of ExtendedZoneProcessorTemplate that uses ZoneXxxBrokers which read from z...
The template class of BasicZoneProcessorCacheBase or ExtendedZoneProcessorCacheBase.
ZP * getZoneProcessor(uintptr_t zoneKey)
Get ZoneProcessor from either a ZoneKey, either a basic::ZoneInfo or an extended::ZoneInfo.
void resetZoneProcessors()
Reset the transition cache of all zone processors in the cache.
ZP * getZoneProcessorAtIndex(uint8_t i)
Get the ZoneProcessor at index i.
uint8_t size() const
Return the size of the cache.
Identifiers used by implementation code which need to be publically exported.