knowrob  2.1.0
A Knowledge Base System for Cognition-enabled Robots
knowrob::MutableTripleContainer::iterator Struct Reference

#include <TripleContainer.h>

Inheritance diagram for knowrob::MutableTripleContainer::iterator:
Collaboration diagram for knowrob::MutableTripleContainer::iterator:

Public Member Functions

 iterator (MutableGenerator generator)
 
bool equal (iterator const &other) const
 
TriplePtrdereference () const
 
void increment ()
 
 iterator (MutableGenerator generator)
 
bool equal (iterator const &other) const
 
TriplePtrdereference () const
 
void increment ()
 

Detailed Description

An iterator that can be used to iterate over the triples in the container by using a generator function.

Definition at line 97 of file TripleContainer.h.

Constructor & Destructor Documentation

◆ iterator() [1/2]

knowrob::MutableTripleContainer::iterator::iterator ( MutableGenerator  generator)
inlineexplicit

Definition at line 98 of file TripleContainer.h.

99  : generator_(std::move(generator)), ptr_(generator_()) {
100  }
virtual MutableGenerator generator()=0

◆ iterator() [2/2]

knowrob::MutableTripleContainer::iterator::iterator ( MutableGenerator  generator)
inlineexplicit

Definition at line 98 of file TripleContainer.h.

99  : generator_(std::move(generator)), ptr_(generator_()) {
100  }

Member Function Documentation

◆ dereference() [1/2]

TriplePtr& knowrob::MutableTripleContainer::iterator::dereference ( ) const
inline

Definition at line 104 of file TripleContainer.h.

104 { return *ptr_; }

◆ dereference() [2/2]

TriplePtr& knowrob::MutableTripleContainer::iterator::dereference ( ) const
inline

Definition at line 104 of file TripleContainer.h.

104 { return *ptr_; }

◆ equal() [1/2]

bool knowrob::MutableTripleContainer::iterator::equal ( iterator const &  other) const
inline

Definition at line 102 of file TripleContainer.h.

102 { return ptr_ == other.ptr_; }

◆ equal() [2/2]

bool knowrob::MutableTripleContainer::iterator::equal ( iterator const &  other) const
inline

Definition at line 102 of file TripleContainer.h.

102 { return ptr_ == other.ptr_; }

◆ increment() [1/2]

void knowrob::MutableTripleContainer::iterator::increment ( )
inline

Definition at line 106 of file TripleContainer.h.

106 { ptr_ = generator_(); }

◆ increment() [2/2]

void knowrob::MutableTripleContainer::iterator::increment ( )
inline

Definition at line 106 of file TripleContainer.h.

106 { ptr_ = generator_(); }

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