owlcpp  v0.3.3~
C++ library for working with OWL ontologies
 All Classes Namespaces Files Functions Macros Pages
map_node_blank_crtpb.hpp
Go to the documentation of this file.
1 
6 #ifndef MAP_NODE_BLANK_CRTPB_HPP_
7 #define MAP_NODE_BLANK_CRTPB_HPP_
8 #include "boost/assert.hpp"
9 #include "boost/foreach.hpp"
10 
11 #include "owlcpp/detail/map_traits.hpp"
13 
14 namespace owlcpp{
15 
19 template<class Super> class Map_node_blank_crtpb {
20  typedef detail::Map_traits<Super> traits;
21  typedef typename traits::map_node_type map_node_type;
22 
23  map_node_type const& _map_node() const {
24  return static_cast<Super const&>(*this).map_node_;
25  }
26 
27  map_node_type& _map_node() {
28  return static_cast<Super&>(*this).map_node_;
29  }
30 
31 public:
37  Node_id insert_blank(const unsigned n, const Doc_id did) {
38  BOOST_CONCEPT_ASSERT((Doc_store<Super>));
39  BOOST_ASSERT(static_cast<Super const&>(*this).find(did));
40  return _map_node().insert_blank(n, did);
41  }
42 
43  Node_id const* find_blank(const unsigned n, const Doc_id did) const {
44  BOOST_CONCEPT_ASSERT((Doc_store<Super>));
45  BOOST_ASSERT(static_cast<Super const&>(*this).find(did));
46  return _map_node().find_blank(n, did);
47  }
48 
49 };
50 
51 }//namespace owlcpp
52 #endif /* MAP_NODE_BLANK_CRTPB_HPP_ */