ICU-2202 C++ format getLocale API placeholders

X-SVN-Rev: 13729
This commit is contained in:
Vladimir Weinstein 2003-11-14 21:53:10 +00:00
parent b951442768
commit d4e8b6d20b
7 changed files with 52 additions and 0 deletions

View File

@ -386,6 +386,12 @@ DateFormat::isLenient() const
return fCalendar->isLenient(); return fCalendar->isLenient();
} }
Locale
DateFormat::getLocale(ULocDataLocaleType type, UErrorCode& status) const
{
return Locale("");
}
U_NAMESPACE_END U_NAMESPACE_END
#endif /* #if !UCONFIG_NO_FORMATTING */ #endif /* #if !UCONFIG_NO_FORMATTING */

View File

@ -1388,6 +1388,12 @@ const DateFormat* MessageFormat::getDefaultDateFormat(UErrorCode& ec) const {
return defaultDateFormat; return defaultDateFormat;
} }
Locale
MessageFormat::getLocale(ULocDataLocaleType type, UErrorCode& status) const
{
return Locale("");
}
U_NAMESPACE_END U_NAMESPACE_END
#endif /* #if !UCONFIG_NO_FORMATTING */ #endif /* #if !UCONFIG_NO_FORMATTING */

View File

@ -737,6 +737,13 @@ NumberFormat::makeInstance(const Locale& desiredLocale,
return f; return f;
} }
Locale
NumberFormat::getLocale(ULocDataLocaleType type, UErrorCode& status) const
{
return Locale("");
}
U_NAMESPACE_END U_NAMESPACE_END
// defined in ucln_cmn.h // defined in ucln_cmn.h

View File

@ -603,6 +603,14 @@ public:
virtual void setTimeZone(const TimeZone& zone); virtual void setTimeZone(const TimeZone& zone);
/** Get the locale for this date format object. You can choose between valid and actual locale.
* @param type type of the locale we're looking for (valid or actual)
* @param status error code for the operation
* @return the locale
* @draft ICU 2.8
*/
virtual Locale getLocale(ULocDataLocaleType type, UErrorCode& status) const;
protected: protected:
/** /**
* Default constructor. Creates a DateFormat with no Calendar or NumberFormat * Default constructor. Creates a DateFormat with no Calendar or NumberFormat

View File

@ -31,6 +31,7 @@
#include "unicode/fieldpos.h" #include "unicode/fieldpos.h"
#include "unicode/parsepos.h" #include "unicode/parsepos.h"
#include "unicode/parseerr.h" #include "unicode/parseerr.h"
#include "unicode/locid.h"
U_NAMESPACE_BEGIN U_NAMESPACE_BEGIN
/** /**
@ -232,6 +233,14 @@ public:
*/ */
virtual UClassID getDynamicClassID() const = 0; virtual UClassID getDynamicClassID() const = 0;
/** Get the locale for this format object. You can choose between valid and actual locale.
* @param type type of the locale we're looking for (valid or actual)
* @param status error code for the operation
* @return the locale
* @draft ICU 2.8
*/
virtual Locale getLocale(ULocDataLocaleType type, UErrorCode& status) const = 0;
protected: protected:
/** /**
* Default constructor for subclass use only. Does nothing. * Default constructor for subclass use only. Does nothing.

View File

@ -595,6 +595,14 @@ public:
*/ */
static UClassID getStaticClassID(void); static UClassID getStaticClassID(void);
/** Get the locale for this date format object. You can choose between valid and actual locale.
* @param type type of the locale we're looking for (valid or actual)
* @param status error code for the operation
* @return the locale
* @draft ICU 2.8
*/
virtual Locale getLocale(ULocDataLocaleType type, UErrorCode& status) const;
private: private:
Locale fLocale; Locale fLocale;

View File

@ -616,6 +616,14 @@ public:
*/ */
const UChar* getCurrency() const; const UChar* getCurrency() const;
/** Get the locale for this numeric format object. You can choose between valid and actual locale.
* @param type type of the locale we're looking for (valid or actual)
* @param status error code for the operation
* @return the locale
* @draft ICU 2.8
*/
virtual Locale getLocale(ULocDataLocaleType type, UErrorCode& status) const;
public: public:
/** /**