owlcpp  v0.3.3~
C++ library for working with OWL ontologies
 All Classes Namespaces Files Functions Macros Pages
node.hpp
Go to the documentation of this file.
1 
6 #ifndef RDF_NODE_HPP_
7 #define RDF_NODE_HPP_
8 #include "owlcpp/ns_id.hpp"
9 
10 namespace owlcpp{
11 class Visitor_node;
12 
15 class Node {
16  friend inline std::size_t hash_value(Node const& node)
17  {return node.hash_impl();}
18 
19 public:
20  Ns_id ns_id() const {return ns_id_impl();}
21  bool operator== (const Node& n) const {return equal_impl(n);}
22  bool operator!= (const Node& n) const {return ! equal_impl(n);}
23  void accept(Visitor_node& visitor) const {accept_impl(visitor);}
24  Node* clone() const {return clone_impl();}
25  virtual ~Node() {}
26 
27 private:
28  virtual Ns_id ns_id_impl() const =0;
29  virtual std::size_t hash_impl() const =0;
30  virtual bool equal_impl(const Node& n) const =0;
31  virtual void accept_impl(Visitor_node&) const =0;
32  virtual Node* clone_impl() const =0;
33 };
34 
35 }//namespace owlcpp
36 #endif /* RDF_NODE_HPP_ */