#include <Params.h>
Public Types | |
enum | Req { NOT_REQUIRED, REQUIRED, NON_EMPTY } |
Public Member Functions | |
Params () | |
Params (const DOMElement *elt) throw (AuroraBadEntityException) | |
void | addFromXml (const DOMElement *elt) throw (AuroraBadEntityException) |
bool | empty () const |
Returns true if there are no parameters. | |
string | param (string name, Req req=NOT_REQUIRED) const throw (AuroraBadEntityException) |
Return a parameter. | |
string | param (string name, string def) const |
Return a parameter value, or def if the parameter is not present. | |
template<typename T> bool | typedParam (string name, T &value, Req req=NOT_REQUIRED) const throw (AuroraBadEntityException) |
Reads a parameter value into the "value" argument. | |
string | as_string () const |
Returns a string representation of this parameter set. |
|
|
|
|
|
|
|
|
|
Returns a string representation of this parameter set.
|
|
Returns true if there are no parameters.
|
|
Return a parameter value, or def if the parameter is not present.
|
|
Return a parameter. If req is REQUIRED and the attribute is not specified, or if req is NON_EMPTY and the the attribute is not specified or empty (""), throws an exception. |
|
Reads a parameter value into the "value" argument. Throws an exception if (a) a value is specified but has an invalid format, or (b) req is REQUIRED but the attribute value is not specified. You can specify an optional value by setting value before calling this method. |