Clingo
Loading...
Searching...
No Matches
Clingo::TheoryAssignment::iterator Class Reference

Iterator type for the theory assignment. More...

#include <theory.hh>

Public Types

using iterator_category = std::input_iterator_tag
 The iterator category.
 
using value_type = std::pair< Symbol, std::variant< int, double, Symbol > >
 The value type of the iterator, which is a pair of a symbol and its value.
 
using difference_type = std::ptrdiff_t
 The difference type of the iterator.
 
using pointer = value_type *
 The pointer type of the iterator.
 
using reference = value_type &
 The reference type of the iterator.
 

Public Member Functions

 iterator (TheoryAssignment const &assignment)
 Constructor for the iterator.
 
 iterator ()=default
 The default constructor for the iterator.
 
auto operator* () const -> reference
 Get the current value of the iterator.
 
auto operator++ () -> iterator &
 Increment the iterator to the next value.
 
auto operator++ (int) -> iterator
 Increment the iterator to the next value (postfix).
 

Friends

auto operator== (iterator const &a, sentinel const &b) -> bool
 Check whether their are still values in the assignment.
 

Detailed Description

Iterator type for the theory assignment.

Constructor & Destructor Documentation

◆ iterator() [1/2]

Clingo::TheoryAssignment::iterator::iterator ( TheoryAssignment const assignment)
inline

Constructor for the iterator.

Parameters
assignmentthe theory assignment to iterate over

◆ iterator() [2/2]

Clingo::TheoryAssignment::iterator::iterator ( )
default

The default constructor for the iterator.

For interface completeness, should not be used.

Member Function Documentation

◆ operator*()

auto Clingo::TheoryAssignment::iterator::operator* ( ) const -> reference
inline

Get the current value of the iterator.

Returns
the current value of the iterator

◆ operator++()

auto Clingo::TheoryAssignment::iterator::operator++ ( ) -> iterator &
inline

Increment the iterator to the next value.

Returns
a reference to self

Friends And Related Symbol Documentation

◆ operator==

auto operator== ( iterator const a,
sentinel const b 
) -> bool
friend

Check whether their are still values in the assignment.

Parameters
athe iterator to compare
bthe sentinel
Returns
whether the iterator is equal to the sentinel

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