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

#include <TripleContainer.h>

Inheritance diagram for knowrob::TripleContainer::iterator:
Collaboration diagram for knowrob::TripleContainer::iterator:

Public Member Functions

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

Detailed Description

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

Definition at line 33 of file TripleContainer.h.

Constructor & Destructor Documentation

◆ iterator() [1/2]

knowrob::TripleContainer::iterator::iterator ( const ConstGenerator generator)
inlineexplicit

Definition at line 34 of file TripleContainer.h.

35  : generator_(generator), ptr_(generator_()) {
36  }

◆ iterator() [2/2]

knowrob::TripleContainer::iterator::iterator ( const ConstGenerator generator)
inlineexplicit

Definition at line 34 of file TripleContainer.h.

35  : generator_(generator), ptr_(generator_()) {
36  }

Member Function Documentation

◆ dereference() [1/2]

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

Definition at line 40 of file TripleContainer.h.

40 { return *ptr_; }

◆ dereference() [2/2]

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

Definition at line 40 of file TripleContainer.h.

40 { return *ptr_; }

◆ equal() [1/2]

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

Definition at line 38 of file TripleContainer.h.

38 { return ptr_ == other.ptr_; }

◆ equal() [2/2]

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

Definition at line 38 of file TripleContainer.h.

38 { return ptr_ == other.ptr_; }

◆ increment() [1/2]

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

Definition at line 42 of file TripleContainer.h.

42 { ptr_ = generator_(); }

◆ increment() [2/2]

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

Definition at line 42 of file TripleContainer.h.

42 { ptr_ = generator_(); }

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