knowrob
2.1.0
A Knowledge Base System for Cognition-enabled Robots
|
#include <TokenStream.h>
Classes | |
class | Channel |
Public Member Functions | |
TokenStream () | |
virtual | ~TokenStream () |
TokenStream (const TokenStream &)=delete | |
virtual void | close () |
bool | isOpened () const |
TokenStream () | |
virtual | ~TokenStream () |
TokenStream (const TokenStream &)=delete | |
virtual void | close () |
bool | isOpened () const |
Protected Member Functions | |
virtual void | push (Channel &channel, const TokenPtr &tok) |
virtual void | push (const TokenPtr &tok)=0 |
virtual void | push (Channel &channel, const TokenPtr &tok) |
virtual void | push (const TokenPtr &tok)=0 |
Protected Attributes | |
std::list< std::shared_ptr< Channel > > | channels_ |
std::atomic< bool > | isOpened_ |
std::mutex | channel_mutex_ |
A stream of query results. The only way to write to a stream is by creating a channel.
Definition at line 22 of file TokenStream.h.
TokenStream::TokenStream | ( | ) |
Definition at line 17 of file TokenStream.cpp.
|
virtual |
Definition at line 20 of file TokenStream.cpp.
|
delete |
Cannot be copy-assigned.
knowrob::TokenStream::TokenStream | ( | ) |
|
virtual |
|
delete |
Cannot be copy-assigned.
|
virtual |
Close the stream. This will push an EOS message, and all future attempts to push a non EOS message will cause a warning. Once closed, a stream cannot be opened again. Note that a stream auto-closes once it has received EOS messages from all of its input channels.
Reimplemented in knowrob::QueryStage::Pusher, knowrob::QueryStage, knowrob::QueryStage::Pusher, and knowrob::QueryStage.
Definition at line 24 of file TokenStream.cpp.
|
virtual |
Close the stream. This will push an EOS message, and all future attempts to push a non EOS message will cause a warning. Once closed, a stream cannot be opened again. Note that a stream auto-closes once it has received EOS messages from all of its input channels.
Reimplemented in knowrob::QueryStage::Pusher, knowrob::QueryStage, knowrob::QueryStage::Pusher, and knowrob::QueryStage.
bool TokenStream::isOpened | ( | ) | const |
Definition at line 44 of file TokenStream.cpp.
bool knowrob::TokenStream::isOpened | ( | ) | const |
Reimplemented in knowrob::ConjunctiveBroadcaster, and knowrob::ConjunctiveBroadcaster.
Definition at line 48 of file TokenStream.cpp.
|
protectedvirtual |
Reimplemented in knowrob::ConjunctiveBroadcaster, and knowrob::ConjunctiveBroadcaster.
|
protectedpure virtual |
Implemented in knowrob::TokenQueue, knowrob::TokenBuffer, knowrob::TokenBroadcaster, knowrob::RedundantAnswerFilter, knowrob::QueryStage, knowrob::QueryStage::Pusher, knowrob::AnswerTransformer, knowrob::TokenQueue, knowrob::TokenBuffer, knowrob::TokenBroadcaster, knowrob::RedundantAnswerFilter, knowrob::QueryStage, knowrob::QueryStage::Pusher, knowrob::AnswerTransformer, knowrob::DisjunctiveBroadcaster, and knowrob::DisjunctiveBroadcaster.
|
protectedpure virtual |
Implemented in knowrob::TokenQueue, knowrob::TokenBuffer, knowrob::TokenBroadcaster, knowrob::RedundantAnswerFilter, knowrob::QueryStage, knowrob::QueryStage::Pusher, knowrob::AnswerTransformer, knowrob::TokenQueue, knowrob::TokenBuffer, knowrob::TokenBroadcaster, knowrob::RedundantAnswerFilter, knowrob::QueryStage, knowrob::QueryStage::Pusher, knowrob::AnswerTransformer, knowrob::DisjunctiveBroadcaster, and knowrob::DisjunctiveBroadcaster.
|
protected |
Definition at line 120 of file TokenStream.h.
|
protected |
Definition at line 118 of file TokenStream.h.
|
protected |
Definition at line 119 of file TokenStream.h.