Soprano  2.8.0
Public Member Functions
Soprano::BindingSet Class Reference

Represents one set of bindings in the result of a select query. More...

#include <Soprano/BindingSet>

List of all members.

Public Member Functions

 BindingSet ()
 BindingSet (const BindingSet &other)
 ~BindingSet ()
BindingSetoperator= (const BindingSet &)
QStringList bindingNames () const
Node operator[] (int offset) const
Node operator[] (const QString name) const
Node value (int offset) const
Node value (const QString &name) const
bool contains (const QString &name) const
int count () const
void insert (const QString &name, const Node &value)
void replace (int offset, const Node &value)
void replace (const QString &name, const Node &value)
bool operator== (const BindingSet &other) const
bool operator!= (const BindingSet &other) 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
Author:
Sebastian Trueg trueg.nosp@m.@kde.nosp@m..org

Definition at line 48 of file bindingset.h.


Constructor & Destructor Documentation

Create an emtpy set.

Copy constructor.

Destructor.


Member Function Documentation

BindingSet& Soprano::BindingSet::operator= ( const BindingSet )
Returns:
The names of the bound variables in this set.
Node Soprano::BindingSet::operator[] ( int  offset) const

Get the binding for a variable by index.

This is equivalent to value(int) const.

Node Soprano::BindingSet::operator[] ( const QString  name) const

Get the binding for a variable.

This is equivalent to value(const QString&) const.

Node Soprano::BindingSet::value ( int  offset) const

Get the binding for a variable by index.

Parameters:
offsetThe 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.
Node Soprano::BindingSet::value ( const QString name) const

Get the binding for a variable.

Parameters:
nameThe name of the requested variable.
Returns:
The binding for the requested variable or and invalid node if the bindings do not contain the variable.
See also:
QueryResultIterator::binding(const QString&) const.
bool Soprano::BindingSet::contains ( const QString name) const

Check if a certain variable has a binding in this set.

Parameters:
nameThe variable name.
Returns:
true if this set contains a binding for the variable name, false otherwise.

The number of bindings in this set.

Returns:
The number of bindings.
void Soprano::BindingSet::insert ( const QString name,
const Node value 
)

Insert a new binding into the set.

void Soprano::BindingSet::replace ( int  offset,
const Node value 
)

Replaces a value in the binding set.

Since:
2.3
void Soprano::BindingSet::replace ( const QString name,
const Node value 
)

Replaces a value in the binding set.

Since:
2.3
bool Soprano::BindingSet::operator== ( const BindingSet other) const

Comparison operator.

Since:
2.5
bool Soprano::BindingSet::operator!= ( const BindingSet other) const

Comparison operator.

Since:
2.5

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