knowrob  2.1.0
A Knowledge Base System for Cognition-enabled Robots
knowrob::GraphSequence Class Reference

#include <GraphSequence.h>

Inheritance diagram for knowrob::GraphSequence:
Collaboration diagram for knowrob::GraphSequence:

Public Member Functions

 GraphSequence ()
 
 GraphSequence (const std::vector< std::shared_ptr< GraphTerm >> &terms)
 
void write (std::ostream &os) const override
 
 GraphSequence ()
 
 GraphSequence (const std::vector< std::shared_ptr< GraphTerm >> &terms)
 
void write (std::ostream &os) const override
 
- Public Member Functions inherited from knowrob::GraphConnective
virtual ~GraphConnective ()=default
 
void addPattern (const TriplePatternPtr &pattern)
 
void addMember (const std::shared_ptr< GraphTerm > &member)
 
const auto & terms () const
 
virtual ~GraphConnective ()=default
 
void addPattern (const TriplePatternPtr &pattern)
 
void addMember (const std::shared_ptr< GraphTerm > &member)
 
const auto & terms () const
 
- Public Member Functions inherited from knowrob::GraphTerm
virtual ~GraphTerm ()=default
 
bool isPattern () const
 
bool isBuiltin () const
 
auto termType () const
 
virtual ~GraphTerm ()=default
 
bool isPattern () const
 
bool isBuiltin () const
 
auto termType () const
 
- Public Member Functions inherited from knowrob::Printable
virtual ~Printable ()=default
 
virtual std::string format () const
 
virtual ~Printable ()=default
 
virtual std::string format () const
 

Additional Inherited Members

- Protected Member Functions inherited from knowrob::GraphConnective
 GraphConnective (GraphTermType termType)
 
 GraphConnective (GraphTermType termType, const std::vector< std::shared_ptr< GraphTerm >> &terms)
 
 GraphConnective (GraphTermType termType)
 
 GraphConnective (GraphTermType termType, const std::vector< std::shared_ptr< GraphTerm >> &terms)
 
- Protected Member Functions inherited from knowrob::GraphTerm
 GraphTerm (GraphTermType termType)
 
 GraphTerm (GraphTermType termType)
 
- Protected Attributes inherited from knowrob::GraphConnective
std::vector< std::shared_ptr< GraphTerm > > terms_
 
- Protected Attributes inherited from knowrob::GraphTerm
GraphTermType termType_
 

Detailed Description

A query connective where all terms must be matched.

Definition at line 15 of file GraphSequence.h.

Constructor & Destructor Documentation

◆ GraphSequence() [1/4]

knowrob::GraphSequence::GraphSequence ( )
inline

Definition at line 17 of file GraphSequence.h.

◆ GraphSequence() [2/4]

knowrob::GraphSequence::GraphSequence ( const std::vector< std::shared_ptr< GraphTerm >> &  terms)
inlineexplicit

Definition at line 19 of file GraphSequence.h.

◆ GraphSequence() [3/4]

knowrob::GraphSequence::GraphSequence ( )
inline

Definition at line 17 of file GraphSequence.h.

◆ GraphSequence() [4/4]

knowrob::GraphSequence::GraphSequence ( const std::vector< std::shared_ptr< GraphTerm >> &  terms)
inlineexplicit

Definition at line 19 of file GraphSequence.h.

Member Function Documentation

◆ write() [1/2]

void GraphSequence::write ( std::ostream &  os) const
overridevirtual

Print this object to a stream.

Parameters
osthe stream to print to.

Implements knowrob::GraphTerm.

Definition at line 11 of file GraphSequence.cpp.

11  {
12  os << "(";
13  for (std::size_t i = 0; i < terms_.size(); i++) {
14  if (i > 0) {
15  os << ", ";
16  }
17  os << *terms_[i];
18  }
19  os << ")";
20 }
std::vector< std::shared_ptr< GraphTerm > > terms_

◆ write() [2/2]

void knowrob::GraphSequence::write ( std::ostream &  os) const
overridevirtual

Print this object to a stream.

Parameters
osthe stream to print to.

Implements knowrob::GraphTerm.


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