6 #ifndef MAP_TRIPLE_CRTPB_HPP_
7 #define MAP_TRIPLE_CRTPB_HPP_
8 #include "boost/assert.hpp"
9 #include "boost/concept/assert.hpp"
11 #include "owlcpp/detail/map_traits.hpp"
19 typedef detail::Map_traits<Super> traits;
20 typedef typename traits::map_triple_type map_triple_type;
22 map_triple_type
const& _map_triple()
const {
23 return static_cast<Super const&
>(*this).map_triple_;
26 map_triple_type& _map_triple() {
27 return static_cast<Super&
>(*this).map_triple_;
32 template<
class Subj,
class Pred,
class Obj,
class Doc>
struct result
33 :
public map_triple_type::template
result<Subj,Pred,Obj,Doc>{};
35 template<
bool Subj,
bool Pred,
bool Obj,
bool Doc>
struct result_b
36 :
public map_triple_type::template
result_b<Subj,Pred,Obj,Doc>{};
66 template<
class Subj,
class Pred,
class Obj,
class Doc>
68 find_triple(
const Subj subj,
const Pred pred,
const Obj obj,
const Doc doc)
const {
69 return _map_triple().find(subj, pred, obj, doc);
80 BOOST_CONCEPT_ASSERT((Node_store<Super>));
82 static_cast<Super const&>(*this).find(subj) &&
86 static_cast<Super const&>(*this).find(pred) &&
87 "invalid predicate ID"
90 static_cast<Super const&>(*this).find(obj) &&
93 BOOST_ASSERT( static_cast<Super const&>(*this).find(doc) &&
96 _map_triple().insert(subj, pred, obj, doc);