* Copy constructor. Needed to support cloning.
*/
CacheKeyBase(const CacheKeyBase &other)
- : creationStatus(other.creationStatus) { }
+ : UObject(other), creationStatus(other.creationStatus) { }
virtual ~CacheKeyBase();
/**
Locale fLoc;
public:
LocaleCacheKey(const Locale &loc) : fLoc(loc) {};
+ LocaleCacheKey(const LocaleCacheKey &other)
+ : CacheKey<T>(other), fLoc(other.fLoc) { }
virtual ~LocaleCacheKey() { }
virtual int32_t hashCode() const {
return 37 *CacheKey<T>::hashCode() + fLoc.hashCode();
}
};
+U_NAMESPACE_BEGIN
+
template<> U_EXPORT
const UCTMultiThreadItem *LocaleCacheKey<UCTMultiThreadItem>::createObject(
const void * /*unused*/, UErrorCode & /* status */) const {
return result;
}
+U_NAMESPACE_END
+
class UnifiedCacheThread: public SimpleThread {
public:
UnifiedCacheThread(const char *loc) : fLoc(loc) {};
class UCTItem2 : public SharedObject {
};
+U_NAMESPACE_BEGIN
+
template<> U_EXPORT
const UCTItem *LocaleCacheKey<UCTItem>::createObject(
const void * /*unused*/, UErrorCode &status) const {
return NULL;
}
+U_NAMESPACE_END
+
+
class UnifiedCacheTest : public IntlTest {
public:
UnifiedCacheTest() {