6 #include "knowrob/terms/Atomic.h"
7 #include "knowrob/terms/Atom.h"
8 #include "knowrob/terms/Numeric.h"
9 #include "knowrob/terms/String.h"
10 #include "knowrob/terms/IRIAtom.h"
11 #include "knowrob/semweb/Triple.h"
12 #include "knowrob/integration/python/utils.h"
22 return ((
Atom *)
this)->isSameAtom(*((
Atom *) &other));
26 return ((
String *)
this)->isSameString(*((
String *) &other));
33 switch (triple.
xsdType().value()) {
44 return std::make_shared<Integer>(triple.
valueAsInt());
46 return std::make_shared<Long>(triple.
valueAsLong());
63 return std::hash<std::string_view>{}(
stringForm());
70 enum_<AtomicType>(
"AtomicType")
75 class_<Atomic, std::shared_ptr<Atomic>, bases<Term>, boost::noncopyable>
static std::shared_ptr< Atomic > makeTripleValue(const Triple &triple)
size_t hashOfAtomic() const
bool isSameAtomic(const Atomic &other) const
virtual std::string_view stringForm() const =0
AtomicType atomicType() const
static std::shared_ptr< IRIAtom > Tabled(std::string_view stringForm)
virtual std::string_view valueAsString() const =0
virtual short valueAsShort() const =0
virtual unsigned int valueAsUnsignedInt() const =0
virtual double valueAsDouble() const =0
virtual float valueAsFloat() const =0
virtual long valueAsLong() const =0
virtual unsigned short valueAsUnsignedShort() const =0
virtual unsigned long valueAsUnsignedLong() const =0
virtual int valueAsInt() const =0
virtual bool valueAsBoolean() const =0
void createType< Atomic >()