shareddateformatsymbols.h (1420B)
1 // © 2016 and later: Unicode, Inc. and others. 2 // License & terms of use: http://www.unicode.org/copyright.html 3 /* 4 ****************************************************************************** 5 * Copyright (C) 2014, International Business Machines 6 * Corporation and others. All Rights Reserved. 7 ****************************************************************************** 8 * shareddateformatsymbols.h 9 */ 10 11 #ifndef __SHARED_DATEFORMATSYMBOLS_H__ 12 #define __SHARED_DATEFORMATSYMBOLS_H__ 13 14 #include "unicode/utypes.h" 15 16 #if !UCONFIG_NO_FORMATTING 17 18 #include "sharedobject.h" 19 #include "unicode/dtfmtsym.h" 20 #include "unifiedcache.h" 21 22 U_NAMESPACE_BEGIN 23 24 25 class U_I18N_API_CLASS SharedDateFormatSymbols : public SharedObject { 26 public: 27 U_I18N_API SharedDateFormatSymbols(const Locale& loc, const char* type, UErrorCode& status) 28 : dfs(loc, type, status) {} 29 U_I18N_API virtual ~SharedDateFormatSymbols(); 30 U_I18N_API const DateFormatSymbols& get() const { return dfs; } 31 private: 32 DateFormatSymbols dfs; 33 SharedDateFormatSymbols(const SharedDateFormatSymbols &) = delete; 34 SharedDateFormatSymbols &operator=(const SharedDateFormatSymbols &) = delete; 35 }; 36 37 template<> U_I18N_API 38 const SharedDateFormatSymbols * 39 LocaleCacheKey<SharedDateFormatSymbols>::createObject( 40 const void * /*unusedContext*/, UErrorCode &status) const; 41 42 U_NAMESPACE_END 43 44 #endif /* !UCONFIG_NO_FORMATTING */ 45 46 #endif