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)


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@kde.org>

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

BindingSet& Soprano::BindingSet::operator= ( const BindingSet  ) 

QStringList Soprano::BindingSet::bindingNames (  )  const

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:
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.

Node Soprano::BindingSet::value ( const QString name  )  const

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.
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:
name The variable name.
Returns:
true if this set contains a binding for the variable name, false otherwise.

int Soprano::BindingSet::count (  )  const

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.


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

Generated on Tue Jul 22 17:39:34 2008 for Soprano by  doxygen 1.5.6