Herqq

- Main Page
- Related Pages
- Modules
- Namespaces
- Classes
- Files

- Class List
- Class Hierarchy
- Class Members

Public Member Functions | Friends | Related Functions

# HActionArguments Class Reference
Device Model

A storage class for HActionArgument instances. More...

`#include <HActionArguments>`

List of all members.

## Public Member Functions
| HActionArguments ()
| HActionArguments (const QVector< HActionArgument > &args)
| HActionArguments (const HActionArguments &)
| ~HActionArguments ()
HActionArguments & | operator= (const HActionArguments &)
bool | contains (const QString &argumentName) const
HActionArgument | get (const QString &argumentName) const
HActionArgument | get (qint32 index) const
HActionArguments::const_iterator | constBegin () const
HActionArguments::const_iterator | constEnd () const
HActionArguments::iterator | begin ()
HActionArguments::const_iterator | begin () const
HActionArguments::iterator | end ()
HActionArguments::const_iterator | end () const
qint32 | size () const
HActionArgument | operator[] (qint32 index) const
HActionArgument | operator[] (const QString &argName) const
QStringList | names () const
bool | isEmpty () const
void | clear ()
bool | remove (const QString &name)
bool | append (const HActionArgument &arg)
QVariant | value (const QString &name, bool *ok=0) const
bool | setValue (const QString &name, const QVariant &value)
QString | toString () const
## Friends
H_UPNP_CORE_EXPORT bool | operator== (const HActionArguments &, const HActionArguments &)
## Related Functions
(Note that these are not member functions.)
H_UPNP_CORE_EXPORT void | swap (HActionArguments &, HActionArguments &)
bool | operator!= (const HActionArguments &obj1, const HActionArguments &obj2)

## Detailed Description

A storage class for HActionArgument instances.

Instances of this class are used to contain the input and output arguments for an action invocation.

Note:
  The class provides iterative and keyed access to the stored HActionArgument instances. The order of action arguments during iteration is the order in which the HActionArgument objects are provided to the instance. If the class is instantiated by HUPnP, the order of the contained arguments during iteration is the order in which they are defined in the service description document.

See also:
  HActionArgument

Remarks:
  This class is not thread-safe.

## Constructor & Destructor Documentation

HActionArguments | ( |  | ) |

Creates a new, empty instance.

See also:
  isEmpty()

HActionArguments | ( | const QVector< HActionArgument > & | args | ) |

Creates a new instance from the specified input arguments.

Parameters:

  args | specifies the action argument objects this instance will contain.

See also:
  isEmpty()

HActionArguments | ( | const HActionArguments & |  | ) |

Copy constructor.

Creates a copy of `other`.

~HActionArguments | ( |  | ) |

Destroys the instance.

## Member Function Documentation

HActionArguments& operator= | ( | const HActionArguments & |  | ) |

Assignment operator.

Copies the contents of `other` to this.

Returns:
  a reference to this object.

bool contains | ( | const QString & | argumentName | ) | const

Indicates if the object contains an argument with the specified name.

Parameters:

  argumentName | specifies the name of the action argument.

Returns:
  true in case the object contains an argument with the specified name.

Remarks:
  This is a constant-time operation.

HActionArgument get | ( | const QString & | argumentName | ) | const

Returns an action argument with the specified name.

Parameters:

  argumentName | specifies the name of the argument to be retrieved.

Returns:
  an action argument with the specified name. If no argument is found with the specified name, the returned instance is invalid, i.e. HActionArgument::isValid() returns false.

Remarks:
  This is a constant-time operation.

HActionArgument get | ( | qint32 | index | ) | const

Returns an action argument at the specified index.

Parameters:

  index | specifies the index of the action argument to return. The index has to be valid position in the container, i.e. it must be 0 <= i < size().

Returns:
  an action argument at the specified index.

Remarks:
  This is a constant-time operation.

HActionArguments::const_iterator constBegin | ( |  | ) | const

Returns a const STL-style iterator pointing to the first item.

Returns:
  a const STL-style iterator pointing to the first item.

HActionArguments::const_iterator constEnd | ( |  | ) | const

Returns a const STL-style iterator pointing to the imaginary item after the last item.

Returns:
  a const STL-style iterator pointing to the imaginary item after the last item.

HActionArguments::iterator begin | ( |  | ) |

Returns an STL-style iterator pointing to the first item.

Returns:
  an STL-style iterator pointing to the first item.

HActionArguments::const_iterator begin | ( |  | ) | const

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

Returns:
  an STL-style iterator pointing to the first item.

HActionArguments::iterator end | ( |  | ) |

Returns an STL-style iterator pointing to the imaginary item after the last item.

Returns:
  an STL-style iterator pointing to the imaginary item after the last item.

HActionArguments::const_iterator end | ( |  | ) | const

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

Returns:
  an STL-style iterator pointing to the imaginary item after the last item.

qint32 size | ( |  | ) | const

Returns the number of contained action arguments.

Returns:
  The number of contained action arguments.

HActionArgument operator[] | ( | qint32 | index | ) | const

Returns an action argument at the specified index.

This is the same as calling get() with the specified index. This method is provided for convenience.

Parameters:

  index | specifies the index of the action argument to return. The index has to be valid position in the container, i.e. it must be 0 <= i < size().

Returns:
  an action argument at the specified index.

HActionArgument operator[] | ( | const QString & | argName | ) | const

Returns an action argument with the specified name.

This is the same as calling get() with the specified argument name. This method is provided for convenience.

Parameters:

  argName | specifies the name of the argument to be retrieved.

Returns:
  an action argument with the specified name. If no argument is found with the specified name, the returned instance is invalid, i.e. HActionArgument::isValid() returns false.

Remarks:
  This is a constant-time operation.

QStringList names | ( |  | ) | const

Returns the names of all the contained action arguments.

Returns:
  The names of all the contained action arguments.

bool isEmpty | ( |  | ) | const

Indicates if the object is empty, i.e.

it has no action arguments.

Returns:
  true when the object has no action arguments.

void clear | ( |  | ) |

Removes every contained HActionArgument from this instance.

Remarks:
  A call to this function makes active iterators invalid and

bool remove | ( | const QString & | name | ) |

Removes an HActionArgument with the specified name.

Parameters:

  name | specifies the name of the HActionArgument to be removed.

Returns:
  true if an HActionArgument was found and removed.

Remarks:
  A call to this function makes active iterators invalid and

bool append | ( | const HActionArgument & | arg | ) |

Inserts an HActionArgument to this instance.

Parameters:

  arg | specifies the HActionArgument to be added.

Returns:
  true if the specified argument was added. The action argument will not be added if the instance already contains an action argument instance with the same name or the provided instance is invalid.

Remarks:
  A call to this function makes active iterators invalid and

QVariant value | ( | const QString & | name,
|  | bool * | ok = `0`
| ) |  | const

Returns the value of the specified state variable, if such exists.

This is a convenience method for retrieving the value of the specified state variable. Semantically this call is comparable to `get("stateVariable_name").value()`.

Parameters:

  name | specifies the name of the state variable.
  ok | specifies a pointer to `bool`, which will be true if the specified state variable was found. This parameter is optional.

Returns:
  The value of the specified state variable, if such exists. Otherwise the returned `QVariant` is invalid.

bool setValue | ( | const QString & | name,
|  | const QVariant & | value
| ) |  |

Attempts to set the value of the specified state variable.

This is a convenience method for setting the value of the specified state variable. Semantically this call is comparable to `get("stateVariable_name").setValue(value)`.

Parameters:

  name | specifies the name of the state variable.
  value | specifies the value of the state variable.

Returns:
  true in case the value of the specified state variable was found and its value was changed.

QString toString | ( |  | ) | const

Returns a string representation of the object.

Returns:
  a string representation of the object. The returned string contains all the arguments represented as strings and separated from each other by a new-line. The string representation of an argument is retrieved using HActionArgument::toString().

Remarks:
  An empty string is returned if the object is invalid.

## Friends And Related Function Documentation

H_UPNP_CORE_EXPORT bool operator== | ( | const HActionArguments & | ,
|  | const HActionArguments & |
| ) |  | `[friend]`

Compares the two objects for equality.

Returns:
  true in case the object are logically equivalent.

H_UPNP_CORE_EXPORT void swap | ( | HActionArguments & | ,
|  | HActionArguments & |
| ) |  | `[friend]`

Swaps the contents of the two containers.

bool operator!= | ( | const HActionArguments & | obj1,
|  | const HActionArguments & | obj2
| ) |  | `[related]`

Compares the two objects for inequality.

Returns:
  true in case the objects are not logically equivalent.