6 #ifndef KNOWROB_TOKEN_STREAM_H_
7 #define KNOWROB_TOKEN_STREAM_H_
11 #include <shared_mutex>
14 #include <knowrob/queries/Token.h>
15 #include <knowrob/queries/EndOfEvaluation.h>
56 explicit Channel(
const std::shared_ptr<TokenStream> &stream);
71 static std::shared_ptr<Channel>
create(
const std::shared_ptr<TokenStream> &stream);
106 std::shared_ptr<TokenStream>
stream_;
108 std::list<std::shared_ptr<Channel>>::iterator
iterator_;
118 std::list<std::shared_ptr<Channel>>
channels_;
void push(const TokenPtr &tok)
static std::shared_ptr< Channel > create(const std::shared_ptr< TokenStream > &stream)
std::list< std::shared_ptr< Channel > >::iterator iterator_
void invalidateIterator()
bool hasValidIterator() const
Channel(const std::shared_ptr< TokenStream > &stream)
std::atomic< bool > isOpened_
std::atomic< bool > hasValidIterator_
Channel(const Channel &)=delete
std::shared_ptr< TokenStream > stream_
std::atomic< bool > isOpened_
virtual void push(const TokenPtr &tok)=0
std::mutex channel_mutex_
TokenStream(const TokenStream &)=delete
virtual void push(Channel &channel, const TokenPtr &tok)
std::list< std::shared_ptr< Channel > > channels_
std::shared_ptr< const Token > TokenPtr