# log4cplus::helpers::Properties Class Reference

`#include <property.h>`

List of all members.

## Public Member Functions

| Properties ()
| Properties (log4cplus::tistream &input)
| Properties (const log4cplus::tstring &inputFile)
virtual | ~Properties ()
bool | exists (const log4cplus::tstring &key) const
| Tests to see if `key` can be found in this map.
size_t | size () const
| Returns the number of entries in this map.
log4cplus::tstring | getProperty (const log4cplus::tstring &key) const
| Searches for the property with the specified key in this property list.
log4cplus::tstring | getProperty (const log4cplus::tstring &key, const log4cplus::tstring &defaultVal) const
| Searches for the property with the specified key in this property list.
std::vector< log4cplus::tstring > | propertyNames () const
| Returns all the keys in this property list.
void | setProperty (const log4cplus::tstring &key, const log4cplus::tstring &value)
| Inserts `value` into this map indexed by `key`.
bool | removeProperty (const log4cplus::tstring &key)
| Removed the property index by `key` from this map.
Properties | getPropertySubset (const log4cplus::tstring &prefix) const
| Returns a subset of the "properties" whose keys start with "prefix".

## Static Public Attributes

const tchar | PROPERTIES_COMMENT_CHAR

## Protected Types

typedef std::map< log4cplus::tstring, log4cplus::tstring > | StringMap

## Protected Member Functions

void | init (log4cplus::tistream &input)

## Protected Attributes

StringMap | data

## Member Typedef Documentation

typedef std::map<log4cplus::tstring, log4cplus::tstring> log4cplus::helpers::Properties::StringMap `[protected]`

| Definition at line 102 of file property.h.

## Constructor & Destructor Documentation

log4cplus::helpers::Properties::Properties | ( |  | ) |

log4cplus::helpers::Properties::Properties | ( | log4cplus::tistream & | input | ) | `[explicit]`

log4cplus::helpers::Properties::Properties | ( | const log4cplus::tstring & | inputFile | ) | `[explicit]`

virtual log4cplus::helpers::Properties::~Properties | ( |  | ) | `[virtual]`

## Member Function Documentation

bool log4cplus::helpers::Properties::exists | ( | const log4cplus::tstring & | key | ) | const`[inline]`

| Tests to see if `key` can be found in this map. Definition at line 47 of file property.h.

log4cplus::tstring log4cplus::helpers::Properties::getProperty | ( | const log4cplus::tstring & | key,
|  | const log4cplus::tstring & | defaultVal
| ) | const

| Searches for the property with the specified key in this property list. If the key is not found in this property list, the default property list, and its defaults, recursively, are then checked. The method returns the default value argument if the property is not found.

log4cplus::tstring log4cplus::helpers::Properties::getProperty | ( | const log4cplus::tstring & | key | ) | const

| Searches for the property with the specified key in this property list. If the key is not found in this property list, the default property list, and its defaults, recursively, are then checked. The method returns `null` if the property is not found.

Properties log4cplus::helpers::Properties::getPropertySubset | ( | const log4cplus::tstring & | prefix | ) | const

| Returns a subset of the "properties" whose keys start with "prefix". The returned "properties" have "prefix" trimmed from their keys.

void log4cplus::helpers::Properties::init | ( | log4cplus::tistream & | input | ) | `[protected]`

std::vector<log4cplus::tstring> log4cplus::helpers::Properties::propertyNames | ( |  | ) | const

| Returns all the keys in this property list.

bool log4cplus::helpers::Properties::removeProperty | ( | const log4cplus::tstring & | key | ) |

| Removed the property index by `key` from this map.

void log4cplus::helpers::Properties::setProperty | ( | const log4cplus::tstring & | key,
|  | const log4cplus::tstring & | value
| ) |

| Inserts `value` into this map indexed by `key`.

size_t log4cplus::helpers::Properties::size | ( |  | ) | const`[inline]`

| Returns the number of entries in this map. Definition at line 55 of file property.h.

## Member Data Documentation

StringMap log4cplus::helpers::Properties::data `[protected]`

| Definition at line 108 of file property.h.

const tchar log4cplus::helpers::Properties::PROPERTIES_COMMENT_CHAR `[static]`

| Definition at line 41 of file property.h.

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

- property.h