您当前的位置:首页 > IT编程 > C++
| C语言 | Java | VB | VC | python | Android | TensorFlow | C++ | oracle | 学术与代码 | cnn卷积神经网络 | gnn | 图像修复 | Keras | 数据集 | Neo4j | 自然语言处理 | 深度学习 | 医学CAD | 医学影像 | 超参数 | pointnet | pytorch | 异常检测 | Transformers | 情感分类 | 知识图谱 |

自学教程:C++ GetConnection函数代码示例

51自学网 2021-06-01 21:05:30
  C++
这篇教程C++ GetConnection函数代码示例写得很实用,希望能帮到您。

本文整理汇总了C++中GetConnection函数的典型用法代码示例。如果您正苦于以下问题:C++ GetConnection函数的具体用法?C++ GetConnection怎么用?C++ GetConnection使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。

在下文中一共展示了GetConnection函数的25个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C++代码示例。

示例1: CHECK_DRIVER_ERROR

size_t CDBL_SendDataCmd::SendChunk(const void* pChunk, size_t nof_bytes){    CHECK_DRIVER_ERROR(        !pChunk  ||  !nof_bytes,        "Wrong (zero) arguments." + GetDbgInfo(),        290000 );    if (!GetBytes2Go())        return 0;    if (nof_bytes > GetBytes2Go())        nof_bytes = GetBytes2Go();    if (Check(dbmoretext(GetCmd(), (DBINT) nof_bytes, (BYTE*) pChunk)) != SUCCEED) {        Check(dbcancel(GetCmd()));        DATABASE_DRIVER_ERROR( "dbmoretext failed." + GetDbgInfo(), 290001 );    }    SetBytes2Go(GetBytes2Go() - nof_bytes);    if (GetBytes2Go() <= 0) {        //        if (dbsqlok(m_Cmd) != SUCCEED || dbresults(m_Cmd) == FAIL) {        if (Check(dbsqlok(GetCmd())) != SUCCEED || GetConnection().x_Results(GetCmd()) == FAIL) {            DATABASE_DRIVER_ERROR( "dbsqlok/results failed." + GetDbgInfo(), 290002 );        }    }    return nof_bytes;}
开发者ID:svn2github,项目名称:ncbi_tk,代码行数:29,


示例2: va_start

bool PostgreDatabase::WaitExecute(const char* QueryString, ...){    if(QueryString == NULL) return false;    va_list vlist;    va_start(vlist, QueryString);    mSearchMutex.acquire();    uint32 Connection = GetConnection();    InUseMarkers[Connection] = true;    mSearchMutex.release();    vsprintf(QueryBuffer[Connection], QueryString, vlist);    PGresult * res = SendQuery(Connection, QueryBuffer[Connection], false);    if(res == 0) return false;    InUseMarkers[Connection] = false;    ExecStatusType result = PQresultStatus(res);    bool passed = false;    if(result == PGRES_TUPLES_OK || result == PGRES_COMMAND_OK)        passed = true;    else        sLog.outError("Execute failed because of [%s]", PQresultErrorMessage(res));    // free up the memory    PQclear(res);    return passed;}
开发者ID:AwkwardDev,项目名称:WoWD,代码行数:31,


示例3: GetIGCShip

void CFSPlayer::SetShipUpdate(const ClientShipUpdate& su){    if (su.time > m_timeUpdate)    {        ShipUpdateStatus sus = GetIGCShip()->ProcessShipUpdate(su);        if (sus == c_susAccepted)        {            m_ucLastUpdate = c_ucShipUpdate;            m_su = su;            m_timeUpdate = su.time;            if (m_warpState == warpNoUpdate)            {                m_warpState = warpWaiting;                m_timeNextWarp = g.timeNow + 2.0f;  //Some fudge factor            }            else if ((m_warpState == warpWaiting) && (g.timeNow >= m_timeNextWarp))                m_warpState = warpReady;        }        else if (sus == c_susRejected)        {            BEGIN_PFM_CREATE(g.fm, pfmSR, S, SHIP_RESET)            END_PFM_CREATE            GetIGCShip()->ExportShipUpdate(&(pfmSR->shipupdate));            pfmSR->cookie = NewCookie();            g.fm.SendMessages(GetConnection(), FM_GUARANTEED, FM_FLUSH);        }    }}
开发者ID:FreeAllegiance,项目名称:Allegiance-R7-With-R4-Engine,代码行数:32,


示例4: ReadColumnDetails

void pgTrigger::ShowTreeDetail(ctlTree *browser, frmMain *form, ctlListView *properties, ctlSQLBox *sqlPane){	if (!expandedKids && GetLanguage() != wxT("edbspl"))	{		ReadColumnDetails();		if (browser)		{			// if no browser present, function will not be appended to tree			expandedKids = true;		}		if (triggerFunction)			delete triggerFunction;		// append function here		triggerFunction = functionFactory.AppendFunctions(this, GetSchema(), browser, wxT(		                      "WHERE pr.oid=") + NumToStr(functionOid) + wxT("::oid/n"));		if (triggerFunction)		{			iSetFunction(triggerFunction->GetQuotedFullIdentifier());		}	}	if (properties)	{		CreateListColumns(properties);		properties->AppendItem(_("Name"), GetName());		properties->AppendItem(_("OID"), GetOid());		if (GetConnection()->BackendMinimumVersion(8, 2))			properties->AppendYesNoItem(_("Constraint?"), GetIsConstraint());		properties->AppendItem(_("Fires"), GetFireWhen());		properties->AppendItem(_("Event"), GetEvent());		if (!GetQuotedColumns().IsEmpty())		{			properties->AppendItem(_("Columns"), GetColumns());		}		properties->AppendItem(_("For each"), GetForEach());		if (GetLanguage() != wxT("edbspl"))			properties->AppendItem(_("Function"), GetFunction() + wxT("(") + GetArguments() + wxT(")"));		if (GetConnection()->BackendMinimumVersion(8, 5))			properties->AppendItem(_("When?"), GetWhen());		properties->AppendYesNoItem(_("Enabled?"), GetEnabled());		properties->AppendYesNoItem(_("System trigger?"), GetSystemObject());		properties->AppendItem(_("Comment"), firstLineOnly(GetComment()));	}}
开发者ID:zr40,项目名称:pgadmin3-light,代码行数:47,


示例5: wxT

wxString edbPackageFunction::GetArgListWithNames(){	wxString args;	for (unsigned int i = 0; i < argTypesArray.Count(); i++)	{		if (i > 0)			args += wxT(", ");		wxString arg;		if (GetIsProcedure())		{			if (!argNamesArray.Item(i).IsEmpty())				arg += qtIdent(argNamesArray.Item(i));			if (!argModesArray.Item(i).IsEmpty())			{				if (arg.IsEmpty())					arg += argModesArray.Item(i);				else					arg += wxT(" ") + argModesArray.Item(i);			}		}		else		{			if (!argModesArray.Item(i).IsEmpty())				arg += argModesArray.Item(i);			if (!argNamesArray.Item(i).IsEmpty())			{				if (arg.IsEmpty())					arg += qtIdent(argNamesArray.Item(i));				else					arg += wxT(" ") + qtIdent(argNamesArray.Item(i));			}		}		if (!arg.IsEmpty())			arg += wxT(" ") + argTypesArray.Item(i);		else			arg += argTypesArray.Item(i);		// Parameter default value		if (GetConnection()->HasFeature(FEATURE_FUNCTION_DEFAULTS) &&		        !argDefsArray.IsEmpty())		{			if ((argModesArray.Item(i).IsEmpty() ||			        argModesArray.Item(i) == wxT("IN") ||			        argModesArray.Item(i) == wxT("VARIADIC")) &&			        !argDefsArray.Item(i).IsEmpty() &&			        i < argDefsArray.Count())				arg += wxT(" DEFAULT ") + argDefsArray.Item(i);		}		args += arg;	}	return args;}
开发者ID:SokilV,项目名称:pgadmin3,代码行数:59,


示例6: DropObject

bool pgProcedure::DropObject(wxFrame *frame, ctlTree *browser, bool cascaded){	if (!GetConnection()->EdbMinimumVersion(8, 0))		return pgFunction::DropObject(frame, browser, cascaded);	wxString sql = wxT("DROP PROCEDURE ") + this->GetSchema()->GetQuotedIdentifier() + wxT(".") + this->GetQuotedIdentifier();	return GetDatabase()->ExecuteVoid(sql);}
开发者ID:intgr,项目名称:pgadmin3,代码行数:8,


示例7: ArcSDELockedObjectReader

///<summary>Executes the GetLockedObjects command, returning an FdoILockedObjectReader.</summary>/// <returns>Returns FdoILockedObjectReade.r</returns> FdoILockedObjectReader* ArcSDEGetLockedObjectsCommand::Execute (){    FdoPtr<ArcSDEConnection> connection;    CHAR user_name[SE_MAX_OWNER_LEN];    FdoStringP user_str;    CHAR* user;    LONG result;    SE_REGINFO *registrations;    LONG count;    CHAR table_name[SE_QUALIFIED_TABLE_NAME];    LONG number;    LONG *ids;    FdoPtr<ArcSDELockedObjectReader> ret;    // verify the connection    connection = static_cast<ArcSDEConnection*>(GetConnection ());    if (connection == NULL)        throw FdoException::Create (NlsMsgGet (ARCSDE_CONNECTION_NOT_ESTABLISHED, "Connection not established."));    // establish an empty locked object reader    ret = new ArcSDELockedObjectReader (connection);    // get the user name    if (NULL == GetLockOwner () || (0 == wcscmp (L"", GetLockOwner ())))    {        result = SE_connection_get_user_name (connection->GetConnection (), user_name);        handle_sde_err<FdoCommandException> (connection->GetConnection (), result, __FILE__, __LINE__, ARCSDE_USER_UNKNOWN, "Cannot determine current user.");        user = user_name;    }    else    {        user_str = mLockOwner.Upper();#ifdef SDE_UNICODE        user = (CHAR*)sde_cstwc(user_str);#else        sde_wide_to_multibyte (user, (FdoString*)user_str);#endif    }    // process the list of registered arcsde tables, checking for locks by user (or not)    // Read all registered arcsde tables, adding user locks on the rows to the FdoILockedObjectReader    connection->GetArcSDERegistrationList(&registrations, &count);    for (int i = 0; i < count; i++)    {        if (SE_reginfo_allow_rowlocks (registrations[i]))        {            result = SE_reginfo_get_table_name (registrations[i], table_name);            handle_sde_err<FdoCommandException> (connection->GetConnection(), result, __FILE__, __LINE__, ARCSDE_REGISTRATION_INFO_ITEM, "Table registration info item '%1$ls' could not be retrieved.", L"table_name");            result = SE_table_get_rowlocks_by_user (connection->GetConnection(), table_name, user, &number, &ids);            handle_sde_err<FdoCommandException>(connection->GetConnection(), result, __FILE__, __LINE__, ARCSDE_GET_ROW_LOCK_LIST_FAILED, "Failed to get the row lock list.");            for (int j = 0; j < number; j++)                ret->AddIdentity (table_name, ids[j]);            SE_table_free_rowlocks_list (number, ids, NULL);        }    }    return (FDO_SAFE_ADDREF (ret.p));}
开发者ID:johanvdw,项目名称:fdo-git-mirror,代码行数:60,


示例8: GetConnection

bool ConnectionSocket::ConnectSocketToHost(std::string& hostName, const std::string& service, int addrFamily) {	Connection host = GetConnection(hostName, service, addrFamily);	m_socketID = ConnectToHostSocket(host);	return true;}
开发者ID:achen889,项目名称:Warlockery_Engine,代码行数:9,


示例9: _T

//----------------------------------------------------------------------------// Save a data stream to file//// pFile will contain "device path,pc folder" of which we want the 'pc folder' partint CSTATEngine::SaveTransferFile(const char *pFile, char *pContents, unsigned long ulLength){	int ret = E_BADFILENAME;	CString path = ST_WORKINGPATH_VALUE;	//read from inifile if entry exists	if(statIniFile.SectionExists(ST_TEST_KEY) )	{		CString setting;		setting.Empty();		setting=statIniFile.GetKeyValue(ST_WORKINGPATH,ST_TEST_KEY);		if(!setting.IsEmpty())			path = setting;	}	// add a backslash	if (path.Right(1) != _T('//'))		path += _T('//');	// get any additional sub folders	CString folder = pFile;	int index = folder.Find(_T(','));	if (index == -1)		return E_BADFILENAME;	// if the comma is the last char there are no folders to add	if (folder.Right(1) != _T(','))	{		path += folder.Mid(index + 1);		// add a backslash		if (path.Right(1) != _T('//'))			path += _T('//');	}	if (bMultithreaded)	{		// add a sub-folder for the connection type		path += GetConnection(eConnectType);		path += _T(".");		path += szAddress;		path += _T('//');	}	// now extract the filename from the first argument	CString filename = folder.Left(index);	index = filename.ReverseFind(_T('//'));	if (index == -1)		path += filename;	else		path += filename.Mid(index + 1);	Message("Saving file [%s]", ToAnsi(path));	ret = SaveTheFile(path, pContents, ulLength);	if (ret != ITS_OK)		Message("Error saving [%s] (%d)", ToAnsi(path), GetLastError());	return ret;}
开发者ID:cdaffara,项目名称:symbiandump-os2,代码行数:61,


示例10: VE_AUTO_LOCK_MUTEX

//--------------------------------------------------------------------------void Client::Disconnect(const VeChar8* pcName){	VE_AUTO_LOCK_MUTEX(m_kMutex);	Connection* pkConnect = GetConnection(pcName);	if(pkConnect)	{		pkConnect->ForceDisconnect(Connection::CONNECT_TURN_OFF);	}}
开发者ID:snailwork,项目名称:Texas-cs,代码行数:10,


示例11: GetConnection

bool CFighterMediator::SendToGac(const void* pData,uint32 uSize,uint32 uRange)const{	CConnServer* pConn= GetConnection();	if( pConn && (!DirectorMovingIsDisabled() || uRange == eOnlyToDirector) )		pConn->Send(pData,uSize);	if(uRange != eOnlyToDirector)		GetIS(uRange)->Send(pData,uSize);	return true;}
开发者ID:svn2github,项目名称:ybtx,代码行数:9,


示例12: GetConnection

void C4Network2ClientListBox::ConnectionListItem::OnButtonDisconnect(C4GUI::Control *pButton){	// close connection	C4Network2IOConnection *pConn = GetConnection();	if (pConn)	{		pConn->Close();	}}
开发者ID:gitMarky,项目名称:openclonk,代码行数:9,


示例13: CxBlobWriter

IWriter* CStatement::GetBlobWriter(I_ITDescriptor &d, size_t blob_size,                                   TBlobOStreamFlags flags){    delete m_wr;    m_wr = 0;    m_wr = new CxBlobWriter(GetConnection()->GetCDB_Connection(),                            d, blob_size, flags, false);    return m_wr;}
开发者ID:swuecho,项目名称:igblast,代码行数:9,


示例14: GetServer

bool pgDatabase::GetCanHint(){	if (encoding == wxT("SQL_ASCII"))		return true;	if (encoding == wxT("UNICODE"))	{		wxString ver = GetServer()->GetVersionString();		if (ver.Find(wxT("mingw32")) > 0 && ver.Find(wxT("SQL 8.0.")) > 0)			return true;	}	if (GetServer()->GetConnection() == GetConnection() &&	        GetConnection()->BackendMinimumVersion(8, 0) &&	        !GetConnection()->HasFeature(FEATURE_FILEREAD))		return true;	return false;}
开发者ID:KrisShannon,项目名称:pgadmin3,代码行数:19,


示例15: assert

void CSGGameLoopCallback::Process(const CmdData* pCmdData){	if(pCmdData->nCmd==SGCMDCODE_CONNECT) {		assert(pCmdData->nWho!=0);		CSGConnection* pConnection;		pConnection = GetConnection(pCmdData->nWho);		if(pConnection) {			pConnection->Disconnect();			pConnection->OnDisconnect();			pConnection->Release();		}		CCmdDataReader cmd(pCmdData);		IGameFES* pFES = NULL; /* MsgLoop_GetFES(cmd.GetValue<unsigned int>(), cmd.GetValue<unsigned short>());		assert(pFES);		if(!pFES) return; */		cmd.GetValue<unsigned int>();		cmd.GetValue<unsigned short>();		pConnection = CreateConnection(pCmdData->nWho, pFES, cmd.GetValue<unsigned int>());		assert(pConnection);		if(!pConnection) return;		pConnection->OnConnect();		return;	}	if(pCmdData->nCmd==SGCMDCODE_USERDATA) {		assert(pCmdData->nWho!=0);		CSGConnection* pConnection;		pConnection = GetConnection(pCmdData->nWho);		assert(pConnection);		if(!pConnection) return;		pConnection->OnData(pCmdData->pData, pCmdData->nSize);		return;	}	if(pCmdData->nCmd==SGCMDCODE_DISCONNECT) {		assert(pCmdData->nWho!=0);		CSGConnection* pConnection;		pConnection = GetConnection(pCmdData->nWho);		assert(pConnection);		if(!pConnection) return;		pConnection->OnDisconnect();		pConnection->Release();		return;	}}
开发者ID:EmuxEvans,项目名称:sailing,代码行数:43,


示例16: GetConnection

SOCKET CChannelInfo::GetSocket(SOCKET_TYPE enSocketType){    CConnection* pConnection = GetConnection(enSocketType);    if (NULL == pConnection)    {        return INVALID_SOCKET;    }    return pConnection->GetSocket();}
开发者ID:my76128,项目名称:esdk_ivs_sdk_linux,代码行数:10,


示例17: debugf

/*------------------------------------------------------------------------- * SetDPGroup *------------------------------------------------------------------------- * Purpose: *    Adds the player to a "primary" group within a mission, i.e. either *        flying or docked in a sector. Players in missions are always in  *        exactly 1 primary group. *  * Side Effects: *    Removes them from the group they were in */void CFSPlayer::SetDPGroup(CFSCluster*  pfsCluster, bool bFlying){  if (m_pfsClusterFlying)  {      m_pfsClusterFlying->RemoveFlyingPlayer(this);  }  CFMGroup* pgrp;  if (pfsCluster)  {      if (bFlying)      {          pgrp = pfsCluster->GetClusterGroups()->pgrpClusterFlying;          m_pfsClusterFlying = pfsCluster;          pfsCluster->AddFlyingPlayer(this);      }      else      {          pgrp = pfsCluster->GetClusterGroups()->pgrpClusterDocked;          m_pfsClusterFlying = NULL;      }  }  else  {      pgrp = NULL;      m_pfsClusterFlying = NULL;  }  if (m_pgrp)  {#ifdef DEBUG    // mmf only log this in debug build    debugf("Removing %s(%u) from group %s(%u)/n", GetName(), GetConnection()->GetID(),             m_pgrp->GetName(), m_pgrp->GetID());#endif    g.fm.DeleteConnectionFromGroup(m_pgrp, GetConnection());  }  m_pgrp = pgrp;  if (m_pgrp)	g.fm.AddConnectionToGroup(m_pgrp, GetConnection());}
开发者ID:FreeAllegiance,项目名称:Allegiance-R7-With-R4-Engine,代码行数:53,


示例18: wxT

wxString pgView::GetSql(ctlTree *browser){	if (sql.IsNull())	{		sql = wxT("-- View: ") + GetQuotedFullIdentifier() + wxT("/n/n")		      + wxT("-- DROP VIEW ") + GetQuotedFullIdentifier() + wxT(";")		      + wxT("/n/nCREATE OR REPLACE VIEW ") + GetQuotedFullIdentifier() + wxT(" AS /n")		      + GetFormattedDefinition()		      + wxT("/n/n")		      + GetOwnerSql(7, 3, wxT("TABLE ") + GetQuotedFullIdentifier());		if (GetConnection()->BackendMinimumVersion(8, 2))			sql += GetGrant(wxT("arwdxt"), wxT("TABLE ") + GetQuotedFullIdentifier());		else			sql += GetGrant(wxT("arwdRxt"), wxT("TABLE ") + GetQuotedFullIdentifier());		sql += GetCommentSql()		       + wxT("/n");		pgCollection *columns = browser->FindCollection(columnFactory, GetId());		if (columns)		{			wxString defaults, comments;			columns->ShowTreeDetail(browser);			treeObjectIterator colIt(browser, columns);			pgColumn *column;			while ((column = (pgColumn *)colIt.GetNextObject()) != 0)			{				column->ShowTreeDetail(browser);				if (column->GetColNumber() > 0)				{					if (!column->GetDefault().IsEmpty())					{						defaults += wxT("ALTER TABLE ") + GetQuotedFullIdentifier()						            +  wxT(" ALTER COLUMN ") + column->GetQuotedIdentifier()						            +  wxT(" SET DEFAULT ") + column->GetDefault()						            + wxT(";/n");					}					comments += column->GetCommentSql();				}			}			if (!defaults.IsEmpty())				sql += defaults + wxT("/n");			if (!comments.IsEmpty())				sql += comments + wxT("/n");		}		AppendStuff(sql, browser, ruleFactory);		AppendStuff(sql, browser, triggerFactory);	}	return sql;}
开发者ID:Timosha,项目名称:pgadmin3,代码行数:54,


示例19: GetConnection

void ClusterTransport::DropConnection(uint64_t nodeID){    ClusterConnection* conn;        conn = GetConnection(nodeID);        if (!conn)        return;            DeleteConnection(conn);}
开发者ID:crnt,项目名称:scaliendb,代码行数:11,


示例20: wxT

wxString pgDomain::GetSql(ctlTree *browser){    if (sql.IsNull())    {        sql = wxT("-- Domain: ") + GetQuotedFullIdentifier() + wxT("/n/n")              + wxT("-- DROP DOMAIN ") + GetQuotedFullIdentifier() + wxT(";")              + wxT("/n/nCREATE DOMAIN ") + GetQuotedFullIdentifier()              + wxT("/n  AS ") + GetQuotedBasetype();        if (GetCollationOid() > 0)            sql += wxT("/n  COLLATE ") + GetQuotedCollation();        AppendIfFilled(sql, wxT("/n  DEFAULT "), GetDefault());        // CONSTRAINT Name Dont know where it's stored, may be omitted anyway        if (notNull)            sql += wxT("/n  NOT NULL");        // Get a count of the constraints.        int consCount = 0;        pgCollection *constraints = browser->FindCollection(checkFactory, GetId());        if (constraints)        {            constraints->ShowTreeDetail(browser);            treeObjectIterator consIt(browser, constraints);            pgObject *data;            while ((data = consIt.GetNextObject()) != 0)            {                data->ShowTreeDetail(browser);                sql += wxT("/n  CONSTRAINT ") + data->GetQuotedIdentifier()                       + wxT(" ") + data->GetTypeName().Upper()                       + wxT(" ") ;                switch (data->GetMetaType())                {                case PGM_CHECK:                    sql += wxT("(") + ((pgCheck *)data)->GetDefinition() + wxT(")");                    if (GetDatabase()->BackendMinimumVersion(9, 2) && !((pgCheck *)data)->GetValid())                        sql += wxT(" NOT VALID");                    break;                }            }        }        sql += wxT(";/n")               + GetOwnerSql(7, 4)               + GetCommentSql();        if (GetConnection()->BackendMinimumVersion(9, 1))            sql += GetSeqLabelsSql();    }    return sql;}
开发者ID:GHnubsST,项目名称:pgadmin3,代码行数:54,


示例21: GetNode

bool CIntGraph::IsCrossingConnection (DWORD dwFromID, DWORD dwToID)//	IsCrossingConnection////	Returns TRUE if a connection between the two nodes would cross an already//	existing connection.	{	int i;	//	Get the coordinates of the proposed connection	SNode *pFrom = GetNode((int)dwFromID);	SNode *pTo = GetNode((int)dwToID);	int A1x = pFrom->x;	int A1y = pFrom->y;	int A2x = pTo->x;	int A2y = pTo->y;	//	Walk all nodes	for (i = 0; i < m_Nodes.GetCount(); i++)		{		SNode *pNode = GetNode(i);		if (!NodeIsFree(pNode) && pNode != pFrom && pNode != pTo)			{			//	Walk all connections for this node			//	(We only walk forward connections)			int iConnection = pNode->iFirstForward;			while (iConnection != -1)				{				SConnection *pConnection = GetConnection(iConnection);				SNode *pFrom2 = GetNode(pConnection->iFrom);				SNode *pTo2 = GetNode(pConnection->iTo);				if (pTo2 != pFrom && pTo2 != pTo)					{					int B1x = pFrom2->x;					int B1y = pFrom2->y;					int B2x = pTo2->x;					int B2y = pTo2->y;					if (IntSegmentsIntersect(A1x, A1y, A2x, A2y, B1x, B1y, B2x, B2y))						return true;					}				iConnection = pConnection->iNext;				}			}		}	return false;	}
开发者ID:Sdw195,项目名称:Transcendence,代码行数:54,


示例22: DetachSendDataIntf

CDBL_SendDataCmd::~CDBL_SendDataCmd(){    try {        DetachSendDataIntf();        GetConnection().DropCmd(*(impl::CSendDataCmd*)this);        Cancel();    }    NCBI_CATCH_ALL_X( 2, NCBI_CURRENT_FUNCTION )}
开发者ID:svn2github,项目名称:ncbi_tk,代码行数:11,


示例23: SendSYN

////////////////////////////////////////////////////////////////////////////////// CSRConnection::SendSYN/// @description Composes an SYN and writes it to the channel./// @param The message to SYN./// @pre A message has been accepted./// @post A syn has been written to the channel///////////////////////////////////////////////////////////////////////////////void CSRConnection::SendSYN(){    Logger.Debug << __PRETTY_FUNCTION__ << std::endl;    unsigned int seq = m_outseq;    freedm::broker::CMessage outmsg;    if(m_window.size() == 0)    {        m_outseq = (m_outseq+1)%SEQUENCE_MODULO;    }    else    {        //Don't bother if front of queue is already a SYN        if(m_window.front().GetStatus() == CMessage::Created)        {            return;        }        //Set it as the seq before the front of queue        seq = m_window.front().GetSequenceNumber();        if(seq == 0)        {            seq = SEQUENCE_MODULO-1;        }        else        {            seq--;        }    }    // Presumably, if we are here, the connection is registered     outmsg.SetSourceUUID(GetConnection()->GetConnectionManager().GetUUID());    outmsg.SetSourceHostname(GetConnection()->GetConnectionManager().GetHostname());    outmsg.SetStatus(freedm::broker::CMessage::Created);    outmsg.SetSequenceNumber(seq);    outmsg.SetSendTimestampNow();    outmsg.SetProtocol(GetIdentifier());    Write(outmsg);    m_window.push_front(outmsg);    m_outsync = true;    /// Hook into resend until the message expires.    boost::system::error_code x;    Resend(x);}
开发者ID:ylztf,项目名称:LWI2012,代码行数:48,


示例24: ShowStatistics

void pgFunction::ShowStatistics(frmMain *form, ctlListView *statistics){	if (GetConnection()->BackendMinimumVersion(8, 4))	{		wxString sql = wxT("SELECT calls AS ") + qtIdent(_("Number of calls")) +		               wxT(", total_time AS ") + qtIdent(_("Total Time")) +		               wxT(", self_time AS ") + qtIdent(_("Self Time")) +		               wxT(" FROM pg_stat_user_functions") +		               wxT(" WHERE funcid = ") + NumToStr(GetOid());		DisplayStatistics(statistics, sql);	}}
开发者ID:intgr,项目名称:pgadmin3,代码行数:12,


示例25: time

//----------------------------------------------------------------------------// Convert and save a screenshotint CSTATEngine::ConvertAndSaveScreeenshot(CString &file, const char *pContents, const unsigned long ulLength){	int ret = E_BADFILENAME;	// clean out any previous mbm files lying around	if (!RemoveLeftoverMBMFiles())		return E_SCREENSHOT_LEFTOVERFILES;	// get the destination screenshot name	CString destfile = file;	if (destfile.IsEmpty())	{		// construct a filename from date/time		char szName[20] = {0};		time_t curTime;		time (&curTime);		strftime (szName, 					sizeof (szName),					"%Y%m%d%H%M%S",					localtime (&curTime));		destfile = szName;	}	// get the full name of the source image	CString SrcPath = cScreenshotDirectory;	if (bMultithreaded)	{		// add a sub-folder for the connection type		SrcPath += GetConnection(eConnectType);		SrcPath += _T(".");		SrcPath += szAddress;		SrcPath += _T('//');	}	// attach the filename	CString path = SrcPath;	path += destfile;	path += _T(".mbm");//	Message("Saving screenshot [%s]", ToAnsi(path));	// save bitmap data to file	if ((ret = SaveTheFile(path, pContents, ulLength)) == ITS_OK)		ret = pConverter->ConvertScreenShot(SrcPath, SrcPath);	// save the full path to the converted image	if (ret == ITS_OK)		file = SrcPath;	return ret;}
开发者ID:cdaffara,项目名称:symbiandump-os2,代码行数:55,



注:本文中的GetConnection函数示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


C++ GetConsoleCP函数代码示例
C++ GetConfiguration函数代码示例
万事OK自学网:51自学网_软件自学网_CAD自学网自学excel、自学PS、自学CAD、自学C语言、自学css3实例,是一个通过网络自主学习工作技能的自学平台,网友喜欢的软件自学网站。