knowrob
2.1.0
A Knowledge Base System for Cognition-enabled Robots
|
#include <Triple.h>
Public Member Functions | |
Triple () | |
Triple (XSDType xsdType) | |
virtual | ~Triple ()=default |
bool | mergeFrame (const Triple &other) |
bool | isXSDLiteral () const |
bool | isSubjectBlank () const |
bool | isObjectBlank () const |
bool | isObjectIRI () const |
bool | isSubjectIRI () const |
auto | xsdType () const |
auto | xsdTypeIRI () const |
void | setXSDValue (std::string_view v, XSDType type) |
std::string | createStringValue () const |
virtual std::string_view | subject () const =0 |
virtual std::string_view | predicate () const =0 |
virtual std::string_view | valueAsString () const =0 |
virtual float | valueAsFloat () const =0 |
virtual double | valueAsDouble () const =0 |
virtual long | valueAsLong () const =0 |
virtual int | valueAsInt () const =0 |
virtual bool | valueAsBoolean () const =0 |
virtual short | valueAsShort () const =0 |
virtual unsigned long | valueAsUnsignedLong () const =0 |
virtual unsigned int | valueAsUnsignedInt () const =0 |
virtual unsigned short | valueAsUnsignedShort () const =0 |
virtual std::optional< std::string_view > | graph () const =0 |
virtual std::optional< std::string_view > | perspective () const =0 |
virtual void | setSubject (std::string_view subject)=0 |
virtual void | setPredicate (std::string_view predicate)=0 |
virtual void | setObjectIRI (std::string_view object)=0 |
virtual void | setSubjectBlank (std::string_view str)=0 |
virtual void | setObjectBlank (std::string_view str)=0 |
virtual void | setStringValue (std::string_view v)=0 |
virtual void | setDoubleValue (double v)=0 |
virtual void | setFloatValue (float v)=0 |
virtual void | setIntValue (int v)=0 |
virtual void | setBooleanValue (bool v)=0 |
virtual void | setLongValue (long v)=0 |
virtual void | setShortValue (short v)=0 |
virtual void | setUnsignedIntValue (unsigned int v)=0 |
virtual void | setUnsignedLongValue (unsigned long v)=0 |
virtual void | setUnsignedShortValue (unsigned short v)=0 |
virtual void | setGraph (std::string_view graph)=0 |
virtual void | setPerspective (std::string_view perspective)=0 |
bool | isOccasional () const |
bool | isUncertain () const |
auto | begin () const |
auto | end () const |
auto | confidence () const |
void | setIsOccasional (bool isOccasional) |
void | setIsUncertain (bool isUncertain) |
void | setBegin (double begin) |
void | setEnd (double end) |
void | setConfidence (double confidence) |
virtual void | reset ()=0 |
bool | operator== (const Triple &other) const |
bool | operator< (const Triple &other) const |
void | write (std::ostream &os) const override |
Triple () | |
Triple (XSDType xsdType) | |
virtual | ~Triple ()=default |
bool | mergeFrame (const Triple &other) |
bool | isXSDLiteral () const |
bool | isSubjectBlank () const |
bool | isObjectBlank () const |
bool | isObjectIRI () const |
bool | isSubjectIRI () const |
auto | xsdType () const |
auto | xsdTypeIRI () const |
void | setXSDValue (std::string_view v, XSDType type) |
std::string | createStringValue () const |
virtual std::string_view | subject () const =0 |
virtual std::string_view | predicate () const =0 |
virtual std::string_view | valueAsString () const =0 |
virtual float | valueAsFloat () const =0 |
virtual double | valueAsDouble () const =0 |
virtual long | valueAsLong () const =0 |
virtual int | valueAsInt () const =0 |
virtual bool | valueAsBoolean () const =0 |
virtual short | valueAsShort () const =0 |
virtual unsigned long | valueAsUnsignedLong () const =0 |
virtual unsigned int | valueAsUnsignedInt () const =0 |
virtual unsigned short | valueAsUnsignedShort () const =0 |
virtual std::optional< std::string_view > | graph () const =0 |
virtual std::optional< std::string_view > | perspective () const =0 |
virtual void | setSubject (std::string_view subject)=0 |
virtual void | setPredicate (std::string_view predicate)=0 |
virtual void | setObjectIRI (std::string_view object)=0 |
virtual void | setSubjectBlank (std::string_view str)=0 |
virtual void | setObjectBlank (std::string_view str)=0 |
virtual void | setStringValue (std::string_view v)=0 |
virtual void | setDoubleValue (double v)=0 |
virtual void | setFloatValue (float v)=0 |
virtual void | setIntValue (int v)=0 |
virtual void | setBooleanValue (bool v)=0 |
virtual void | setLongValue (long v)=0 |
virtual void | setShortValue (short v)=0 |
virtual void | setUnsignedIntValue (unsigned int v)=0 |
virtual void | setUnsignedLongValue (unsigned long v)=0 |
virtual void | setUnsignedShortValue (unsigned short v)=0 |
virtual void | setGraph (std::string_view graph)=0 |
virtual void | setPerspective (std::string_view perspective)=0 |
bool | isOccasional () const |
bool | isUncertain () const |
auto | begin () const |
auto | end () const |
auto | confidence () const |
void | setIsOccasional (bool isOccasional) |
void | setIsUncertain (bool isUncertain) |
void | setBegin (double begin) |
void | setEnd (double end) |
void | setConfidence (double confidence) |
virtual void | reset ()=0 |
bool | operator== (const Triple &other) const |
bool | operator< (const Triple &other) 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 |
Static Protected Member Functions | |
static bool | isBlank (std::string_view str) |
static bool | isBlank (std::string_view str) |
Protected Attributes | |
bool | isOccasional_ |
bool | isUncertain_ |
std::optional< double > | begin_ |
std::optional< double > | end_ |
std::optional< double > | confidence_ |
std::optional< XSDType > | xsdType_ |
A triple with additional information about its origin, epistemic and temporal context. This is an abstract class to support both std::string and std::string_view for triple data, however, at the cost of having some virtual methods.
|
virtualdefault |
|
virtualdefault |
|
inline |
|
inline |
|
inline |
|
inline |
std::string Triple::createStringValue | ( | ) | const |
Construct string form of the object of the triple.
Definition at line 71 of file Triple.cpp.
std::string knowrob::Triple::createStringValue | ( | ) | const |
Construct string form of the object of the triple.
|
inline |
|
inline |
|
pure virtual |
Implemented in knowrob::TripleTemplate< StringType >, and knowrob::TripleTemplate< StringType >.
|
pure virtual |
Implemented in knowrob::TripleTemplate< StringType >, and knowrob::TripleTemplate< StringType >.
|
inlinestaticprotected |
|
inlinestaticprotected |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
bool Triple::mergeFrame | ( | const Triple & | other | ) |
Merge the frame of the triple with another triple.
other | another triple. |
Definition at line 274 of file Triple.cpp.
bool knowrob::Triple::mergeFrame | ( | const Triple & | other | ) |
Merge the frame of the triple with another triple.
other | another triple. |
bool Triple::operator< | ( | const Triple & | other | ) | const |
other | another triple. |
Definition at line 116 of file Triple.cpp.
bool knowrob::Triple::operator< | ( | const Triple & | other | ) | const |
other | another triple. |
bool Triple::operator== | ( | const Triple & | other | ) | const |
other | another triple. |
Definition at line 220 of file Triple.cpp.
bool knowrob::Triple::operator== | ( | const Triple & | other | ) | const |
other | another triple. |
|
pure virtual |
Implemented in knowrob::TripleTemplate< StringType >, and knowrob::TripleTemplate< StringType >.
|
pure virtual |
Implemented in knowrob::TripleTemplate< StringType >, and knowrob::TripleTemplate< StringType >.
|
pure virtual |
Implemented in knowrob::TripleTemplate< StringType >, and knowrob::TripleTemplate< StringType >.
|
pure virtual |
Implemented in knowrob::TripleTemplate< StringType >, and knowrob::TripleTemplate< StringType >.
|
pure virtual |
Reset the triple to its initial state.
Implemented in knowrob::TripleTemplate< StringType >, and knowrob::TripleTemplate< StringType >.
|
pure virtual |
Reset the triple to its initial state.
Implemented in knowrob::TripleTemplate< StringType >, and knowrob::TripleTemplate< StringType >.
|
inline |
|
inline |
|
pure virtual |
Assign a boolean value to the object of the triple.
v | the boolean value to assign. |
Implemented in knowrob::TripleTemplate< StringType >, and knowrob::TripleTemplate< StringType >.
|
pure virtual |
Assign a boolean value to the object of the triple.
v | the boolean value to assign. |
Implemented in knowrob::TripleTemplate< StringType >, and knowrob::TripleTemplate< StringType >.
|
inline |
|
inline |
|
pure virtual |
Assign a double value to the object of the triple.
v | the double value to assign. |
Implemented in knowrob::TripleTemplate< StringType >, and knowrob::TripleTemplate< StringType >.
|
pure virtual |
Assign a double value to the object of the triple.
v | the double value to assign. |
Implemented in knowrob::TripleTemplate< StringType >, and knowrob::TripleTemplate< StringType >.
|
inline |
|
inline |
|
pure virtual |
Assign a float value to the object of the triple.
v | the float value to assign. |
Implemented in knowrob::TripleTemplate< StringType >, and knowrob::TripleTemplate< StringType >.
|
pure virtual |
Assign a float value to the object of the triple.
v | the float value to assign. |
Implemented in knowrob::TripleTemplate< StringType >, and knowrob::TripleTemplate< StringType >.
|
pure virtual |
graph | the graph of the triple. |
Implemented in knowrob::TripleTemplate< StringType >, and knowrob::TripleTemplate< StringType >.
|
pure virtual |
graph | the graph of the triple. |
Implemented in knowrob::TripleTemplate< StringType >, and knowrob::TripleTemplate< StringType >.
|
pure virtual |
Assign a int value to the object of the triple.
v | the int value to assign. |
Implemented in knowrob::TripleTemplate< StringType >, and knowrob::TripleTemplate< StringType >.
|
pure virtual |
Assign a int value to the object of the triple.
v | the int value to assign. |
Implemented in knowrob::TripleTemplate< StringType >, and knowrob::TripleTemplate< StringType >.
|
inline |
|
inline |
|
inline |
|
inline |
|
pure virtual |
Assign a long value to the object of the triple.
v | the long value to assign. |
Implemented in knowrob::TripleTemplate< StringType >, and knowrob::TripleTemplate< StringType >.
|
pure virtual |
Assign a long value to the object of the triple.
v | the long value to assign. |
Implemented in knowrob::TripleTemplate< StringType >, and knowrob::TripleTemplate< StringType >.
|
pure virtual |
str | a blank node identifier for the object of the triple. |
Implemented in knowrob::TripleTemplate< StringType >, and knowrob::TripleTemplate< StringType >.
|
pure virtual |
str | a blank node identifier for the object of the triple. |
Implemented in knowrob::TripleTemplate< StringType >, and knowrob::TripleTemplate< StringType >.
|
pure virtual |
object | the object of the triple. |
Implemented in knowrob::TripleTemplate< StringType >, and knowrob::TripleTemplate< StringType >.
|
pure virtual |
object | the object of the triple. |
Implemented in knowrob::TripleTemplate< StringType >, and knowrob::TripleTemplate< StringType >.
|
pure virtual |
perspective | the perspective of the triple. |
Implemented in knowrob::TripleTemplate< StringType >, and knowrob::TripleTemplate< StringType >.
|
pure virtual |
perspective | the perspective of the triple. |
Implemented in knowrob::TripleTemplate< StringType >, and knowrob::TripleTemplate< StringType >.
|
pure virtual |
predicate | the predicate of the triple. |
Implemented in knowrob::TripleTemplate< StringType >, and knowrob::TripleTemplate< StringType >.
|
pure virtual |
predicate | the predicate of the triple. |
Implemented in knowrob::TripleTemplate< StringType >, and knowrob::TripleTemplate< StringType >.
|
pure virtual |
Assign a short value to the object of the triple.
v | the short value to assign. |
Implemented in knowrob::TripleTemplate< StringType >, and knowrob::TripleTemplate< StringType >.
|
pure virtual |
Assign a short value to the object of the triple.
v | the short value to assign. |
Implemented in knowrob::TripleTemplate< StringType >, and knowrob::TripleTemplate< StringType >.
|
pure virtual |
Assign a string value to the object of the triple.
v | the string value to assign. |
Implemented in knowrob::TripleTemplate< StringType >, and knowrob::TripleTemplate< StringType >.
|
pure virtual |
Assign a string value to the object of the triple.
v | the string value to assign. |
Implemented in knowrob::TripleTemplate< StringType >, and knowrob::TripleTemplate< StringType >.
|
pure virtual |
subject | the subject of the triple. |
Implemented in knowrob::TripleTemplate< StringType >, and knowrob::TripleTemplate< StringType >.
|
pure virtual |
subject | the subject of the triple. |
Implemented in knowrob::TripleTemplate< StringType >, and knowrob::TripleTemplate< StringType >.
|
pure virtual |
str | a blank node identifier for the subject of the triple. |
Implemented in knowrob::TripleTemplate< StringType >, and knowrob::TripleTemplate< StringType >.
|
pure virtual |
str | a blank node identifier for the subject of the triple. |
Implemented in knowrob::TripleTemplate< StringType >, and knowrob::TripleTemplate< StringType >.
|
pure virtual |
Assign a unsigned int value to the object of the triple.
v | the unsigned int value to assign. |
Implemented in knowrob::TripleTemplate< StringType >, and knowrob::TripleTemplate< StringType >.
|
pure virtual |
Assign a unsigned int value to the object of the triple.
v | the unsigned int value to assign. |
Implemented in knowrob::TripleTemplate< StringType >, and knowrob::TripleTemplate< StringType >.
|
pure virtual |
Assign a unsigned long value to the object of the triple.
v | the unsigned long value to assign. |
Implemented in knowrob::TripleTemplate< StringType >, and knowrob::TripleTemplate< StringType >.
|
pure virtual |
Assign a unsigned long value to the object of the triple.
v | the unsigned long value to assign. |
Implemented in knowrob::TripleTemplate< StringType >, and knowrob::TripleTemplate< StringType >.
|
pure virtual |
Assign a unsigned short value to the object of the triple.
v | the unsigned short value to assign. |
Implemented in knowrob::TripleTemplate< StringType >, and knowrob::TripleTemplate< StringType >.
|
pure virtual |
Assign a unsigned short value to the object of the triple.
v | the unsigned short value to assign. |
Implemented in knowrob::TripleTemplate< StringType >, and knowrob::TripleTemplate< StringType >.
void Triple::setXSDValue | ( | std::string_view | v, |
XSDType | type | ||
) |
Assign a XSD value to the object of the triple.
v | the string form of a XSD value. |
type | the XSD type of the value. |
Definition at line 32 of file Triple.cpp.
void knowrob::Triple::setXSDValue | ( | std::string_view | v, |
XSDType | type | ||
) |
Assign a XSD value to the object of the triple.
v | the string form of a XSD value. |
type | the XSD type of the value. |
|
pure virtual |
Implemented in knowrob::TripleTemplate< StringType >, and knowrob::TripleTemplate< StringType >.
|
pure virtual |
Implemented in knowrob::TripleTemplate< StringType >, and knowrob::TripleTemplate< StringType >.
|
pure virtual |
Read the object part of the triple as a boolean.
Implemented in knowrob::TripleTemplate< StringType >, and knowrob::TripleTemplate< StringType >.
|
pure virtual |
Read the object part of the triple as a boolean.
Implemented in knowrob::TripleTemplate< StringType >, and knowrob::TripleTemplate< StringType >.
|
pure virtual |
Read the object part of the triple as a double.
Implemented in knowrob::TripleTemplate< StringType >, and knowrob::TripleTemplate< StringType >.
|
pure virtual |
Read the object part of the triple as a double.
Implemented in knowrob::TripleTemplate< StringType >, and knowrob::TripleTemplate< StringType >.
|
pure virtual |
Read the object part of the triple as a float.
Implemented in knowrob::TripleTemplate< StringType >, and knowrob::TripleTemplate< StringType >.
|
pure virtual |
Read the object part of the triple as a float.
Implemented in knowrob::TripleTemplate< StringType >, and knowrob::TripleTemplate< StringType >.
|
pure virtual |
Read the object part of the triple as a int.
Implemented in knowrob::TripleTemplate< StringType >, and knowrob::TripleTemplate< StringType >.
|
pure virtual |
Read the object part of the triple as a int.
Implemented in knowrob::TripleTemplate< StringType >, and knowrob::TripleTemplate< StringType >.
|
pure virtual |
Read the object part of the triple as a long.
Implemented in knowrob::TripleTemplate< StringType >, and knowrob::TripleTemplate< StringType >.
|
pure virtual |
Read the object part of the triple as a long.
Implemented in knowrob::TripleTemplate< StringType >, and knowrob::TripleTemplate< StringType >.
|
pure virtual |
Read the object part of the triple as a short.
Implemented in knowrob::TripleTemplate< StringType >, and knowrob::TripleTemplate< StringType >.
|
pure virtual |
Read the object part of the triple as a short.
Implemented in knowrob::TripleTemplate< StringType >, and knowrob::TripleTemplate< StringType >.
|
pure virtual |
Read the object part of the triple as a string.
Implemented in knowrob::TripleTemplate< StringType >, and knowrob::TripleTemplate< StringType >.
|
pure virtual |
Read the object part of the triple as a string.
Implemented in knowrob::TripleTemplate< StringType >, and knowrob::TripleTemplate< StringType >.
|
pure virtual |
Read the object part of the triple as a unsigned int.
Implemented in knowrob::TripleTemplate< StringType >, and knowrob::TripleTemplate< StringType >.
|
pure virtual |
Read the object part of the triple as a unsigned int.
Implemented in knowrob::TripleTemplate< StringType >, and knowrob::TripleTemplate< StringType >.
|
pure virtual |
Read the object part of the triple as a unsigned long.
Implemented in knowrob::TripleTemplate< StringType >, and knowrob::TripleTemplate< StringType >.
|
pure virtual |
Read the object part of the triple as a unsigned long.
Implemented in knowrob::TripleTemplate< StringType >, and knowrob::TripleTemplate< StringType >.
|
pure virtual |
Read the object part of the triple as a unsigned short.
Implemented in knowrob::TripleTemplate< StringType >, and knowrob::TripleTemplate< StringType >.
|
pure virtual |
Read the object part of the triple as a unsigned short.
Implemented in knowrob::TripleTemplate< StringType >, and knowrob::TripleTemplate< StringType >.
|
overridevirtual |
Print this object to a stream.
os | the stream to print to. |
Implements knowrob::Printable.
Definition at line 325 of file Triple.cpp.
|
overridevirtual |
|
inline |
|
inline |
|
inline |
|
inline |
|
protected |
|
protected |