- Main Page
- Related Pages
- Modules
- Data Structures
- Files

- File List
- Globals

# locdspnm.h

Go to the documentation of this file.

    00001 /*
    00002 ******************************************************************************
    00003 * Copyright (C) 2010, International Business Machines Corporation and        *
    00004 * others. All Rights Reserved.                                               *
    00005 ******************************************************************************
    00006 */
    00007
    00008 #ifndef LOCDSPNM_H
    00009 #define LOCDSPNM_H
    00010
    00011 #include "unicode/utypes.h"
    00012
    00018 #if !UCONFIG_NO_FORMATTING
    00019
    00020 #include "unicode/locid.h"
    00021 #include "unicode/uscript.h"
    00022 #include "unicode/uldnames.h"
    00023
    00024 U_NAMESPACE_BEGIN
    00025
    00032 class U_I18N_API LocaleDisplayNames : public UObject {
    00033 public:
    00038     virtual ~LocaleDisplayNames();
    00039
    00048     static LocaleDisplayNames* U_EXPORT2 createInstance(const Locale& locale);
    00049
    00060     static LocaleDisplayNames* U_EXPORT2 createInstance(const Locale& locale,
    00061                                                         UDialectHandling dialectHandling);
    00062
    00063     // getters for state
    00070     virtual const Locale& getLocale() const = 0;
    00071
    00077     virtual UDialectHandling getDialectHandling() const = 0;
    00078
    00079     // names for entire locales
    00087     virtual UnicodeString& localeDisplayName(const Locale& locale,
    00088                                              UnicodeString& result) const = 0;
    00089
    00097     virtual UnicodeString& localeDisplayName(const char* localeId,
    00098                                              UnicodeString& result) const = 0;
    00099
    00100     // names for components of a locale id
    00108     virtual UnicodeString& languageDisplayName(const char* lang,
    00109                                                UnicodeString& result) const = 0;
    00110
    00118     virtual UnicodeString& scriptDisplayName(const char* script,
    00119                                              UnicodeString& result) const = 0;
    00120
    00128     virtual UnicodeString& scriptDisplayName(UScriptCode scriptCode,
    00129                                              UnicodeString& result) const = 0;
    00130
    00138     virtual UnicodeString& regionDisplayName(const char* region,
    00139                                              UnicodeString& result) const = 0;
    00140
    00148     virtual UnicodeString& variantDisplayName(const char* variant,
    00149                                               UnicodeString& result) const = 0;
    00150
    00158     virtual UnicodeString& keyDisplayName(const char* key,
    00159                                           UnicodeString& result) const = 0;
    00160
    00169     virtual UnicodeString& keyValueDisplayName(const char* key, const char* value,
    00170                                                UnicodeString& result) const = 0;
    00171
    00177     static UClassID U_EXPORT2 getStaticClassID();
    00178 };
    00179
    00180 inline LocaleDisplayNames::~LocaleDisplayNames() {
    00181 }
    00182
    00183 inline LocaleDisplayNames* LocaleDisplayNames::createInstance(const Locale& locale) {
    00184   return LocaleDisplayNames::createInstance(locale, ULDN_STANDARD_NAMES);
    00185 }
    00186
    00187 U_NAMESPACE_END
    00188
    00189 #endif
    00190
    00191 #endif

All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Friends Defines