📄 socklist.cpp
字号:
// socklist.cpp: implementation of the Csocklist class.
//
//////////////////////////////////////////////////////////////////////
#include "stdafx.h"
#include "s.h"
#include "socklist.h"
#include "sockpoint.h"
#include "sock.h"
#ifdef _DEBUG
#undef THIS_FILE
static char THIS_FILE[]=__FILE__;
#define new DEBUG_NEW
#endif
//////////////////////////////////////////////////////////////////////
// Construction/Destruction
//////////////////////////////////////////////////////////////////////
Csocklist::Csocklist(CSDlg *pd)
{
hand=new Csockpoint(pd);
now=hand;
end=hand;
}
Csocklist::~Csocklist()
{
while(hand!=NULL)
{
now=hand->next;
delete hand;
hand=now;
}
}
Csockpoint * Csocklist::addnew(CSDlg *pd)
{
now=hand;
while(1)
{
if(now->next==NULL)
{
now->next=new Csockpoint(pd);
now=now->next;
return now;
}
now=now->next;
}
/*
end->next=new Csockpoint(pd);
end=end->next;
return end;
*/
}
Csocklist::delone(Csock *ps)
{
now=hand;
while(now->next!=NULL)
{
if (now->next->psock==ps)
{
Csockpoint *temp;
temp=now->next;
now->next=now->next->next;
temp->psock->Close();
delete temp;
temp=NULL;
break ;
}
now=now->next;
}
}
Csocklist::showall()
{
now=hand->next;
while(now!=NULL)
{
now->showall();
now=now->next;
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -