-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathTopo.h
More file actions
27 lines (26 loc) · 820 Bytes
/
Topo.h
File metadata and controls
27 lines (26 loc) · 820 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
#ifndef TOPO_H_INCLUDED
#define TOPO_H_INCLUDED
#include"Table.h"
#include"RouterTable.h"
#include"Line.h"
#include"Router.h"
#include<iostream>
#include<fstream>
using namespace std;
class Topo
{
public:
Table*head;
Topo();
void routerFile(string filename);//从文件读取路由器信息进行初始化
void networkFile(string filename);//从文件读取边信息
bool Insert(int *R1,int *R2,int weight,bool Double = true); //插入
bool DeleteRouter(int *R); //删除路由器
bool DeleteLine(int *R1,int *R2); //删除路径
bool NewRouter(int *IP);
bool PrintRouter(int *Ip);
bool Rip(); //构建路由表
void deleteRTable(); //删除路由表
void reRTable(); //初始化路由表
};
#endif // TOPO_H