owlcpp
v0.3.3~
C++ library for working with OWL ontologies
|
#include <map_triple_crtpb.hpp>
Classes | |
struct | result |
struct | result_b |
Public Member Functions | |
template<class Subj , class Pred , class Obj , class Doc > | |
result< Subj, Pred, Obj, Doc > ::type | find_triple (const Subj subj, const Pred pred, const Obj obj, const Doc doc) const |
Search triples by subject, predicate, object, or document IDs. | |
void | insert_triple (const Node_id subj, const Node_id pred, const Node_id obj, const Doc_id doc) |
Insert a new triple. |
Enable operations on RDF triples. Base for CRTP (Curiously Recurring Template Pattern).
|
inline |
Search triples by subject, predicate, object, or document IDs.
Polymorphically search stored triples to find ones that match specified node IDs for subject, predicate, or object nodes or document ID. An instance of any matches all values for the corresponding triple element. If none of the nodes are specified, i.e., find(any(), any(), any(), any())
, the search returns a range of all stored triples, [begin(), end()).
subj | predicate for first element of triple (subject node), e.g., Node_id, any |
pred | predicate for second element of triple (predicate node), e.g., Node_id, any |
obj | predicate for third element of triple (object node), e.g., Node_id, any |
doc | predicate for fourth element of triple (document ID), e.g., Doc_id, any |
The type of the range can be obtained from
or from
For example,