owlcpp  v0.3.3~
C++ library for working with OWL ontologies
 All Classes Namespaces Files Functions Macros Pages
Classes | Public Member Functions | List of all members
owlcpp::Map_triple_crtpb< Super > Class Template Reference

#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.

Detailed Description

template<class Super>
class owlcpp::Map_triple_crtpb< Super >

Enable operations on RDF triples. Base for CRTP (Curiously Recurring Template Pattern).

Member Function Documentation

template<class Super>
template<class Subj , class Pred , class Obj , class Doc >
result<Subj,Pred,Obj,Doc>::type owlcpp::Map_triple_crtpb< Super >::find_triple ( const Subj  subj,
const Pred  pred,
const Obj  obj,
const Doc  doc 
) const
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()).

Parameters
subjpredicate for first element of triple (subject node), e.g., Node_id, any
predpredicate for second element of triple (predicate node), e.g., Node_id, any
objpredicate for third element of triple (object node), e.g., Node_id, any
docpredicate for fourth element of triple (document ID), e.g., Doc_id, any
Returns
iterator range of triples matching the query.

The type of the range can be obtained from

template<class Subj, class Pred, class Obj, class Doc> class result;

or from

template<bool Subj, bool Pred, bool Obj, bool Doc> class result_b;

For example,

Triple_map<>::result_b<1,0,0,1>::type range =
triple_map.find(subj, any(), any(), doc);

The documentation for this class was generated from the following file: