In calendar.h Change fIsTimeSet, fAreFieldsSet, fAreAllFieldsSet, fAreFieldsVirtuallySet, fIsSet, fStamp from protected to private.
These fields are not needed for direct access from subclass. Change them from
protected to private empower us to optimize the memory usage in follow through PR.
in i18n/unicode/calendar.h
- protected:
+ private:
/**
* The flag which indicates if the current time is set in the calendar.
- * @stable ICU 2.0
*/
UBool fIsTimeSet;
/**
* True if the fields are in sync with the currently set time of this Calendar.
* If false, then the next attempt to get the value of a field will
* force a recomputation of all fields from the current value of the time
* field.
* <P>
* This should really be named areFieldsInSync, but the old name is retained
* for backward compatibility.
- * @stable ICU 2.0
*/
UBool fAreFieldsSet;
/**
* True if all of the fields have been set. This is initially false, and set to
* true by computeFields().
- * @stable ICU 2.0
*/
UBool fAreAllFieldsSet;
/**
* True if all fields have been virtually set, but have not yet been
* computed. This occurs only in setTimeInMillis(). A calendar set
* to this state will compute all fields from the time if it becomes
* necessary, but otherwise will delay such computation.
- * @stable ICU 3.0
*/
UBool fAreFieldsVirtuallySet;
#ifndef U_FORCE_HIDE_DEPRECATED_API
/**
* The flags which tell if a specified time field for the calendar is set.
- * @deprecated ICU 2.8 use (fStamp[n]!=kUnset)
*/
UBool fIsSet[UCAL_FIELD_COUNT];
#endif // U_FORCE_HIDE_DEPRECATED_API
/**
* Pseudo-time-stamps which specify when each field was set. There
* are two special values, UNSET and INTERNALLY_SET. Values from
* MINIMUM_USER_SET to Integer.MAX_VALUE are legal user set values.
- * @stable ICU 2.0
*/
int32_t fStamp[UCAL_FIELD_COUNT];
...Also, most of them are either needed for just the Calendar class itself (not the subclass), or could be replaced by calling to one of the following three public/protected functions…
--
You received this message because you are subscribed to the Google Groups "icu-design" group.
To unsubscribe from this group and stop receiving emails from it, send an email to icu-design+...@unicode.org.
To view this discussion visit https://groups.google.com/a/unicode.org/d/msgid/icu-design/CA%2B7fzPEAiEVZtkHW9%3DyDGWsG1uUZhkMCKbpkxA8ZUnkVoTG1Ag%40mail.gmail.com.
For more options, visit https://groups.google.com/a/unicode.org/d/optout.
--
You received this message because you are subscribed to the Google Groups "ICU - Team" group.
To unsubscribe from this group and stop receiving emails from it, send an email to icu-team+u...@unicode.org.
To view this discussion visit https://groups.google.com/a/unicode.org/d/msgid/icu-team/CA%2B7fzPEAiEVZtkHW9%3DyDGWsG1uUZhkMCKbpkxA8ZUnkVoTG1Ag%40mail.gmail.com.
Do we know any other companies that may have a higher probability to add code to implement subclass of ICU Calendar? Any guesses?
markus