shareddateformatsymbols.h 1.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  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. #ifndef __SHARED_DATEFORMATSYMBOLS_H__
  11. #define __SHARED_DATEFORMATSYMBOLS_H__
  12. #include "unicode/utypes.h"
  13. #if !UCONFIG_NO_FORMATTING
  14. #include "sharedobject.h"
  15. #include "unicode/dtfmtsym.h"
  16. #include "unifiedcache.h"
  17. U_NAMESPACE_BEGIN
  18. class U_I18N_API SharedDateFormatSymbols : public SharedObject {
  19. public:
  20. SharedDateFormatSymbols(
  21. const Locale &loc, const char *type, UErrorCode &status)
  22. : dfs(loc, type, status) { }
  23. virtual ~SharedDateFormatSymbols();
  24. const DateFormatSymbols &get() const { return dfs; }
  25. private:
  26. DateFormatSymbols dfs;
  27. SharedDateFormatSymbols(const SharedDateFormatSymbols &) = delete;
  28. SharedDateFormatSymbols &operator=(const SharedDateFormatSymbols &) = delete;
  29. };
  30. template<> U_I18N_API
  31. const SharedDateFormatSymbols *
  32. LocaleCacheKey<SharedDateFormatSymbols>::createObject(
  33. const void * /*unusedContext*/, UErrorCode &status) const;
  34. U_NAMESPACE_END
  35. #endif /* !UCONFIG_NO_FORMATTING */
  36. #endif