Main Page | Namespace List | Class Hierarchy | Class List | File List | Namespace Members | Class Members | File Members

node.h

Go to the documentation of this file.
00001 /*************************************************************************** 00002 node.h - description 00003 ------------------- 00004 begin : Mon May 17 2004 00005 copyright : (C) 2004 by Ramakrishna Shenai 00006 email : shenai1@cs.umbc.edu 00007 ***************************************************************************/ 00008 00009 /*************************************************************************** 00010 * * 00011 * This program is free software; you can redistribute it and/or modify * 00012 * it under the terms of the GNU General Public License as published by * 00013 * the Free Software Foundation; either version 2 of the License, or * 00014 * (at your option) any later version. * 00015 * * 00016 ***************************************************************************/ 00017 00018 #ifndef _node_h 00019 #define _node_h 00020 00021 #include <cstdlib> 00022 #include <iostream> 00023 #include <map> 00024 #include <sstream> 00025 #include <string> 00026 00027 #include "link.h" 00028 #include "trx.h" 00029 00030 using namespace std; 00031 using namespace common; 00032 00033 typedef map<int, Link*> LinkMap; 00034 00035 namespace common { 00046 class Node { 00047 public: 00054 Node( u_int nodeId ); 00055 00059 virtual ~Node(); 00060 00061 // Accessor and mutator methods 00066 const int getNodeId() { return _nodeId; } 00067 00072 void setNodeId( u_int nodeId ) { _nodeId = nodeId; } 00073 00081 bool addLink( u_int dest, u_int chCount ); 00082 00093 int scheduleLightpath( long lightpath, u_int dest ); 00094 00106 int scheduleLightpath( long lightpath, u_int dest, int wavelength ); 00107 00115 int removeLightpath( long lightpath ); 00116 00117 00124 bool isLinkPresent( u_int dest ); 00125 00131 virtual std::string &toString(); 00132 00133 protected: 00138 LinkMap _lm; 00139 00143 u_int _nodeId; 00144 00148 std::string _descStr; 00149 }; 00150 } 00151 00152 #endif

Generated on Fri May 21 15:23:21 2004 for Optical Network Simulation (Build) by doxygen 1.3.7