tor-browser

The Tor Browser
git clone https://git.dasho.dev/tor-browser.git
Log | Files | Refs | README | LICENSE

dangical.h (3013B)


      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 
     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 
     24 U_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 */
     36 class 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 DangiCalendar* clone() const override;
     70 
     71 private:
     72 
     73  // UObject stuff
     74 public: 
     75  /**
     76   * @return   The class ID for this object. All objects of a given class have the
     77   *           same class ID. Objects of other classes have different class IDs.
     78   * @internal
     79   */
     80  virtual UClassID getDynamicClassID() const override;
     81 
     82  /**
     83   * Return the class ID for this class. This is useful only for comparing to a return
     84   * value from getDynamicClassID(). For example:
     85   *
     86   *      Base* polymorphic_pointer = createPolymorphicObject();
     87   *      if (polymorphic_pointer->getDynamicClassID() ==
     88   *          Derived::getStaticClassID()) ...
     89   *
     90   * @return   The class ID for all objects of this class.
     91   * @internal
     92   */
     93  U_I18N_API static UClassID U_EXPORT2 getStaticClassID();
     94 
     95  /**
     96   * return the calendar type, "dangi".
     97   *
     98   * @return calendar type
     99   * @internal
    100   */
    101  const char * getType() const override;
    102 
    103 protected:
    104  virtual Setting getSetting(UErrorCode& status) const override;
    105 
    106 private:
    107 
    108  DangiCalendar(); // default constructor not implemented
    109 };
    110 
    111 U_NAMESPACE_END
    112 
    113 #endif
    114 #endif