6 #ifndef ACE_TIME_ZONE_PROCESSOR_CACHE_H
7 #define ACE_TIME_ZONE_PROCESSOR_CACHE_H
9 #include "common/common.h"
10 #include "TimeOffset.h"
11 #include "OffsetDateTime.h"
12 #include "BasicZoneProcessor.h"
13 #include "ExtendedZoneProcessor.h"
28 template<u
int8_t SIZE,
typename ZP>
38 ZP* zoneProcessor = findUsingZoneKey(zoneKey);
39 if (zoneProcessor)
return zoneProcessor;
42 zoneProcessor = &mZoneProcessors[mCurrentIndex];
44 if (mCurrentIndex >= SIZE) mCurrentIndex = 0;
45 zoneProcessor->setZoneKey(zoneKey);
51 return &mZoneProcessors[i];
65 ZP* findUsingZoneKey(uintptr_t zoneKey) {
66 for (uint8_t i = 0; i < SIZE; i++) {
67 ZP* zoneProcessor = &mZoneProcessors[i];
68 if (zoneProcessor->equalsZoneKey(zoneKey)) {
75 uint8_t mCurrentIndex = 0;
76 ZP mZoneProcessors[SIZE];
80 template<u
int8_t SIZE>
82 SIZE, BasicZoneProcessor> {
85 template<u
int8_t SIZE>
87 SIZE, ExtendedZoneProcessor> {
97 template<u
int8_t SIZE>
101 template<u
int8_t SIZE>