00001
00002
00003
00004
00005
00006 #ifndef __NIXNODE_H__
00007 #define __NIXNODE_H__
00008
00009 #include "routealgo/rnode.h"
00010 #include "object.h"
00011 #include <map>
00012
00013
00014 class Edge {
00015 public :
00016 Edge( nodeid_t n) : m_n(n) { };
00017 public :
00018 nodeid_t m_n;
00019 };
00020
00021 typedef vector<Edge*> EdgeVec_t;
00022 typedef EdgeVec_t::iterator EdgeVec_it;
00023
00024 typedef vector<NsObject*> ObjVec_t;
00025 typedef ObjVec_t::iterator ObjVec_it;
00026
00027
00028 typedef map<nodeid_t, NixVec*, less<nodeid_t> > NVMap_t;
00029 typedef NVMap_t::iterator NVMap_it;
00030 typedef NVMap_t::value_type NVPair_t;
00031
00032 class NixNode : public RNode {
00033 public :
00034 NixNode();
00035 void Id(nodeid_t id) { m_id = id;}
00036 nodeid_t Id() const { return m_id;}
00037 int Map() const { return m_Map;}
00038 void AddAdj(nodeid_t);
00039 int IsNeighbor(nodeid_t);
00040 virtual const NodeWeight_t NextAdj( const NodeWeight_t&);
00041 NixVec* ComputeNixVector(nodeid_t);
00042 virtual NixPair_t GetNix(nodeid_t);
00043 virtual Nixl_t GetNixl();
00044 virtual nodeid_t GetNeighbor(Nix_t, NixVec*);
00045 NixVec* GetNixVector(nodeid_t);
00046 NsObject* GetNsNeighbor(Nix_t);
00047 void PopulateObjects(void);
00048 static NixNode* GetNodeObject(nodeid_t);
00049 static void PopulateAllObjects(void);
00050 private :
00051 EdgeVec_t m_Adj;
00052 ObjVec_t m_AdjObj;
00053 int m_Map;
00054 NVMap_t* m_pNixVecs;
00055 };
00056 #endif
00057
00058