34#ifndef DATAQUAY_TRIPLE_H
35#define DATAQUAY_TRIPLE_H
67 a(_a),
b(_b),
c(_c) { }
90 if (
a != t.
a)
return a < t.
a;
91 if (
b != t.
b)
return b < t.
b;
92 if (
c != t.
c)
return c < t.
c;
122 if (
this == &other)
return true;
123 if (size() != other.size())
return false;
124 if (size() < 2)
return QList<Triple>::operator==(other);
126 QMap<Triple, int> a, b;
127 foreach (
Triple t, *
this) ++a[t];
128 foreach (
Triple t, other) ++b[t];
134 foreach (
Triple t, *
this) result.push_back(t.
a);
139 foreach (
Triple t, *
this) result.push_back(t.
b);
144 foreach (
Triple t, *
this) result.push_back(t.
c);
Node represents a single RDF node, with conversions to and from variant types.
Triple represents an RDF statement made up of three Node objects.
Triple()
Construct a triple of three Nothing nodes.
Node predicate()
Return the predicate node.
Node subject()
Return the subject node.
bool operator<(const Triple &t) const
Node object()
Return the object node.
Triple(Node _a, Node _b, Node _c)
Construct a triple of the three given nodes.
bool matches(const Triples &other) const
Return true if the two Triples lists contain the same elements.
bool operator!=(const Node &a, const Node &b)
QList< Node > Nodes
A list of node types.
QDataStream & operator<<(QDataStream &out, const Node &)
bool operator==(const Node &a, const Node &b)
QDataStream & operator>>(QDataStream &in, Node &)