Apache log4cxx  Version 0.12.1
log4cxx::helpers::ResourceBundle Class Referenceabstract

Resource bundles contain locale-specific objects. More...

#include <resourcebundle.h>

Inheritance diagram for log4cxx::helpers::ResourceBundle:
log4cxx::helpers::Object log4cxx::helpers::PropertyResourceBundle

Public Member Functions

virtual LogString getString (const LogString &key) const =0
 Gets a string for the given key from this resource bundle or one of its parents. More...
 
- Public Member Functions inherited from log4cxx::helpers::Object
virtual ~Object ()
 
virtual bool instanceof (const Class &clazz) const =0
 
virtual const void * cast (const Class &clazz) const =0
 

Static Public Member Functions

static ResourceBundlePtr getBundle (const LogString &baseName, const Locale &locale)
 Gets a resource bundle using the specified base name and locale. More...
 

Protected Member Functions

void setParent (const ResourceBundlePtr &parent1)
 

Protected Attributes

ResourceBundlePtr parent
 The parent bundle of this bundle. More...
 

Detailed Description

Resource bundles contain locale-specific objects.

Member Function Documentation

◆ getBundle()

static ResourceBundlePtr log4cxx::helpers::ResourceBundle::getBundle ( const LogString baseName,
const Locale locale 
)
static

Gets a resource bundle using the specified base name and locale.

Parameters
baseNamethe base name of the resource bundle, a fully qualified class name or property filename
localethe locale for which a resource bundle is desired

◆ getString()

virtual LogString log4cxx::helpers::ResourceBundle::getString ( const LogString key) const
pure virtual

Gets a string for the given key from this resource bundle or one of its parents.

Calling this method is equivalent to calling

Parameters
keythe key for the desired string
Returns
the string for the given key
Exceptions
MissingResourceException- if no object for the given key can be found

Implemented in log4cxx::helpers::PropertyResourceBundle.

◆ setParent()

void log4cxx::helpers::ResourceBundle::setParent ( const ResourceBundlePtr &  parent1)
inlineprotected

Member Data Documentation

◆ parent

ResourceBundlePtr log4cxx::helpers::ResourceBundle::parent
protected

The parent bundle of this bundle.

The parent bundle is searched by getString when this bundle does not contain a particular resource.


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