6 #ifndef MAP_NODE_IRI_HPP_
7 #define MAP_NODE_IRI_HPP_
10 #include "boost/assert.hpp"
11 #include "boost/foreach.hpp"
12 #include "boost/unordered_map.hpp"
13 #include "boost/concept_check.hpp"
17 #include "owlcpp/rdf/detail/map_id_object.hpp"
19 #include "owlcpp/detail/iterator_member_pair.hpp"
20 #include "owlcpp/terms/detail/max_standard_id.hpp"
34 typedef detail::Map_id_object<node_type, id_type> map_t;
37 typedef Iterator_member_pair<map_t::const_iterator, Node_id const, 2> iterator;
38 typedef iterator const_iterator;
46 std::size_t size()
const {
return map_.size(); }
47 const_iterator begin()
const {
return map_.begin();}
48 const_iterator end()
const {
return map_.end();}
49 bool empty()
const {
return map_.empty();}
51 Node_iri
const& operator[](
const Node_id
id)
const {
return map_[id];}
52 Node_iri
const& at(
const Node_id
id)
const {
return map_.at(
id);}
53 Node_iri
const* find(
const Node_id
id)
const {
return map_.find(
id);}
54 Node_id
const* find(Node_iri
const& node)
const {
return map_.find(node);}
56 Node_id
const* find_iri(
const Ns_id ns, std::string
const& val)
const {
57 return map_.find(Node_iri(ns,val));
60 Node_id insert_iri(
const Ns_id ns, std::string
const& val) {
61 return map_.insert(Node_iri(ns, val));
64 Node_id insert(Node_iri
const& node) {
return map_.insert(node);}
65 void remove(
const Node_id id) {map_.remove(
id);}
66 void clear() {map_.clear();}