Guest User

Node.h

a guest
May 16th, 2013
110
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.59 KB | None | 0 0
  1. #ifndef NODE_H
  2. #define NODE_H
  3.  
  4. #include <iostream>
  5. #include <string>
  6. #include <vector>
  7. #include "Edge.h"
  8. #include "Exceptions.h"
  9.  
  10. using namespace std;
  11.  
  12. class Edge;
  13.  
  14. class Node{
  15.     public:
  16.         Node(string label);
  17.         ~Node();
  18.         string getLabel();
  19.         void setLabel(string label);
  20.        
  21.         void addEdge(Edge * edge);
  22.         void removeEdge(string destination);
  23.    
  24.         friend Node& operator+(Node& l,Node& r);
  25.         friend bool operator== (Node& l,Node& r);  
  26.             friend ostream& operator<< (ostream& stream, const Node& node);
  27.     private:
  28.         string label;
  29.         vector<Edge *> adjacencyList;
  30. };
  31.  
  32. #endif
Advertisement
Add Comment
Please, Sign In to add comment