6 #ifndef MAP_NODE_CRTPB_HPP_
7 #define MAP_NODE_CRTPB_HPP_
9 #include "owlcpp/detail/map_traits.hpp"
17 typedef detail::Map_traits<Super> traits;
18 typedef typename traits::map_node_type map_node_type;
19 typedef typename traits::node_type node_type;
21 map_node_type
const& _map_node()
const {
22 return static_cast<Super const&
>(*this).map_node_;
25 map_node_type& _map_node() {
26 return static_cast<Super&
>(*this).map_node_;
31 node_type
const& operator[](
const Node_id id)
const {
32 return _map_node()[id];
41 return _map_node().at(
id);
51 static_cast<Super const&>(*this).find(nsid) &&
52 "invalid namespace ID"
54 typedef typename Super::Err Err;
55 if( is_blank(nsid) ) {
56 BOOST_THROW_EXCEPTION(
58 <<
typename Err::msg_t(
"blank namespace for IRI node")
59 <<
typename Err::str1_t(name)
62 return _map_node().insert_iri(nsid, name);
65 Node_id const* find_node_iri(
const Ns_id nsid, std::string
const& name)
const {
67 static_cast<Super const&>(*this).find(nsid) &&
68 "invalid namespace ID"
70 return _map_node().find_iri(nsid, name);