]> git.saurik.com Git - apple/icu.git/blame - icuSources/i18n/dangical.h
ICU-64243.0.1.tar.gz
[apple/icu.git] / icuSources / i18n / dangical.h
CommitLineData
f3c0d7a5
A
1// © 2016 and later: Unicode, Inc. and others.
2// License & terms of use: http://www.unicode.org/copyright.html
51004dcb
A
3/*
4 *****************************************************************************
5 * Copyright (C) 2013, International Business Machines Corporation
6 * and others. All Rights Reserved.
7 *****************************************************************************
8 *
9 * File DANGICAL.H
10 *****************************************************************************
11 */
12
13#ifndef DANGICAL_H
14#define DANGICAL_H
15
16#include "unicode/utypes.h"
17
18#if !UCONFIG_NO_FORMATTING
19
20#include "unicode/calendar.h"
21#include "unicode/timezone.h"
22#include "chnsecal.h"
23
24U_NAMESPACE_BEGIN
25
26/**
27 * <p><code>DangiCalendar</code> is a concrete subclass of {@link Calendar}
28 * that implements a traditional Korean lunisolar calendar.</p>
29 *
30 * <p>DangiCalendar usually should be instantiated using
31 * {@link com.ibm.icu.util.Calendar#getInstance(ULocale)} passing in a <code>ULocale</code>
32 * with the tag <code>"@calendar=dangi"</code>.</p>
33 *
34 * @internal
35 */
36class DangiCalendar : public ChineseCalendar {
37 public:
38 //-------------------------------------------------------------------------
39 // Constructors...
40 //-------------------------------------------------------------------------
41
42 /**
43 * Constructs a DangiCalendar based on the current time in the default time zone
44 * with the given locale.
45 *
46 * @param aLocale The given locale.
47 * @param success Indicates the status of DangiCalendar object construction.
48 * Returns U_ZERO_ERROR if constructed successfully.
49 * @internal
50 */
51 DangiCalendar(const Locale& aLocale, UErrorCode &success);
52
53 /**
54 * Copy Constructor
55 * @internal
56 */
57 DangiCalendar(const DangiCalendar& other);
58
59 /**
60 * Destructor.
61 * @internal
62 */
63 virtual ~DangiCalendar();
64
65 /**
66 * Clone.
67 * @internal
68 */
69 virtual Calendar* clone() const;
70
71 //----------------------------------------------------------------------
72 // Internal methods & astronomical calculations
73 //----------------------------------------------------------------------
74
75 private:
76
77 const TimeZone* getDangiCalZoneAstroCalc(void) const;
78
79 // UObject stuff
80 public:
81 /**
82 * @return The class ID for this object. All objects of a given class have the
83 * same class ID. Objects of other classes have different class IDs.
84 * @internal
85 */
86 virtual UClassID getDynamicClassID(void) const;
87
88 /**
89 * Return the class ID for this class. This is useful only for comparing to a return
90 * value from getDynamicClassID(). For example:
91 *
92 * Base* polymorphic_pointer = createPolymorphicObject();
93 * if (polymorphic_pointer->getDynamicClassID() ==
94 * Derived::getStaticClassID()) ...
95 *
96 * @return The class ID for all objects of this class.
97 * @internal
98 */
99 U_I18N_API static UClassID U_EXPORT2 getStaticClassID(void);
100
101 /**
102 * return the calendar type, "dangi".
103 *
104 * @return calendar type
105 * @internal
106 */
107 const char * getType() const;
108
109
110 private:
111
112 DangiCalendar(); // default constructor not implemented
113};
114
115U_NAMESPACE_END
116
117#endif
118#endif
119
120
121