knowrob  2.1.0
A Knowledge Base System for Cognition-enabled Robots
IRIAtom.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_IRI_ATOM_H
7 #define KNOWROB_IRI_ATOM_H
8 
9 #include "Atom.h"
10 #include "RDFNode.h"
11 #include "knowrob/formulas/Predicate.h"
12 
13 namespace knowrob {
18  class IRIAtom : public Atom, public RDFNode {
19  public:
24  explicit IRIAtom(std::string_view stringForm)
27  isIRI_ = true;
28  }
29 
34  static std::shared_ptr<IRIAtom> Tabled(std::string_view stringForm);
35 
42  PredicatePtr operator()(const TermPtr &s, const TermPtr &o) const;
43 
49  PredicatePtr operator()(const TermPtr &s) const;
50 
51  // override Printable
52  void write(std::ostream &os) const override;
53 
54  protected:
55  };
56 
57  using IRIAtomPtr = std::shared_ptr<IRIAtom>;
58 
65  IRIAtomPtr iri(std::string_view ns, std::string_view name);
66 
67 } // knowrob
68 
69 
70 #endif //KNOWROB_IRI_ATOM_H
std::string_view stringForm() const final
Definition: Atom.h:55
void write(std::ostream &os) const override
PredicatePtr operator()(const TermPtr &s) const
IRIAtom(std::string_view stringForm)
Definition: IRIAtom.h:24
PredicatePtr operator()(const TermPtr &s, const TermPtr &o) const
static std::shared_ptr< IRIAtom > Tabled(std::string_view stringForm)
bool isIRI_
Definition: Term.h:113
AtomType
Definition: Atom.h:18
std::shared_ptr< Term > TermPtr
Definition: Term.h:117
std::shared_ptr< Predicate > PredicatePtr
Definition: Predicate.h:77
IRIAtomPtr iri(std::string_view ns, std::string_view name)
Definition: IRIAtom.cpp:62
std::shared_ptr< IRIAtom > IRIAtomPtr
Definition: IRIAtom.h:57
RDFNodeType
Definition: RDFNode.h:15