dangical.h 3.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121
  1. // © 2016 and later: Unicode, Inc. and others.
  2. // License & terms of use: http://www.unicode.org/copyright.html
  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. #ifndef DANGICAL_H
  13. #define DANGICAL_H
  14. #include "unicode/utypes.h"
  15. #if !UCONFIG_NO_FORMATTING
  16. #include "unicode/calendar.h"
  17. #include "unicode/timezone.h"
  18. #include "chnsecal.h"
  19. U_NAMESPACE_BEGIN
  20. /**
  21. * <p><code>DangiCalendar</code> is a concrete subclass of {@link Calendar}
  22. * that implements a traditional Korean lunisolar calendar.</p>
  23. *
  24. * <p>DangiCalendar usually should be instantiated using
  25. * {@link com.ibm.icu.util.Calendar#getInstance(ULocale)} passing in a <code>ULocale</code>
  26. * with the tag <code>"@calendar=dangi"</code>.</p>
  27. *
  28. * @internal
  29. */
  30. class DangiCalendar : public ChineseCalendar {
  31. public:
  32. //-------------------------------------------------------------------------
  33. // Constructors...
  34. //-------------------------------------------------------------------------
  35. /**
  36. * Constructs a DangiCalendar based on the current time in the default time zone
  37. * with the given locale.
  38. *
  39. * @param aLocale The given locale.
  40. * @param success Indicates the status of DangiCalendar object construction.
  41. * Returns U_ZERO_ERROR if constructed successfully.
  42. * @internal
  43. */
  44. DangiCalendar(const Locale& aLocale, UErrorCode &success);
  45. /**
  46. * Copy Constructor
  47. * @internal
  48. */
  49. DangiCalendar(const DangiCalendar& other);
  50. /**
  51. * Destructor.
  52. * @internal
  53. */
  54. virtual ~DangiCalendar();
  55. /**
  56. * Clone.
  57. * @internal
  58. */
  59. virtual DangiCalendar* clone() const;
  60. //----------------------------------------------------------------------
  61. // Internal methods & astronomical calculations
  62. //----------------------------------------------------------------------
  63. private:
  64. const TimeZone* getDangiCalZoneAstroCalc(void) const;
  65. // UObject stuff
  66. public:
  67. /**
  68. * @return The class ID for this object. All objects of a given class have the
  69. * same class ID. Objects of other classes have different class IDs.
  70. * @internal
  71. */
  72. virtual UClassID getDynamicClassID(void) const;
  73. /**
  74. * Return the class ID for this class. This is useful only for comparing to a return
  75. * value from getDynamicClassID(). For example:
  76. *
  77. * Base* polymorphic_pointer = createPolymorphicObject();
  78. * if (polymorphic_pointer->getDynamicClassID() ==
  79. * Derived::getStaticClassID()) ...
  80. *
  81. * @return The class ID for all objects of this class.
  82. * @internal
  83. */
  84. U_I18N_API static UClassID U_EXPORT2 getStaticClassID(void);
  85. /**
  86. * return the calendar type, "dangi".
  87. *
  88. * @return calendar type
  89. * @internal
  90. */
  91. const char * getType() const;
  92. private:
  93. DangiCalendar(); // default constructor not implemented
  94. };
  95. U_NAMESPACE_END
  96. #endif
  97. #endif