NuriaProject Framework  0.1
The NuriaProject Framework
Static Public Member Functions | List of all members
Nuria::ArgumentManager Class Reference

Provides convenient access to arguments passed to the launcher. More...

#include <argumentmanager.hpp>

Inheritance diagram for Nuria::ArgumentManager:

Static Public Member Functions

static bool contains (const QString &path)
 
static int getInt (const QString &path, int defaultValue=0, int min=INT_MIN, int max=INT_MAX, bool *ok=0)
 
static QString getValue (const QString &path, const QString &defaultValue=QString())
 

Detailed Description

Provides convenient access to arguments passed to the launcher.

The argument manager provides easy access to arguments passed to the launcher. The syntax of an argument is the following:

[Path]=[Value]

The path is a virtual path to the setting the user wants to modify. A point (".") is used as a delimeter. Service authors must use the serviceName as "root". Widget authors should use something similar. The root "Nuria" is reserved for the system itself. Paths are not case sensitive. The path must not contain whitespaces.

Member Function Documentation

static bool Nuria::ArgumentManager::contains ( const QString &  path)
static

Returns true if there is an argument with path. If not returns false.

static int Nuria::ArgumentManager::getInt ( const QString &  path,
int  defaultValue = 0,
int  min = INT_MIN,
int  max = INT_MAX,
bool *  ok = 0 
)
static

Returns the value of path. The value is expected to be a integer in range of min and max. If the given value is not a integer or doesn't fit into the given range ok will be set to false and defaultValue will be returned.

static QString Nuria::ArgumentManager::getValue ( const QString &  path,
const QString &  defaultValue = QString() 
)
static

Returns the value of path. If no value can be found defaultValue is returned instead.


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