knowrob
2.1.0
A Knowledge Base System for Cognition-enabled Robots
|
#include <Atom.h>
Public Member Functions | |
Atom (std::string_view stringForm, AtomType atomType=AtomType::REGULAR) | |
bool | isSameAtom (const Atom &other) const |
AtomType | atomType () const |
std::string_view | stringForm () const final |
void | write (std::ostream &os) const override |
Atom (std::string_view stringForm, AtomType atomType=AtomType::REGULAR) | |
bool | isSameAtom (const Atom &other) const |
AtomType | atomType () const |
std::string_view | stringForm () const final |
void | write (std::ostream &os) const override |
Public Member Functions inherited from knowrob::Atomic | |
Atomic (AtomicType atomicType) | |
~Atomic () override=default | |
bool | isSameAtomic (const Atomic &other) const |
AtomicType | atomicType () const |
size_t | hashOfAtomic () const |
const std::set< std::string_view > & | variables () const final |
Atomic (AtomicType atomicType) | |
~Atomic () override=default | |
bool | isSameAtomic (const Atomic &other) const |
AtomicType | atomicType () const |
size_t | hashOfAtomic () const |
const std::set< std::string_view > & | variables () const final |
void | write (std::ostream &os) const override |
Public Member Functions inherited from knowrob::Term | |
Term (TermType termType) | |
~Term () override=default | |
bool | operator== (const Term &other) const |
bool | operator!= (const Term &other) const |
TermType | termType () const |
bool | isGround () const |
bool | isAtomic () const |
bool | isAtom () const |
bool | isVariable () const |
bool | isFunction () const |
bool | isNumeric () const |
bool | isString () const |
bool | isIRI () const |
bool | isBlank () const |
size_t | hash () const |
Term (TermType termType) | |
~Term () override=default | |
bool | operator== (const Term &other) const |
bool | operator!= (const Term &other) const |
TermType | termType () const |
bool | isGround () const |
bool | isAtomic () const |
bool | isAtom () const |
bool | isVariable () const |
bool | isFunction () const |
bool | isNumeric () const |
bool | isString () const |
bool | isIRI () const |
bool | isBlank () const |
size_t | hash () 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 std::shared_ptr< knowrob::Atom > | Tabled (std::string_view stringForm) |
static std::shared_ptr< knowrob::Atom > | Tabled (std::string_view stringForm) |
Static Public Member Functions inherited from knowrob::Atomic | |
static std::shared_ptr< Atomic > | makeTripleValue (const Triple &triple) |
static std::shared_ptr< Atomic > | makeTripleValue (const Triple &triple) |
Protected Types | |
using | AtomTable = std::map< std::string, std::optional< std::weak_ptr< Atom > >, std::less<> > |
using | AtomTable = std::map< std::string, std::optional< std::weak_ptr< Atom > >, std::less<> > |
Static Protected Member Functions | |
static AtomTable & | table () |
static AtomTable & | table () |
Protected Attributes | |
std::string_view | stringForm_ |
const AtomType | atomType_ |
Protected Attributes inherited from knowrob::Atomic | |
const AtomicType | atomicType_ |
Protected Attributes inherited from knowrob::Term | |
const TermType | termType_ |
bool | isBlank_ = false |
bool | isIRI_ = false |
Additional Inherited Members | |
Static Protected Attributes inherited from knowrob::Term | |
static const std::set< std::string_view > | noVariables_ = {} |
|
protected |
|
protected |
|
explicit |
|
explicit |
Constructs an atom from a string.
stringForm | the string form of the atom |
atomType | the type of the atom |
|
inline |
|
inline |
bool Atom::isSameAtom | ( | const Atom & | other | ) | const |
bool knowrob::Atom::isSameAtom | ( | const Atom & | other | ) | const |
other | another atom |
|
inlinefinalvirtual |
Get the lexical form of this atomic term.
Implements knowrob::Atomic.
Definition at line 55 of file Atom.h.
|
inlinefinalvirtual |
Get the lexical form of this atomic term.
Implements knowrob::Atomic.
Definition at line 55 of file Atom.h.
|
staticprotected |
|
staticprotected |
|
static |
|
static |
stringForm | the string form of the atom |
|
overridevirtual |
Print this object to a stream.
os | the stream to print to. |
Implements knowrob::Printable.
Reimplemented in knowrob::IRIAtom, and knowrob::IRIAtom.
Definition at line 28 of file Atom.cpp.
|
overridevirtual |
Print this object to a stream.
os | the stream to print to. |
Reimplemented from knowrob::Atomic.
Reimplemented in knowrob::IRIAtom.