?? connection.cpp
字號:
// Connection.cpp: implementation of the CConnection class.
//
//////////////////////////////////////////////////////////////////////
#include "stdafx.h"
#include "VCOPCClient.h"
#include "Connection.h"
#ifdef _DEBUG
#undef THIS_FILE
static char THIS_FILE[]=__FILE__;
#define new DEBUG_NEW
#endif
//////////////////////////////////////////////////////////////////////
// Construction/Destruction
//////////////////////////////////////////////////////////////////////
CConnection::CConnection() : m_hServer(INVALID_HANDLE_VALUE)
{
}
CConnection::~CConnection()
{
//刪除已經創建的組
for( vector<CGroup*>::iterator iter = m_Groups.begin();
iter != m_Groups.end();
++iter)
{
RemoveGroup(m_hServer, (*iter)->m_Handle);
delete *iter;
}
m_Groups.clear();
}
CGroup* CConnection::GetGroup(CString& strGroup)
{
for( vector<CGroup*>::iterator iter = m_Groups.begin();
iter != m_Groups.end();
++iter)
{
if ( strcmp(strGroup, (*iter)->m_Name) == 0 )
{
return *iter;
}
}
return NULL;
}
void CConnection::EraseGroup(CString& strGroup)
{
for( vector<CGroup*>::iterator iter = m_Groups.begin();
iter != m_Groups.end();
++iter)
{
if ( strcmp(strGroup, (*iter)->m_Name) == 0 )
{
m_Groups.erase(iter);
return;
}
}
}
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -