6 #include <gtest/gtest.h> 
    7 #include <knowrob/queries/ConjunctiveBroadcaster.h> 
    8 #include "knowrob/queries/TokenQueue.h" 
    9 #include "knowrob/queries/AnswerYes.h" 
   10 #include "knowrob/queries/Answer.h" 
   11 #include "knowrob/terms/Numeric.h" 
   17           ignoreInconsistentAnswers_(ignoreInconsistentAnswers),
 
   18           hasSolution_(false) {}
 
   22         auto answer = std::static_pointer_cast<const Answer>(tok);
 
   23         if (answer->isPositive()) {
 
   24             const uint32_t channelID = channel.
id();
 
   30             buffer_[channelID][answer->hashOfAnswer()] = answer;
 
   43         } 
else if (answer->isNegative()) {
 
   46             negativeAnswers_.emplace_back(std::static_pointer_cast<const AnswerNo>(answer));
 
   49         if (tok->indicatesEndOfEvaluation()) {
 
   55                     auto no = std::make_shared<AnswerNo>();
 
   72         uint32_t pushedChannelID, AnswerMap::iterator it, 
AnswerPtr &combinedResult) {
 
   77     } 
else if (it->first == pushedChannelID) {
 
   82     } 
else if (it->second.size() == 1) {
 
   96         for (
auto &msg: it->second) {
 
bool ignoreInconsistentAnswers_
ConjunctiveBroadcaster(bool ignoreInconsistentAnswers=true)
unsigned int numClosedChannels_
std::vector< AnswerNoPtr > negativeAnswers_
void genCombinations(uint32_t pushedChannelID, AnswerMap::iterator it, AnswerPtr &combinedResult)
void push(Channel &channel, const TokenPtr &tok) override
void push(const TokenPtr &tok) override
virtual void push(Channel &channel, const TokenPtr &tok)
std::list< std::shared_ptr< Channel > > channels_
std::shared_ptr< const Token > TokenPtr
AnswerPtr mergeAnswers(const AnswerPtr &a, const AnswerPtr &b, bool ignoreInconsistencies)
std::shared_ptr< const Answer > AnswerPtr