knowrob  2.1.0
A Knowledge Base System for Cognition-enabled Robots
knowrob::MutableTripleContainer Class Referenceabstract

#include <TripleContainer.h>

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

Classes

struct  iterator
 

Public Types

using MutableGenerator = std::function< TriplePtr *()>
 
using MutableGenerator = std::function< TriplePtr *()>
 
- Public Types inherited from knowrob::TripleContainer
using ConstGenerator = std::function< const TriplePtr *()>
 
using ConstGenerator = std::function< const TriplePtr *()>
 

Public Member Functions

iterator begin ()
 
virtual MutableGenerator generator ()=0
 
bool isMutable () const override
 
iterator begin ()
 
virtual MutableGenerator generator ()=0
 
bool isMutable () const override
 
- Public Member Functions inherited from knowrob::TripleContainer
virtual ~TripleContainer ()=default
 
iterator begin () const
 
bool empty () const
 
virtual ConstGenerator cgenerator () const =0
 
virtual ~TripleContainer ()=default
 
iterator begin () const
 
bool empty () const
 
virtual ConstGenerator cgenerator () const =0
 

Static Public Member Functions

static iterator end ()
 
static iterator end ()
 
- Static Public Member Functions inherited from knowrob::TripleContainer
static iterator end ()
 
static iterator end ()
 

Detailed Description

A triple container with mutable triples.

Definition at line 86 of file TripleContainer.h.

Member Typedef Documentation

◆ MutableGenerator [1/2]

A generator function that returns a pointer to a triple.

Definition at line 91 of file TripleContainer.h.

◆ MutableGenerator [2/2]

A generator function that returns a pointer to a triple.

Definition at line 91 of file TripleContainer.h.

Member Function Documentation

◆ begin() [1/2]

iterator knowrob::MutableTripleContainer::begin ( )
inline
Returns
an iterator that points to the first triple in the container.

Definition at line 116 of file TripleContainer.h.

116  {
117  return iterator(generator());
118  }
virtual MutableGenerator generator()=0

◆ begin() [2/2]

iterator knowrob::MutableTripleContainer::begin ( )
inline
Returns
an iterator that points to the first triple in the container.

Definition at line 116 of file TripleContainer.h.

116  {
117  return iterator(generator());
118  }

◆ end() [1/2]

static iterator knowrob::MutableTripleContainer::end ( )
inlinestatic
Returns
an iterator that points to the end of the container.

Definition at line 123 of file TripleContainer.h.

123  {
124  return iterator([] { return nullptr; });
125  }

◆ end() [2/2]

static iterator knowrob::MutableTripleContainer::end ( )
inlinestatic
Returns
an iterator that points to the end of the container.

Definition at line 123 of file TripleContainer.h.

123  {
124  return iterator([] { return nullptr; });
125  }

◆ generator() [1/2]

virtual MutableGenerator knowrob::MutableTripleContainer::generator ( )
pure virtual

◆ generator() [2/2]

virtual MutableGenerator knowrob::MutableTripleContainer::generator ( )
pure virtual

◆ isMutable() [1/2]

bool knowrob::MutableTripleContainer::isMutable ( ) const
inlineoverridevirtual
Returns
true if the container is mutable.

Reimplemented from knowrob::TripleContainer.

Definition at line 133 of file TripleContainer.h.

133 { return true; }

◆ isMutable() [2/2]

bool knowrob::MutableTripleContainer::isMutable ( ) const
inlineoverridevirtual
Returns
true if the container is mutable.

Reimplemented from knowrob::TripleContainer.

Definition at line 133 of file TripleContainer.h.

133 { return true; }

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