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

#include <QueryPipeline.h>

Inheritance diagram for knowrob::AnswerBuffer_WithReference:
Collaboration diagram for knowrob::AnswerBuffer_WithReference:

Public Member Functions

 AnswerBuffer_WithReference (const std::shared_ptr< QueryPipeline > &pipeline)
 
 AnswerBuffer_WithReference (const std::shared_ptr< QueryPipeline > &pipeline)
 
- Public Member Functions inherited from knowrob::TokenBuffer
 TokenBuffer ()
 
void stopBuffering ()
 
std::shared_ptr< TokenQueuecreateQueue ()
 
 TokenBuffer ()
 
void stopBuffering ()
 
std::shared_ptr< TokenQueuecreateQueue ()
 
- Public Member Functions inherited from knowrob::TokenBroadcaster
 TokenBroadcaster ()
 
 ~TokenBroadcaster () override
 
void addSubscriber (const std::shared_ptr< Channel > &subscriber)
 
void removeSubscriber (const std::shared_ptr< Channel > &subscriber)
 
 TokenBroadcaster ()
 
 ~TokenBroadcaster () override
 
void addSubscriber (const std::shared_ptr< Channel > &subscriber)
 
void removeSubscriber (const std::shared_ptr< Channel > &subscriber)
 
- Public Member Functions inherited from knowrob::TokenStream
 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 Attributes

std::shared_ptr< QueryPipelinepipeline_
 
- Protected Attributes inherited from knowrob::TokenBuffer
std::mutex bufferMutex_
 
std::atomic< bool > isBuffering_
 
std::list< TokenPtrbuffer_
 
- Protected Attributes inherited from knowrob::TokenBroadcaster
std::list< std::shared_ptr< Channel > > subscribers_
 
std::mutex mtx_
 
- Protected Attributes inherited from knowrob::TokenStream
std::list< std::shared_ptr< Channel > > channels_
 
std::atomic< bool > isOpened_
 
std::mutex channel_mutex_
 

Additional Inherited Members

- Protected Member Functions inherited from knowrob::TokenBuffer
void push (const TokenPtr &tok) override
 
void push (const TokenPtr &tok) override
 
- Protected Member Functions inherited from knowrob::TokenBroadcaster
virtual void pushToBroadcast (const TokenPtr &tok)
 
virtual void pushToBroadcast (const TokenPtr &tok)
 
- Protected Member Functions inherited from knowrob::TokenStream
virtual void push (Channel &channel, const TokenPtr &tok)
 
virtual void push (Channel &channel, const TokenPtr &tok)
 

Detailed Description

A buffer that holds a reference to a query pipeline. This is used such that the underlying pipeline is destroyed once the user drops the reference to the buffer.

Definition at line 79 of file QueryPipeline.h.

Constructor & Destructor Documentation

◆ AnswerBuffer_WithReference() [1/2]

knowrob::AnswerBuffer_WithReference::AnswerBuffer_WithReference ( const std::shared_ptr< QueryPipeline > &  pipeline)
inlineexplicit

Definition at line 81 of file QueryPipeline.h.

82  : TokenBuffer(), pipeline_(pipeline) {}
std::shared_ptr< QueryPipeline > pipeline_
Definition: QueryPipeline.h:85

◆ AnswerBuffer_WithReference() [2/2]

knowrob::AnswerBuffer_WithReference::AnswerBuffer_WithReference ( const std::shared_ptr< QueryPipeline > &  pipeline)
inlineexplicit

Definition at line 81 of file QueryPipeline.h.

82  : TokenBuffer(), pipeline_(pipeline) {}

Member Data Documentation

◆ pipeline_

std::shared_ptr< QueryPipeline > knowrob::AnswerBuffer_WithReference::pipeline_
protected

Definition at line 85 of file QueryPipeline.h.


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