soprano
Soprano::BindingSet Class Reference
Represents one set of bindings in the result of a select query. More...
#include <Soprano/BindingSet>
Public Member Functions | |
| BindingSet (const BindingSet &other) | |
| BindingSet () | |
| ~BindingSet () | |
| QStringList | bindingNames () const |
| bool | contains (const QString &name) const |
| int | count () const |
| void | insert (const QString &name, const Node &value) |
| BindingSet & | operator= (const BindingSet &) |
| Node | operator[] (const QString name) const |
| Node | operator[] (int offset) const |
| void | replace (const QString &name, const Node &value) |
| void | replace (int offset, const Node &value) |
| Node | value (const QString &name) const |
| Node | value (int offset) const |
Detailed Description
Represents one set of bindings in the result of a select query.
BindingSet is mostly a convenience class for caching of query results.
- See also:
- QueryResultIterator
Definition at line 48 of file bindingset.h.
Constructor & Destructor Documentation
| Soprano::BindingSet::BindingSet | ( | ) |
Create an emtpy set.
| Soprano::BindingSet::BindingSet | ( | const BindingSet & | other | ) |
Copy constructor.
| Soprano::BindingSet::~BindingSet | ( | ) |
Destructor.
Member Function Documentation
| QStringList Soprano::BindingSet::bindingNames | ( | ) | const |
- Returns:
- The names of the bound variables in this set.
| bool Soprano::BindingSet::contains | ( | const QString & | name | ) | const |
Check if a certain variable has a binding in this set.
- Parameters:
-
name The variable name.
- Returns:
trueif this set contains a binding for the variable name,falseotherwise.
| int Soprano::BindingSet::count | ( | ) | const |
The number of bindings in this set.
- Returns:
- The number of bindings.
Insert a new binding into the set.
| BindingSet& Soprano::BindingSet::operator= | ( | const BindingSet & | ) |
Get the binding for a variable.
This is equivalent to value(const QString&) const.
| Node Soprano::BindingSet::operator[] | ( | int | offset | ) | const |
Get the binding for a variable by index.
This is equivalent to value(int) const.
Replaces a value in the binding set.
- Since:
- 2.3
| void Soprano::BindingSet::replace | ( | int | offset, | |
| const Node & | value | |||
| ) |
Replaces a value in the binding set.
- Since:
- 2.3
Get the binding for a variable.
- Parameters:
-
name The name of the requested variable.
- Returns:
- The binding for the requested variable or and invalid node if the bindings do not contain the variable.
| Node Soprano::BindingSet::value | ( | int | offset | ) | const |
Get the binding for a variable by index.
- Parameters:
-
offset The index of the requested variable.
- Returns:
- The binding for the requested variable or and invalid node if offset is out of bounds, i.e. bigger or equal to count().
- See also:
- QueryResultIterator::binding(int) const.
The documentation for this class was generated from the following file:
KDE 4.4 API Reference