6 #ifndef STORE_CONCEPTS_HPP_
7 #define STORE_CONCEPTS_HPP_
9 #include "boost/concept/assert.hpp"
10 #include "owlcpp/rdf/detail/map_traits.hpp"
11 #include "boost/concept/detail/concept_def.hpp"
21 typedef detail::Map_traits<T> traits;
22 typedef typename traits::map_ns_type map_ns_type;
23 typedef typename traits::ns_id_type ns_id_type;
25 BOOST_CONCEPT_USAGE(Ns_store) {
27 ns_iri_ = t_.at(nsid_);
28 ns_iri_ = *t_.find(nsid_);
29 pref_ = t_.prefix(nsid_);
31 map_ns_type
const& map_ns = t_.map_ns();
32 boost::ignore_unused_variable_warning(map_ns);
34 nsid_ = t_.insert(ns_iri_);
36 ns_id_type
const* nsid = t_.find(ns_iri_);
37 nsid = t_.find_prefix(pref_);
38 boost::ignore_unused_variable_warning(nsid);
53 typedef detail::Map_traits<T> traits;
54 typedef typename traits::map_node_type map_node_type;
55 typedef typename traits::node_id_type node_id_type;
56 typedef typename traits::ns_id_type ns_id_type;
57 typedef typename traits::node_type node_type;
59 BOOST_CONCEPT_USAGE(Iri_node_store) {
60 node_type
const* node = t_.find(nid_);
61 boost::ignore_unused_variable_warning(node);
63 map_node_type
const& map_node = t_.map_node();
64 boost::ignore_unused_variable_warning(map_node);
66 nid_ = t_.insert_node_iri(nsid_, str_);
68 node_id_type
const* nid = t_.find_node_iri(nsid_, str_);
69 boost::ignore_unused_variable_warning(nid);
84 typedef detail::Map_traits<T> traits;
85 typedef typename traits::map_doc_type map_doc_type;
86 typedef typename traits::doc_id_type doc_id_type;
87 typedef typename traits::node_id_type node_id_type;
88 typedef typename traits::doc_type doc_type;
90 BOOST_CONCEPT_USAGE(Doc_store) {
91 doc_type
const* doc = t_.find(did_);
92 boost::ignore_unused_variable_warning(doc);
94 map_doc_type
const& map_doc = t_.map_doc();
95 boost::ignore_unused_variable_warning(map_doc);
97 std::pair<doc_id_type,bool> p = t_.insert_doc(nid_, str_, nid_);
98 p = t_.insert_doc(nid_, str_);
99 p = t_.insert_doc(nid_);
100 p = t_.insert_doc(str_, str_, str_);
101 p = t_.insert_doc(str_, str_);
102 p = t_.insert_doc(str_);
117 typedef detail::Map_traits<T> traits;
118 typedef typename traits::map_node_type map_node_type;
119 typedef typename traits::node_id_type node_id_type;
120 typedef typename traits::ns_id_type ns_id_type;
121 typedef typename traits::doc_id_type doc_id_type;
123 BOOST_CONCEPT_USAGE(Node_store) {
124 const std::string str;
125 node_id_type nid = t_.insert_literal(str, str, str);
126 nid = t_.insert_literal(str, str);
129 nid = t_.insert_literal(str, nid_dt, str);
130 nid = t_.insert_literal(str, nid_dt);
132 node_id_type
const* nidp = t_.find_literal(str, str, str);
133 nidp = t_.find_literal(str, str);
134 boost::ignore_unused_variable_warning(nidp);
136 const unsigned n = 0;
138 nid = t_.insert_blank(n, did);
139 nidp = t_.find_blank(n, did);
151 typedef detail::Map_traits<T> traits;
152 typedef typename traits::map_node_type map_node_type;
153 typedef typename traits::node_id_type node_id_type;
155 BOOST_CONCEPT_USAGE(Ns_iri_node_store) {
157 nid_ = t_.insert_node_iri(str_);
159 node_id_type
const* nid = t_.find_node_iri(str_);
160 boost::ignore_unused_variable_warning(nid);