📄 vconnection.h
字号:
#ifndef _VConnection_h
#define _VConnection_h
#define protect protected
#include "Common.h"
#include "VLink.h"
class Agent;
class Topology;
class VConnection;
ostream &operator<<(ostream &os, const VConnection &connection);
class VConnection
{
protect:
bool mActive;
Agent *mSource;
Agent *mDestination;
unsigned long mBandwidth;
vector<VLink *> mLink;
static Topology *mTopology;
static set<VConnection *> mConnection;
static set<VLink *> mLinkAdjust;
unsigned long minAverageBandwidth();
unsigned long minAverageBandwidthA();
unsigned long minAvailableBandwidth();
public:
friend ostream &operator<<(ostream &os, const VConnection &connection);
VConnection(Agent *agent1, Agent *agent2);
virtual ~VConnection();
void addConnection();
void removeConnection();
void activate();
void inactivate();
virtual long long adjustBandwidth(long long value);
void reallocate();
bool isActive()
{ return mActive; }
unsigned long getBandwidth()
{ return mBandwidth; }
};
#endif
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -