6 #ifndef ACE_TIME_ZONE_PROCESSOR_CACHE_H
7 #define ACE_TIME_ZONE_PROCESSOR_CACHE_H
10 #include "OffsetDateTime.h"
11 #include "BasicZoneProcessor.h"
12 #include "ExtendedZoneProcessor.h"
13 #include "CompleteZoneProcessor.h"
25 template <
typename ZP>
30 mZoneProcessors(zoneProcessors)
34 uint8_t
size()
const {
return mSize; }
48 ZP* zoneProcessor = findUsingZoneKey(zoneKey);
49 if (zoneProcessor)
return zoneProcessor;
52 zoneProcessor = &mZoneProcessors[mCurrentIndex];
54 if (mCurrentIndex >= mSize) mCurrentIndex = 0;
55 zoneProcessor->setZoneKey(zoneKey);
74 ZP* findUsingZoneKey(uintptr_t zoneKey) {
75 for (uint8_t i = 0; i < mSize; i++) {
76 ZP* zoneProcessor = &mZoneProcessors[i];
77 if (zoneProcessor->equalsZoneKey(zoneKey)) {
86 uint8_t mCurrentIndex = 0;
87 ZP*
const mZoneProcessors;
94 using BasicZoneProcessorCacheBase =
95 ZoneProcessorCacheBaseTemplate<BasicZoneProcessor>;
101 using ExtendedZoneProcessorCacheBase =
102 ZoneProcessorCacheBaseTemplate<ExtendedZoneProcessor>;
108 using CompleteZoneProcessorCacheBase =
109 ZoneProcessorCacheBaseTemplate<CompleteZoneProcessor>;
121 template <u
int8_t SIZE>
147 template <u
int8_t SIZE>
174 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 CompleteZoneProcessorCacheBase where the cache of size SIZE is embedded into ...
A specific implementation of ExtendedZoneProcessorTemplate that uses the complete::ZoneXxxBrokers cla...
An implementation of an ExtendedZoneProcessorCacheBase where the cache of size SIZE is embedded into ...
A specific implementation of ExtendedZoneProcessorTemplate that uses the extended::Info::ZoneXxxBroke...
The template class of BasicZoneProcessorCacheBase or ExtendedZoneProcessorCacheBase.
ZP * getZoneProcessor(uintptr_t zoneKey)
Get ZoneProcessor from either a ZoneKey, basic::Info::ZoneInfo, an extended::Info::ZoneInfo,...
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.