Guest User

Edge.h

a guest
May 16th, 2013
104
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.44 KB | None | 0 0
  1. #ifndef EDGE_H
  2. #define EDGE_H
  3.  
  4. #include <iostream>
  5. #include "Node.h"
  6. #include"Exceptions.h"
  7.  
  8. using namespace std;
  9.  
  10. class Node;
  11.  
  12. class Edge
  13. {
  14.     public:
  15.         Edge(Node * adjacent,int weight);
  16.         ~Edge();
  17.  
  18.         int getWeight();
  19.         Node * getAdjacent();
  20.  
  21.         friend bool operator== (Edge& l,Edge& r);
  22.                 friend ostream& operator<< (ostream& stream, const Edge& edge);
  23.     private:
  24.         int weight;
  25.         Node * adjacent;
  26. };
  27.  
  28. #endif
Advertisement
Add Comment
Please, Sign In to add comment