knowrob  2.1.0
A Knowledge Base System for Cognition-enabled Robots
DisjunctiveBroadcaster.h
Go to the documentation of this file.
1 /*
2  * This file is part of KnowRob, please consult
3  * https://github.com/knowrob/knowrob for license details.
4  */
5 
6 #ifndef KNOWROB_ANSWER_CONSOLIDATOR_H
7 #define KNOWROB_ANSWER_CONSOLIDATOR_H
8 
9 #include "TokenBroadcaster.h"
10 #include "AnswerYes.h"
11 #include "AnswerNo.h"
12 #include "AnswerDontKnow.h"
13 
14 namespace knowrob {
18  class DisjunctiveBroadcaster : public TokenBroadcaster {
19  public:
21 
22  protected:
23  std::vector<AnswerNoPtr> negativeAnswers_;
24  std::vector<AnswerYesPtr> deferredPositiveAnswers_;
26  std::mutex db_mutex_;
27 
28  // Override TokenStream
29  void push(const TokenPtr &msg) override;
30 
31  void pushAnswer(const AnswerPtr &answer);
32 
34  };
35 
36 } // knowrob
37 
38 #endif //KNOWROB_ANSWER_CONSOLIDATOR_H
std::vector< AnswerNoPtr > negativeAnswers_
void pushAnswer(const AnswerPtr &answer)
void push(const TokenPtr &msg) override
std::vector< AnswerYesPtr > deferredPositiveAnswers_
std::shared_ptr< const Token > TokenPtr
Definition: Token.h:74
std::shared_ptr< const Answer > AnswerPtr
Definition: Answer.h:129