本文整理汇总了C++中UnsignedArray::getArray方法的典型用法代码示例。如果您正苦于以下问题:C++ UnsignedArray::getArray方法的具体用法?C++ UnsignedArray::getArray怎么用?C++ UnsignedArray::getArray使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类UnsignedArray
的用法示例。
在下文中一共展示了UnsignedArray::getArray方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: doStartStop
//.........这里部分代码省略.........
*props1 = '\0';
}
else
{
configAddress = (char*) address;
}
StringBuffer newAddress;
ConvertAddress(address0, newAddress);
pResult->setAddressOrig ( newAddress.str() );//can be either IP or name of component
pResult->setAddress ( address );//can be either IP or name of component
pResult->setCompType( compType );
if (version > 1.04)
{
pResult->setName( path );
const char* pStr2 = strstr(path, "LexisNexis");
if (pStr2)
{
char name[256];
const char* pStr1 = strchr(pStr2, '|');
if (!pStr1)
{
strcpy(name, pStr2+11);
}
else
{
strncpy(name, pStr2+11, pStr1 - pStr2 -11);
name[pStr1 - pStr2 -11] = 0;
}
pResult->setName( name );
}
}
pResult->setOS( atoi(OS) );
pResult->setPath( path );
resultsArray.append(*pResult.getLink());
CStartStopThreadParam* pThreadReq;
pThreadReq = new CStartStopThreadParam(address, configAddress, bStop, m_useDefaultHPCCInit, this, context);
pThreadReq->setResultObject( pResult );
if (userName && *userName)
pThreadReq->setUserID( userName );
if (password && *password)
pThreadReq->setPassword( password );
PooledThreadHandle handle = m_threadPool->start( pThreadReq );
threadHandles.append(handle);
}
#else
{
StringBuffer newAddress;
ConvertAddress(address0, newAddress);
char* pStr = (char*) strchr(address, '|');;
if (pStr)
pStr[0] = 0;
pResult->setAddressOrig ( newAddress.str() );//can be either IP or name of component
pResult->setAddress ( address );//can be either IP or name of component
pResult->setCompType( compType );
pResult->setOS( atoi(OS) );
pResult->setPath( path );
resultsArray.append(*pResult.getLink());
CStartStopThreadParam* pThreadReq;
pThreadReq = new CStartStopThreadParam(address, bStop, this, context);
pThreadReq->setResultObject( pResult );
if (userName && *userName)
pThreadReq->setUserID( userName );
if (password && *password)
pThreadReq->setPassword( password );
PooledThreadHandle handle = m_threadPool->start( pThreadReq );
threadHandles.append(handle);
}
#endif
}
//block for worker theads to finish, if necessary, and then collect results
//
PooledThreadHandle* pThreadHandle = threadHandles.getArray();
unsigned i=threadHandles.ordinality();
while (i--)
{
m_threadPool->join(*pThreadHandle, 30000);//abort after 30 secs in remote possibility that the command blocks
pThreadHandle++;
}
resp.setStartStopResults(resultsArray);
resp.setStop(bStop);
if (version > 1.08)
{
resp.setContainCluster(containCluster);
}
return true;
}