#include <optionconverter.h>
Static Public Member Functions | |
static QString | findAndSubst (const Properties &rProperties, const QString &rKey) |
static QString | classNameJavaToCpp (const QString &rClassName) |
static bool | toBoolean (const QString &rOption, bool *p_ok=0) |
static bool | toBoolean (const QString &rOption, bool default_value) |
static qint64 | toFileSize (const QString &rOption, bool *p_ok=0) |
static int | toInt (const QString &rOption, bool *p_ok=0) |
static Level | toLevel (const QString &rOption, bool *p_ok=0) |
static Level | toLevel (const QString &rOption, const Level &rDefaultValue) |
static int | toTarget (const QString &rOption, bool *p_ok=0) |
static QString Log4Qt::OptionConverter::findAndSubst | ( | const Properties & | rProperties, | |
const QString & | rKey | |||
) | [static] |
static QString Log4Qt::OptionConverter::classNameJavaToCpp | ( | const QString & | rClassName | ) | [static] |
Returns the JAVA class name rClassName as C++ class name by replacing all . characters with ::.
static bool Log4Qt::OptionConverter::toBoolean | ( | const QString & | rOption, | |
bool * | p_ok = 0 | |||
) | [static] |
Converts the option rOption to a boolean value. Valid strings for true are "true", "enabled" and "1". Valid strings for false are "false", "disabled" and "0". If the conversion is successful, the target is returned and p_ok is set to true. Otherwise an error is written to the log, p_ok is set to false and false is returned.
static bool Log4Qt::OptionConverter::toBoolean | ( | const QString & | rOption, | |
bool | default_value | |||
) | [static] |
static qint64 Log4Qt::OptionConverter::toFileSize | ( | const QString & | rOption, | |
bool * | p_ok = 0 | |||
) | [static] |
Converts the option string rOption to a file size. The string can be a positive integer followed by an optional unit suffix "KB", "MB" or "GB". If a unit suffix is specified the the integer is interpreted as kilobytes, megabytes or gigabytes. If the conversion is successful, the size is returned and p_ok is set to true. Otherwise an error is written to the log, p_ok is set to false and 0 is returned.
static int Log4Qt::OptionConverter::toInt | ( | const QString & | rOption, | |
bool * | p_ok = 0 | |||
) | [static] |
Converts the option rOption to a integer value using QString::toInt(). If the conversion is successful, the integer is returned and p_ok is set to true. Otherwise an error is written to the log, p_ok is set to false and 0 is returned.
static Level Log4Qt::OptionConverter::toLevel | ( | const QString & | rOption, | |
bool * | p_ok = 0 | |||
) | [static] |
Converts the option rOption to a level value using Level::fromString(). If the conversion is successful, the level is returned and p_ok is set to true. Otherwise an error is written to the log, p_ok is set to false and a level with the value Level::NULL_INT is returned.
static Level Log4Qt::OptionConverter::toLevel | ( | const QString & | rOption, | |
const Level & | rDefaultValue | |||
) | [static] |
static int Log4Qt::OptionConverter::toTarget | ( | const QString & | rOption, | |
bool * | p_ok = 0 | |||
) | [static] |
Converts the option rOption to a ConsoleAppender::Target value. Valid strings for rOption are "System.out", "STDOUT_TARGET", "System.err" and "STDERR_TARGET". If the conversion is successful, the target is returned and p_ok is set to true. Otherwise an error is written to the log, p_ok is set to false and ConsoleAppender::STDOUT_TARGET is returned.