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

#include <Bottom.h>

Inheritance diagram for knowrob::Bottom:
Collaboration diagram for knowrob::Bottom:

Public Member Functions

void write (std::ostream &os) const override
 
void write (std::ostream &os) const override
 
- Public Member Functions inherited from knowrob::Predicate
 Predicate (std::string_view functor, const std::vector< TermPtr > &arguments={})
 
 Predicate (AtomPtr functor, const std::vector< TermPtr > &arguments={})
 
auto & functor () const
 
auto arity () const
 
const std::vector< TermPtr > & arguments () const
 
const std::set< std::string_view > & variables ()
 
size_t hash () const
 
 Predicate (std::string_view functor, const std::vector< TermPtr > &arguments={})
 
 Predicate (AtomPtr functor, const std::vector< TermPtr > &arguments={})
 
auto & functor () const
 
auto arity () const
 
const std::vector< TermPtr > & arguments () const
 
const std::set< std::string_view > & variables ()
 
void write (std::ostream &os) const override
 
size_t hash () const
 
- Public Member Functions inherited from knowrob::Formula
 Formula (const FormulaType &type)
 
virtual ~Formula ()=default
 
bool operator== (const Formula &other) const
 
FormulaType type () const
 
bool isAtomic () const
 
bool isGround () const
 
bool isTop () const
 
bool isBottom () const
 
 Formula (const FormulaType &type)
 
virtual ~Formula ()=default
 
bool operator== (const Formula &other) const
 
FormulaType type () const
 
bool isAtomic () const
 
bool isGround () const
 
bool isTop () const
 
bool isBottom () const
 
- Public Member Functions inherited from knowrob::Printable
virtual ~Printable ()=default
 
virtual std::string format () const
 
virtual ~Printable ()=default
 
virtual std::string format () const
 

Static Public Member Functions

static const std::shared_ptr< Bottom > & get ()
 
static const std::shared_ptr< Bottom > & get ()
 
- Static Public Member Functions inherited from knowrob::Predicate
static FunctionPtr toFunction (const std::shared_ptr< Predicate > &predicate)
 
static std::shared_ptr< PredicatefromFunction (const FunctionPtr &fn)
 
static FunctionPtr toFunction (const std::shared_ptr< Predicate > &predicate)
 
static std::shared_ptr< PredicatefromFunction (const FunctionPtr &fn)
 

Protected Member Functions

bool isEqual (const Formula &other) const override
 
bool isEqual (const Formula &other) const override
 
- Protected Member Functions inherited from knowrob::Predicate
std::set< std::string_view > getVariables1 () const
 
std::set< std::string_view > getVariables1 () const
 
bool isEqual (const Formula &other) const override
 

Additional Inherited Members

- Protected Attributes inherited from knowrob::Predicate
const AtomPtr functor_
 
const std::vector< TermPtrarguments_
 
const std::set< std::string_view > variables_
 
- Protected Attributes inherited from knowrob::Formula
const FormulaType type_
 
bool isGround_ = true
 

Detailed Description

A predicate with a fixed truth value being false.

Definition at line 17 of file Bottom.h.

Member Function Documentation

◆ get() [1/2]

const std::shared_ptr< Bottom > & Bottom::get ( )
static

Definition at line 12 of file Bottom.cpp.

12  {
13  static std::shared_ptr<Bottom> singleton(new Bottom);
14  return singleton;
15 }

◆ get() [2/2]

static const std::shared_ptr<Bottom>& knowrob::Bottom::get ( )
static

◆ isEqual() [1/2]

bool Bottom::isEqual ( const Formula other) const
overrideprotectedvirtual

Implements knowrob::Formula.

Definition at line 25 of file Bottom.cpp.

25  {
26  return true; // isEqual is only called if other also has type "Bottom"
27 }

◆ isEqual() [2/2]

bool knowrob::Bottom::isEqual ( const Formula other) const
overrideprotectedvirtual

Reimplemented from knowrob::Predicate.

◆ write() [1/2]

void Bottom::write ( std::ostream &  os) const
overridevirtual

Print this object to a stream.

Parameters
osthe stream to print to.

Implements knowrob::Printable.

Definition at line 21 of file Bottom.cpp.

21  {
22  os << "\u22A5";
23 }

◆ write() [2/2]

void knowrob::Bottom::write ( std::ostream &  os) const
overridevirtual

Print this object to a stream.

Parameters
osthe stream to print to.

Reimplemented from knowrob::Predicate.


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