📄 linkproperty.cpp
字号:
#include "LinkProperty.h"
ostream &operator<<(ostream &os, const LinkProperty &property)
{
os << property.mType << ' ' << property.mDirection << ' ' << property.mDistance << ' ' << property.mDelay << ' ' << property.mBandwidth << ' ' << property.mCost << ' ' << property.mLable;
return os;
}
LinkProperty::LinkProperty(): mType(INV_LIN), mDirection(false), mDistance(0), mDelay(0), mBandwidth(0), mCost(0)
{ }
LinkProperty::LinkProperty(unsigned long distance, unsigned long delay, unsigned long bandwidth, unsigned long cost): mType(INV_LIN), mDirection(false)
{
mDistance = distance;
mDelay = delay;
mBandwidth = bandwidth;
mCost = cost;
}
void LinkProperty::setType(int type)
{ mType = type; }
int LinkProperty::getType() const
{ return mType; }
void LinkProperty::setDirection(bool direction)
{ mDirection = direction; }
bool LinkProperty::getDirection() const
{ return mDirection; }
void LinkProperty::setDistance(unsigned long distance)
{ mDistance = distance; }
unsigned long LinkProperty::getDistance() const
{ return mDistance; }
void LinkProperty::setDelay(unsigned long delay)
{ mDelay = delay; }
unsigned long LinkProperty::getDelay() const
{ return mDelay; }
void LinkProperty::setBandwidth(unsigned long bandwidth)
{ mBandwidth = bandwidth; }
unsigned long LinkProperty::getBandwidth() const
{ return mBandwidth; }
void LinkProperty::setCost(unsigned long cost)
{ mCost = cost; }
unsigned long LinkProperty::getCost() const
{ return mCost; }
void LinkProperty::setLable(string lable)
{ mLable = lable; }
string LinkProperty::getLable() const
{ return mLable; }
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -