Logo Search packages:      
Sourcecode: chromium-browser version File versions  Download package

ResourceBundle Class Reference

#include <resbund.h>

Inheritance diagram for ResourceBundle:

UObject UMemory

List of all members.


Detailed Description

A class representing a collection of resource information pertaining to a given locale. A resource bundle provides a way of accessing locale- specfic information in a data file. You create a resource bundle that manages the resources for a given locale and then ask it for individual resources.

Resource bundles in ICU4C are currently defined using text files which conform to the following BNF definition. More on resource bundle concepts and syntax can be found in the Users Guide.

The ResourceBundle class is not suitable for subclassing.

ICU 2.0

Definition at line 52 of file resource_bundle.h.


Public Types

enum  FontStyle {
  SmallFont, BaseFont, BoldFont, MediumFont,
  MediumBoldFont, LargeFont
}

Public Member Functions

ResourceBundleclone () const
ResourceBundle get (const char *key, UErrorCode &status) const
ResourceBundle get (int32_t index, UErrorCode &status) const
const uint8_t * getBinary (int32_t &len, UErrorCode &status) const
SkBitmapGetBitmapNamed (int resource_id)
std::string GetDataResource (int resource_id)
virtual UClassID getDynamicClassID () const
const gfx::Font & GetFont (FontStyle style)
int32_t getInt (UErrorCode &status) const
const int32_t * getIntVector (int32_t &len, UErrorCode &status) const
const char * getKey (void) const
const Locale getLocale (ULocDataLocaleType type, UErrorCode &status) const
const LocalegetLocale (void) const
string16 GetLocalizedString (int message_id)
const char * getName (void) const
ResourceBundle getNext (UErrorCode &status)
UnicodeString getNextString (const char **key, UErrorCode &status)
UnicodeString getNextString (UErrorCode &status)
base::StringPiece GetRawDataResource (int resource_id)
int32_t getSize (void) const
UnicodeString getString (UErrorCode &status) const
UnicodeString getStringEx (const char *key, UErrorCode &status) const
UnicodeString getStringEx (int32_t index, UErrorCode &status) const
UResType getType (void) const
uint32_t getUInt (UErrorCode &status) const
void getVersion (UVersionInfo versionInfo) const
const char * getVersionNumber (void) const
ResourceBundle getWithFallback (const char *key, UErrorCode &status)
UBool hasNext (void) const
RefCountedStaticMemory * LoadDataResourceBytes (int resource_id) const
ResourceBundleoperator= (const ResourceBundle &other)
void resetIterator (void)
 ResourceBundle (UResourceBundle *res, UErrorCode &status)
 ResourceBundle (const ResourceBundle &original)
 ResourceBundle (const char *packageName, const Locale &locale, UErrorCode &err)
 ResourceBundle (UErrorCode &err)
 ResourceBundle (const UnicodeString &packageName, UErrorCode &err)
 ResourceBundle (const UnicodeString &packageName, const Locale &locale, UErrorCode &err)
virtual ~ResourceBundle ()

Static Public Member Functions

static void CleanupSharedInstance ()
static ResourceBundleGetSharedInstance ()
static UClassID U_EXPORT2 getStaticClassID ()
static std::string InitSharedInstance (const std::wstring &pref_locale)
static void U_EXPORT2 operator delete (void *, void *) U_NO_THROW
static void U_EXPORT2 operator delete (void *p) U_NO_THROW
static void U_EXPORT2 operator delete[] (void *p) U_NO_THROW
static void *U_EXPORT2 operator new (size_t, void *ptr) U_NO_THROW
static void *U_EXPORT2 operator new (size_t size) U_NO_THROW
static void *U_EXPORT2 operator new[] (size_t size) U_NO_THROW

Static Public Attributes

static const SkColor frame_color
static const SkColor frame_color_app_panel
static const SkColor frame_color_app_panel_inactive
static const SkColor frame_color_inactive
static const SkColor frame_color_incognito
static const SkColor frame_color_incognito_inactive
static const SkColor toolbar_color
static const SkColor toolbar_separator_color

Private Types

typedef std::map< int, SkBitmap * > SkImageMap

Private Member Functions

void constructForLocale (const UnicodeString &path, const Locale &locale, UErrorCode &error)
 DISALLOW_EVIL_CONSTRUCTORS (ResourceBundle)
void FreeImages ()
void LoadFontsIfNecessary ()
std::string LoadResources (const std::wstring &pref_locale)

Static Private Member Functions

static FilePath GetLocaleFilePath (const std::string &app_locale)
static SkBitmapLoadBitmap (DataHandle dll_inst, int resource_id)
static RefCountedStaticMemory * LoadResourceBytes (DataHandle module, int resource_id)

Private Attributes

scoped_ptr< gfx::Font > base_font_
scoped_ptr< gfx::Font > bold_font_
LocalefLocale
UResourceBundlefResource
scoped_ptr< gfx::Font > large_font_
DataHandle locale_resources_data_
Lock lock_
scoped_ptr< gfx::Font > medium_bold_font_
scoped_ptr< gfx::Font > medium_font_
DataHandle resources_data_
SkImageMap skia_images_
scoped_ptr< gfx::Font > small_font_
scoped_ptr< gfx::Font > web_font_

Static Private Attributes

static ResourceBundleg_shared_instance_ = NULL

The documentation for this class was generated from the following files:

Generated by  Doxygen 1.6.0   Back to index