📄 linkproperty.h
字号:
#ifndef _LinkProperty_h
#define _LinkProperty_h
#define INV_LIN -1 /* invalid link */
#define STU_STU 0 /* stub-stub link */
#define STU_TRA 1 /* stub-transit or transit-stub link */
#define TRA_TRA_INTRA 2 /*intra transit-transit link */
#define TRA_TRA_INTER 3 /* inter transit-transit link */
#define VIR_LIN 4 /* virtual link */
#include "Common.h"
class LinkProperty;
ostream &operator<<(ostream &os, const LinkProperty &property);
class LinkProperty
{
private:
int mType; /* s-s link or s-t link or t-t link */
bool mDirection; /* directional link or not */
unsigned long mDistance;
unsigned long mDelay;
unsigned long mBandwidth;
unsigned long mCost;
string mLable;
public:
friend ostream &operator<<(ostream &os, const LinkProperty &property);
LinkProperty();
LinkProperty(unsigned long distance, unsigned long delay, unsigned long bandwidth, unsigned long cost);
void setType(int type);
int getType() const;
void setDirection(bool direction);
bool getDirection() const;
void setDistance(unsigned long distance);
unsigned long getDistance() const;
void setDelay(unsigned long delay);
unsigned long getDelay() const;
void setBandwidth(unsigned long bandwidth);
unsigned long getBandwidth() const;
void setCost(unsigned long cost);
unsigned long getCost() const;
void setLable(string lable);
string getLable() const;
};
#endif
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -