- Main Page
- Modules
- Namespaces
- Classes
- Files

- Alphabetical List
- Class List
- Class Hierarchy
- Class Members

# RollingPolicyBase Class Reference

Inherits RollingPolicy, and ObjectImpl.

Inherited by FixedWindowRollingPolicy, and TimeBasedRollingPolicy.

List of all members.

## Detailed Description

Implements methods common to most, it not all, rolling policies.

## Public Member Functions

| RollingPolicyBase ()
virtual | ~RollingPolicyBase ()
void | addRef () const
void | releaseRef () const
virtual void | activateOptions (log4cxx::helpers::Pool &p)=0
| Activate the options that were previously set with calls to option setters.
virtual log4cxx::pattern::PatternMap | getFormatSpecifiers () const =0
virtual void | setOption (const LogString &option, const LogString &value)
| Set `option` to `value`.
void | setFileNamePattern (const LogString &fnp)
| Set file name pattern.
LogString | getFileNamePattern () const
| Get file name pattern.

## Protected Member Functions

void | parseFileNamePattern ()
| Parse file name pattern.
void | formatFileName (log4cxx::helpers::ObjectPtr &obj, LogString &buf, log4cxx::helpers::Pool &p) const
| Format file name.
log4cxx::pattern::PatternConverterPtr | getIntegerPatternConverter () const
log4cxx::pattern::PatternConverterPtr | getDatePatternConverter () const

## Constructor & Destructor Documentation

RollingPolicyBase | ( |  | ) |

virtual ~RollingPolicyBase | ( |  | ) | `[virtual]`

## Member Function Documentation

virtual void activateOptions | ( | log4cxx::helpers::Pool & | p | ) | `[pure virtual]`

| Activate the options that were previously set with calls to option setters. This allows to defer activiation of the options until all options have been set. This is required for components which have related options that remain ambigous until all are set.

For example, the FileAppender has the File and Append options both of which are ambigous until the other is also set.

Implements OptionHandler.

Implemented in FixedWindowRollingPolicy, and TimeBasedRollingPolicy.

void addRef | ( |  | ) | const`[virtual]`

| Reimplemented from ObjectImpl. Reimplemented in TimeBasedRollingPolicy.

void formatFileName | ( | log4cxx::helpers::ObjectPtr & | obj,
|  | LogString & | buf,
|  | log4cxx::helpers::Pool & | p
| ) | const`[protected]`

| Format file name.

Parameters:

  | obj | object to be evaluted in formatting, may not be null.
  | buf | string buffer to which formatted file name is appended, may not be null.
  | p | memory pool.

log4cxx::pattern::PatternConverterPtr getDatePatternConverter | ( |  | ) | const`[protected]`

LogString getFileNamePattern | ( |  | ) | const

| Get file name pattern.

Returns:
  file name pattern.

virtual log4cxx::pattern::PatternMap getFormatSpecifiers | ( |  | ) | const`[pure virtual]`

| Implemented in FixedWindowRollingPolicy, and TimeBasedRollingPolicy.

log4cxx::pattern::PatternConverterPtr getIntegerPatternConverter | ( |  | ) | const`[protected]`

void parseFileNamePattern | ( |  | ) | `[protected]`

| Parse file name pattern.

void releaseRef | ( |  | ) | const`[virtual]`

| Reimplemented from ObjectImpl. Reimplemented in TimeBasedRollingPolicy.

void setFileNamePattern | ( | const LogString & | fnp | ) |

| Set file name pattern.

Parameters:

  | fnp | file name pattern.

virtual void setOption | ( | const LogString & | option,
|  | const LogString & | value
| ) | `[virtual]`

| Set `option` to `value`. The handling of each option depends on the OptionHandler instance. Some options may become active immediately whereas other may be activated only when activateOptions is called. Implements OptionHandler. Reimplemented in FixedWindowRollingPolicy.

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

- rollingpolicybase.h