# class BindingSet

###

Module | soprano
Namespace | Soprano
Class | BindingSet
Inherits |

\class BindingSet bindingset.h Soprano/BindingSet

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>

### methods

- BindingSet ( )

  returns ctor

  Create an emtpy set.

- BindingSet (other)

  returns ctor

  Argument | Type | Default
  --- | --- | ---
  other | Soprano.BindingSet |

  Copy constructor.

- bindingNames ( )

  returns QStringList

  Returns The names of the bound variables in this set.

- contains (name)

  returns bool

  Argument | Type | Default
  --- | --- | ---
  name | QString |

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

  name - The variable name.

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

- count ( )

  returns int

  The number of bindings in this set.

  Returns The number of bindings.

- insert (name, value)

  returns Nothing

  Argument | Type | Default
  --- | --- | ---
  name | QString |
  value | Soprano.Node |

  Insert a new binding into the set.

- operator [] (offset)

  returns Soprano.Node

  Argument | Type | Default
  --- | --- | ---
  offset | int |

  Get the binding for a variable by index.

  This is equivalent to value(int) const.

- operator [] (name)

  returns Soprano.Node

  Argument | Type | Default
  --- | --- | ---
  name | QString |

  Get the binding for a variable.

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

- value (offset)

  returns Soprano.Node

  Argument | Type | Default
  --- | --- | ---
  offset | int |

  Get the binding for a variable by index.

  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.

- value (name)

  returns Soprano.Node

  Argument | Type | Default
  --- | --- | ---
  name | QString |

  Get the binding for a variable.

  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.