OLD | NEW |
1 /* | 1 /* |
2 ******************************************************************************** | 2 ******************************************************************************** |
3 * Copyright (C) 1997-2013, International Business Machines | 3 * Copyright (C) 1997-2014, International Business Machines |
4 * Corporation and others. All Rights Reserved. | 4 * Corporation and others. All Rights Reserved. |
5 ******************************************************************************** | 5 ******************************************************************************** |
6 * | 6 * |
7 * File FMTABLE.H | 7 * File FMTABLE.H |
8 * | 8 * |
9 * Modification History: | 9 * Modification History: |
10 * | 10 * |
11 * Date Name Description | 11 * Date Name Description |
12 * 02/29/97 aliu Creation. | 12 * 02/29/97 aliu Creation. |
13 ******************************************************************************** | 13 ******************************************************************************** |
(...skipping 577 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
591 */ | 591 */ |
592 virtual UClassID getDynamicClassID() const; | 592 virtual UClassID getDynamicClassID() const; |
593 | 593 |
594 /** | 594 /** |
595 * ICU "poor man's RTTI", returns a UClassID for this class. | 595 * ICU "poor man's RTTI", returns a UClassID for this class. |
596 * | 596 * |
597 * @stable ICU 2.2 | 597 * @stable ICU 2.2 |
598 */ | 598 */ |
599 static UClassID U_EXPORT2 getStaticClassID(); | 599 static UClassID U_EXPORT2 getStaticClassID(); |
600 | 600 |
601 #ifndef U_HIDE_DRAFT_API | |
602 /** | 601 /** |
603 * Convert the UFormattable to a Formattable. Internally, this is a reinter
pret_cast. | 602 * Convert the UFormattable to a Formattable. Internally, this is a reinter
pret_cast. |
604 * @param fmt a valid UFormattable | 603 * @param fmt a valid UFormattable |
605 * @return the UFormattable as a Formattable object pointer. This is an ali
as to the original | 604 * @return the UFormattable as a Formattable object pointer. This is an ali
as to the original |
606 * UFormattable, and so is only valid while the original argument remains in
scope. | 605 * UFormattable, and so is only valid while the original argument remains in
scope. |
607 * @draft ICU 52 | 606 * @stable ICU 52 |
608 */ | 607 */ |
609 static inline Formattable *fromUFormattable(UFormattable *fmt); | 608 static inline Formattable *fromUFormattable(UFormattable *fmt); |
610 | 609 |
611 /** | 610 /** |
612 * Convert the const UFormattable to a const Formattable. Internally, this
is a reinterpret_cast. | 611 * Convert the const UFormattable to a const Formattable. Internally, this
is a reinterpret_cast. |
613 * @param fmt a valid UFormattable | 612 * @param fmt a valid UFormattable |
614 * @return the UFormattable as a Formattable object pointer. This is an ali
as to the original | 613 * @return the UFormattable as a Formattable object pointer. This is an ali
as to the original |
615 * UFormattable, and so is only valid while the original argument remains in
scope. | 614 * UFormattable, and so is only valid while the original argument remains in
scope. |
616 * @draft ICU 52 | 615 * @stable ICU 52 |
617 */ | 616 */ |
618 static inline const Formattable *fromUFormattable(const UFormattable *fmt); | 617 static inline const Formattable *fromUFormattable(const UFormattable *fmt); |
619 | 618 |
620 /** | 619 /** |
621 * Convert this object pointer to a UFormattable. | 620 * Convert this object pointer to a UFormattable. |
622 * @return this object as a UFormattable pointer. This is an alias to this
object, | 621 * @return this object as a UFormattable pointer. This is an alias to this
object, |
623 * and so is only valid while this object remains in scope. | 622 * and so is only valid while this object remains in scope. |
624 * @draft ICU 52 | 623 * @stable ICU 52 |
625 */ | 624 */ |
626 inline UFormattable *toUFormattable(); | 625 inline UFormattable *toUFormattable(); |
627 | 626 |
628 /** | 627 /** |
629 * Convert this object pointer to a UFormattable. | 628 * Convert this object pointer to a UFormattable. |
630 * @return this object as a UFormattable pointer. This is an alias to this
object, | 629 * @return this object as a UFormattable pointer. This is an alias to this
object, |
631 * and so is only valid while this object remains in scope. | 630 * and so is only valid while this object remains in scope. |
632 * @draft ICU 52 | 631 * @stable ICU 52 |
633 */ | 632 */ |
634 inline const UFormattable *toUFormattable() const; | 633 inline const UFormattable *toUFormattable() const; |
635 #endif /* U_HIDE_DRAFT_API */ | |
636 | 634 |
637 #ifndef U_HIDE_DEPRECATED_API | 635 #ifndef U_HIDE_DEPRECATED_API |
638 /** | 636 /** |
639 * Deprecated variant of getLong(UErrorCode&). | 637 * Deprecated variant of getLong(UErrorCode&). |
640 * @param status the error code | 638 * @param status the error code |
641 * @return the long value of this object. | 639 * @return the long value of this object. |
642 * @deprecated ICU 3.0 use getLong(UErrorCode&) instead | 640 * @deprecated ICU 3.0 use getLong(UErrorCode&) instead |
643 */ | 641 */ |
644 inline int32_t getLong(UErrorCode* status) const; | 642 inline int32_t getLong(UErrorCode* status) const; |
645 #endif /* U_HIDE_DEPRECATED_API */ | 643 #endif /* U_HIDE_DEPRECATED_API */ |
(...skipping 85 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
731 inline UnicodeString& Formattable::getString(void) { | 729 inline UnicodeString& Formattable::getString(void) { |
732 return *fValue.fString; | 730 return *fValue.fString; |
733 } | 731 } |
734 | 732 |
735 #ifndef U_HIDE_DEPRECATED_API | 733 #ifndef U_HIDE_DEPRECATED_API |
736 inline int32_t Formattable::getLong(UErrorCode* status) const { | 734 inline int32_t Formattable::getLong(UErrorCode* status) const { |
737 return getLong(*status); | 735 return getLong(*status); |
738 } | 736 } |
739 #endif /* U_HIDE_DEPRECATED_API */ | 737 #endif /* U_HIDE_DEPRECATED_API */ |
740 | 738 |
741 #ifndef U_HIDE_DRAFT_API | |
742 inline UFormattable* Formattable::toUFormattable() { | 739 inline UFormattable* Formattable::toUFormattable() { |
743 return reinterpret_cast<UFormattable*>(this); | 740 return reinterpret_cast<UFormattable*>(this); |
744 } | 741 } |
745 | 742 |
746 inline const UFormattable* Formattable::toUFormattable() const { | 743 inline const UFormattable* Formattable::toUFormattable() const { |
747 return reinterpret_cast<const UFormattable*>(this); | 744 return reinterpret_cast<const UFormattable*>(this); |
748 } | 745 } |
749 | 746 |
750 inline Formattable* Formattable::fromUFormattable(UFormattable *fmt) { | 747 inline Formattable* Formattable::fromUFormattable(UFormattable *fmt) { |
751 return reinterpret_cast<Formattable *>(fmt); | 748 return reinterpret_cast<Formattable *>(fmt); |
752 } | 749 } |
753 | 750 |
754 inline const Formattable* Formattable::fromUFormattable(const UFormattable *fmt)
{ | 751 inline const Formattable* Formattable::fromUFormattable(const UFormattable *fmt)
{ |
755 return reinterpret_cast<const Formattable *>(fmt); | 752 return reinterpret_cast<const Formattable *>(fmt); |
756 } | 753 } |
757 #endif /* U_HIDE_DRAFT_API */ | |
758 | 754 |
759 U_NAMESPACE_END | 755 U_NAMESPACE_END |
760 | 756 |
761 #endif /* #if !UCONFIG_NO_FORMATTING */ | 757 #endif /* #if !UCONFIG_NO_FORMATTING */ |
762 | 758 |
763 #endif //_FMTABLE | 759 #endif //_FMTABLE |
764 //eof | 760 //eof |
OLD | NEW |