michael@0: /*
michael@0: *****************************************************************************
michael@0: * Copyright (C) 2013, International Business Machines Corporation
michael@0: * and others. All Rights Reserved.
michael@0: *****************************************************************************
michael@0: *
michael@0: * File DANGICAL.H
michael@0: *****************************************************************************
michael@0: */
michael@0:
michael@0: #ifndef DANGICAL_H
michael@0: #define DANGICAL_H
michael@0:
michael@0: #include "unicode/utypes.h"
michael@0:
michael@0: #if !UCONFIG_NO_FORMATTING
michael@0:
michael@0: #include "unicode/calendar.h"
michael@0: #include "unicode/timezone.h"
michael@0: #include "chnsecal.h"
michael@0:
michael@0: U_NAMESPACE_BEGIN
michael@0:
michael@0: /**
michael@0: *
DangiCalendar
is a concrete subclass of {@link Calendar}
michael@0: * that implements a traditional Korean lunisolar calendar.
michael@0: *
michael@0: * DangiCalendar usually should be instantiated using
michael@0: * {@link com.ibm.icu.util.Calendar#getInstance(ULocale)} passing in a ULocale
michael@0: * with the tag "@calendar=dangi"
.
michael@0: *
michael@0: * @internal
michael@0: */
michael@0: class DangiCalendar : public ChineseCalendar {
michael@0: public:
michael@0: //-------------------------------------------------------------------------
michael@0: // Constructors...
michael@0: //-------------------------------------------------------------------------
michael@0:
michael@0: /**
michael@0: * Constructs a DangiCalendar based on the current time in the default time zone
michael@0: * with the given locale.
michael@0: *
michael@0: * @param aLocale The given locale.
michael@0: * @param success Indicates the status of DangiCalendar object construction.
michael@0: * Returns U_ZERO_ERROR if constructed successfully.
michael@0: * @internal
michael@0: */
michael@0: DangiCalendar(const Locale& aLocale, UErrorCode &success);
michael@0:
michael@0: /**
michael@0: * Copy Constructor
michael@0: * @internal
michael@0: */
michael@0: DangiCalendar(const DangiCalendar& other);
michael@0:
michael@0: /**
michael@0: * Destructor.
michael@0: * @internal
michael@0: */
michael@0: virtual ~DangiCalendar();
michael@0:
michael@0: /**
michael@0: * Clone.
michael@0: * @internal
michael@0: */
michael@0: virtual Calendar* clone() const;
michael@0:
michael@0: //----------------------------------------------------------------------
michael@0: // Internal methods & astronomical calculations
michael@0: //----------------------------------------------------------------------
michael@0:
michael@0: private:
michael@0:
michael@0: const TimeZone* getDangiCalZoneAstroCalc(void) const;
michael@0:
michael@0: // UObject stuff
michael@0: public:
michael@0: /**
michael@0: * @return The class ID for this object. All objects of a given class have the
michael@0: * same class ID. Objects of other classes have different class IDs.
michael@0: * @internal
michael@0: */
michael@0: virtual UClassID getDynamicClassID(void) const;
michael@0:
michael@0: /**
michael@0: * Return the class ID for this class. This is useful only for comparing to a return
michael@0: * value from getDynamicClassID(). For example:
michael@0: *
michael@0: * Base* polymorphic_pointer = createPolymorphicObject();
michael@0: * if (polymorphic_pointer->getDynamicClassID() ==
michael@0: * Derived::getStaticClassID()) ...
michael@0: *
michael@0: * @return The class ID for all objects of this class.
michael@0: * @internal
michael@0: */
michael@0: U_I18N_API static UClassID U_EXPORT2 getStaticClassID(void);
michael@0:
michael@0: /**
michael@0: * return the calendar type, "dangi".
michael@0: *
michael@0: * @return calendar type
michael@0: * @internal
michael@0: */
michael@0: const char * getType() const;
michael@0:
michael@0:
michael@0: private:
michael@0:
michael@0: DangiCalendar(); // default constructor not implemented
michael@0: };
michael@0:
michael@0: U_NAMESPACE_END
michael@0:
michael@0: #endif
michael@0: #endif
michael@0:
michael@0:
michael@0: