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

#include <AnswerDontKnow.h>

Inheritance diagram for knowrob::AnswerDontKnow:
Collaboration diagram for knowrob::AnswerDontKnow:

Public Member Functions

 AnswerDontKnow ()
 
 AnswerDontKnow (const AnswerDontKnow &other)
 
std::string stringFormOfDontKnow () const
 
std::string humanReadableFormOfDontKnow () const
 
 AnswerDontKnow ()
 
 AnswerDontKnow (const AnswerDontKnow &other)
 
std::string stringFormOfDontKnow () const
 
std::string humanReadableFormOfDontKnow () const
 
- Public Member Functions inherited from knowrob::Answer
 Answer ()
 
 Answer (const Answer &other)
 
auto & frame () const
 
void setFrame (const std::shared_ptr< GraphSelector > &frame)
 
void applyFrame (const GraphSelector &frame)
 
bool isNegative () const
 
bool isPositive () const
 
bool isUncertain () const
 
bool isCertain () const
 
void setIsUncertain (bool val, std::optional< double > confidence)
 
bool isOccasionallyTrue () const
 
bool isAllwaysTrue () const
 
void setIsOccasionallyTrue (bool val)
 
void setReasonerTerm (const AtomPtr &reasonerTerm)
 
auto & reasonerTerm () const
 
size_t hashOfAnswer () const
 
std::string stringFormOfAnswer () const
 
std::string humanReadableForm () const
 
 Answer ()
 
 Answer (const Answer &other)
 
auto & frame () const
 
void setFrame (const std::shared_ptr< GraphSelector > &frame)
 
void applyFrame (const GraphSelector &frame)
 
bool isNegative () const
 
bool isPositive () const
 
bool isUncertain () const
 
bool isCertain () const
 
void setIsUncertain (bool val, std::optional< double > confidence)
 
bool isOccasionallyTrue () const
 
bool isAllwaysTrue () const
 
void setIsOccasionallyTrue (bool val)
 
void setReasonerTerm (const AtomPtr &reasonerTerm)
 
auto & reasonerTerm () const
 
size_t hashOfAnswer () const
 
std::string stringFormOfAnswer () const
 
std::string humanReadableForm () const
 
- Public Member Functions inherited from knowrob::Token
 Token (TokenType tokenType)
 
virtual ~Token ()=default
 
TokenType tokenType () const
 
size_t hash () const
 
std::string stringForm () const
 
bool isControlToken () const
 
bool isAnswerToken () const
 
bool indicatesEndOfEvaluation () const
 
void write (std::ostream &os) const override
 
 Token (TokenType tokenType)
 
virtual ~Token ()=default
 
TokenType tokenType () const
 
size_t hash () const
 
std::string stringForm () const
 
bool isControlToken () const
 
bool isAnswerToken () const
 
bool indicatesEndOfEvaluation () const
 
void write (std::ostream &os) const override
 
- Public Member Functions inherited from knowrob::Printable
virtual ~Printable ()=default
 
virtual std::string format () const
 
virtual ~Printable ()=default
 
virtual std::string format () const
 

Additional Inherited Members

- Protected Member Functions inherited from knowrob::Answer
void setIsPositive (bool val)
 
void setIsNegative (bool val)
 
void setIsPositive (bool val)
 
void setIsNegative (bool val)
 
- Protected Attributes inherited from knowrob::Answer
std::shared_ptr< GraphSelectorframe_
 
AtomPtr reasonerTerm_
 
bool isPositive_ = false
 
bool isNegative_ = false
 
- Protected Attributes inherited from knowrob::Token
TokenType tokenType_
 
bool isTerminalToken_ = false
 

Detailed Description

The answer is neither "yes" nor "no", but rather "I don't know".

Definition at line 15 of file AnswerDontKnow.h.

Constructor & Destructor Documentation

◆ AnswerDontKnow() [1/4]

AnswerDontKnow::AnswerDontKnow ( )

Definition at line 18 of file AnswerDontKnow.cpp.

19  : Answer() {
20 }

◆ AnswerDontKnow() [2/4]

AnswerDontKnow::AnswerDontKnow ( const AnswerDontKnow other)

Definition at line 22 of file AnswerDontKnow.cpp.

23  : Answer(other) {
24 }

◆ AnswerDontKnow() [3/4]

knowrob::AnswerDontKnow::AnswerDontKnow ( )

◆ AnswerDontKnow() [4/4]

knowrob::AnswerDontKnow::AnswerDontKnow ( const AnswerDontKnow other)

Member Function Documentation

◆ humanReadableFormOfDontKnow() [1/2]

std::string AnswerDontKnow::humanReadableFormOfDontKnow ( ) const
Returns
the human readable form of this answer.

Definition at line 35 of file AnswerDontKnow.cpp.

35  {
36  static const std::string longMsg = "there was no evidence to conclude either yes or no";
37  return longMsg;
38 }
TermRule & string()
Definition: terms.cpp:63

◆ humanReadableFormOfDontKnow() [2/2]

std::string knowrob::AnswerDontKnow::humanReadableFormOfDontKnow ( ) const
Returns
the human readable form of this answer.

◆ stringFormOfDontKnow() [1/2]

std::string AnswerDontKnow::stringFormOfDontKnow ( ) const
Returns
the string form of this answer.

Definition at line 26 of file AnswerDontKnow.cpp.

26  {
27  std::stringstream os;
28  if (reasonerTerm_) {
29  os << "[" << *reasonerTerm_ << "] ";
30  }
31  os << "don't know\n";
32  return os.str();
33 }
AtomPtr reasonerTerm_
Definition: Answer.h:119

◆ stringFormOfDontKnow() [2/2]

std::string knowrob::AnswerDontKnow::stringFormOfDontKnow ( ) const
Returns
the string form of this answer.

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