• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
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 SharedDateFormatSymbols : public SharedObject {
26 public:
SharedDateFormatSymbols(const Locale & loc,const char * type,UErrorCode & status)27     SharedDateFormatSymbols(
28             const Locale &loc, const char *type, UErrorCode &status)
29             : dfs(loc, type, status) { }
30     virtual ~SharedDateFormatSymbols();
get()31     const DateFormatSymbols &get() const { return dfs; }
32 private:
33     DateFormatSymbols dfs;
34     SharedDateFormatSymbols(const SharedDateFormatSymbols &) = delete;
35     SharedDateFormatSymbols &operator=(const SharedDateFormatSymbols &) = delete;
36 };
37 
38 template<> U_I18N_API
39 const SharedDateFormatSymbols *
40         LocaleCacheKey<SharedDateFormatSymbols>::createObject(
41             const void * /*unusedContext*/, UErrorCode &status) const;
42 
43 U_NAMESPACE_END
44 
45 #endif /* !UCONFIG_NO_FORMATTING */
46 
47 #endif
48