A storage class for HActionArgument instances.
More...
#include <HActionArguments>
List of all members.
Detailed Description
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
Constructor & Destructor Documentation
Creates a new, empty instance.
- See also:
- isEmpty()
Creates a new instance from the specified input arguments and takes the ownership of the provided arguments.
- Parameters:
-
args | specifies the action argument objects this instance will manage. |
- See also:
- isEmpty()
Copy constructor.
Creates a copy of other
.
Member Function Documentation
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.
Retrieves an action argument.
Retrieves an action argument with the specified name.
- Parameters:
-
argumentName | specifies the name of the argument to be retrieved. |
- Returns:
- a pointer to the action argument with the specified name or a null pointer in case no argument has the specified name.
- Warning:
- Do not delete the return value. The ownership of the object is not transferred.
- The returned object is deleted when this container is being deleted.
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
- Parameters:
-
argumentName | specifies the name of the argument to be retrieved. |
- Returns:
- a pointer to the action argument with the specified name or a null pointer in case no argument has the specified name.
Retrieves an action argument from 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:
- a pointer to the action argument that can be found at the specified index.
- Warning:
- Do not delete the return value. The ownership of the object is not transferred.
- The returned object is deleted when this container is being deleted.
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
- 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:
- a pointer to the action argument that can be found at the specified index.
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.
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.
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.
Returns the number of arguments.
- Returns:
- the number of arguments.
Retrieves an action argument from 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:
- a pointer to the action argument that can be found at the specified index.
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
- 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:
- a pointer to the action argument that can be found at the specified index.
Returns the action argument matching the specified name, if any.
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:
- a pointer to the action argument with the specified name or a null pointer in case no argument has the specified name.
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
- Parameters:
-
argName | specifies the name of the argument to be retrieved. |
- Returns:
- a pointer to the action argument with the specified name or a null pointer in case no argument has the specified name.
QList< QString > names |
( |
) |
const |
The names of all the arguments.
- Returns:
- names of all the arguments.
Indicates if the object is empty, i.e.
it has no arguments.
- Returns:
- true when the object has no arguments.
Removes and deletes every contained HActionArgument from this instance.
- Warning:
- Calling this function makes active iterators invalid.
bool remove |
( |
const QString & |
name ) |
|
Removes and deletes an HActionArgument with the specified name.
- Parameters:
-
- Returns:
- true if an HActionArgument was found and removed.
- Warning:
- Calling this function makes active iterators invalid.
Inserts a new HActionArgument to this instance.
- Parameters:
-
- 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 pointer is null.
- Warning:
- Calling this function makes active iterators invalid.
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()
, but it also ensures that the specified state variable exists before attempting to get its 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)
, but it also ensures that the specified state variable exists before attempting to set its 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 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().
Friends And Related Function Documentation
Compares the two objects for equality.
- Returns:
- true in case the object are logically equivalent.
Swaps the contents of the two containers.
Compares the two objects for inequality.
- Returns:
- true in case the object are not logically equivalent.