Apache Log4cxx  Version 1.3.0
Loading...
Searching...
No Matches
log4cxx::helpers::PropertyResourceBundle Class Reference

PropertyResourceBundle is a concrete subclass of ResourceBundle that manages resources for a locale using a set of static strings from a property file. More...

#include <propertyresourcebundle.h>

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

Public Member Functions

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

Protected Attributes

Properties properties
 

Additional Inherited Members

- Static Public Member Functions inherited from log4cxx::helpers::ResourceBundle
static ResourceBundlePtr getBundle (const LogString &baseName, const Locale &locale)
 Gets a resource bundle using the specified base name and locale.
 
- Protected Member Functions inherited from log4cxx::helpers::ResourceBundle
void setParent (const ResourceBundlePtr &parent1)
 

Detailed Description

PropertyResourceBundle is a concrete subclass of ResourceBundle that manages resources for a locale using a set of static strings from a property file.

Constructor & Destructor Documentation

◆ PropertyResourceBundle()

log4cxx::helpers::PropertyResourceBundle::PropertyResourceBundle ( InputStreamPtr  inStream)

Creates a property resource bundle.

Parameters
inStreamproperty file to read from.
Exceptions
IOExceptionif an error occurred when reading from the input stream.

Member Function Documentation

◆ getString()

LogString log4cxx::helpers::PropertyResourceBundle::getString ( const LogString key) const
overridevirtual

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

Implements log4cxx::helpers::ResourceBundle.

Member Data Documentation

◆ properties

Properties log4cxx::helpers::PropertyResourceBundle::properties
protected

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