本文整理汇总了C++中datastructures::List::Clear方法的典型用法代码示例。如果您正苦于以下问题:C++ List::Clear方法的具体用法?C++ List::Clear怎么用?C++ List::Clear使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类datastructures::List
的用法示例。
在下文中一共展示了List::Clear方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: GetTypeMappingIndices
void VariadicSQLParser::GetTypeMappingIndices( const char *format, DataStructures::List<IndexAndType> &indices )
{
bool previousCharWasPercentSign;
unsigned int i;
unsigned int typeMappingIndex;
indices.Clear(false, _FILE_AND_LINE_);
unsigned int len = (unsigned int) strlen(format);
previousCharWasPercentSign=false;
for (i=0; i < len; i++)
{
if (previousCharWasPercentSign==true )
{
typeMappingIndex = GetTypeMappingIndex(format[i]);
if (typeMappingIndex!=(unsigned int) -1)
{
IndexAndType iat;
iat.strIndex=i-1;
iat.typeMappingIndex=typeMappingIndex;
indices.Insert(iat, _FILE_AND_LINE_ );
}
}
previousCharWasPercentSign=format[i]=='%';
}
}
示例2: RemoveRowsFromIP
void LightweightDatabaseServer::RemoveRowsFromIP(PlayerID playerId)
{
// Remove rows for tables that do so on a system disconnect
DatabaseTable *databaseTable;
DataStructures::List<unsigned> removeList;
DataStructures::Page<unsigned, DataStructures::Table::Row*, _TABLE_BPLUS_TREE_ORDER> *cur;
unsigned i,j;
for (i=0; i < database.Size(); i++)
{
databaseTable=database[i];
if (databaseTable->removeRowOnDisconnect)
{
DataStructures::BPlusTree<unsigned, DataStructures::Table::Row*, _TABLE_BPLUS_TREE_ORDER> &rows = databaseTable->table.GetRows();
cur = rows.GetListHead();
while (cur)
{
// Mark dropped entities
for (j=0; j < (unsigned)cur->size; j++)
{
if (RowHasIP(cur->data[j], playerId, databaseTable->systemIdColumnIndex))
removeList.Insert(cur->keys[j]);
}
cur=cur->next;
}
for (j=0; j < removeList.Size(); j++)
databaseTable->table.RemoveRow(removeList[i]);
removeList.Clear(true);
}
}
}
示例3: GetUniqueKeyList
void StatisticsHistory::GetUniqueKeyList(DataStructures::List<RakString> &keys)
{
keys.Clear(true, _FILE_AND_LINE_);
for (unsigned int idx=0; idx < objects.Size(); idx++)
{
TrackedObject *to = objects[idx];
DataStructures::List<TimeAndValueQueue*> itemList;
DataStructures::List<RakNet::RakString> keyList;
to->dataQueues.GetAsList(itemList, keyList, _FILE_AND_LINE_);
for (unsigned int k=0; k < keyList.Size(); k++)
{
bool hasKey=false;
for (unsigned int j=0; j < keys.Size(); j++)
{
if (keys[j]==keyList[k])
{
hasKey=true;
break;
}
}
if (hasKey==false)
keys.Push(keyList[k], _FILE_AND_LINE_);
}
}
}
示例4: bsIn
void FullyConnectedMesh2::GetVerifiedJoinAcceptedAdditionalData(Packet *packet, bool *thisSystemAccepted, DataStructures::List<RakNetGUID> &systemsAccepted, BitStream *additionalData)
{
systemsAccepted.Clear(true, _FILE_AND_LINE_);
RakNet::BitStream bsIn(packet->data, packet->length, false);
bsIn.IgnoreBytes(sizeof(MessageID));
RakNetGUID systemToAddGuid;
bsIn.Read(systemToAddGuid);
*thisSystemAccepted = systemToAddGuid == rakPeerInterface->GetMyGUID();
unsigned short listSize;
bsIn.Read(listSize);
bsIn.IgnoreBytes(listSize*RakNetGUID::size());
bsIn.Read(listSize);
if (systemToAddGuid==rakPeerInterface->GetMyGUID())
{
for (unsigned short i=0; i < listSize; i++)
{
bsIn.Read(systemToAddGuid);
systemsAccepted.Push(systemToAddGuid, _FILE_AND_LINE_);
}
systemsAccepted.Push(packet->guid, _FILE_AND_LINE_);
}
else
{
systemsAccepted.Push(systemToAddGuid, _FILE_AND_LINE_);
bsIn.IgnoreBytes(listSize*RakNetGUID::size());
}
if (additionalData)
{
additionalData->Reset();
additionalData->Write(bsIn);
}
}
示例5: GetEntries
void GridSectorizer::GetEntries(DataStructures::List<void*>& intersectionList, const float minX, const float minY, const float maxX, const float maxY)
{
#ifdef _USE_ORDERED_LIST
DataStructures::OrderedList<void*, void*>* cell;
#else
DataStructures::List<void*>* cell;
#endif
int xStart, yStart, xEnd, yEnd, xCur, yCur;
unsigned index;
xStart=WorldToCellXOffsetAndClamped(minX);
yStart=WorldToCellYOffsetAndClamped(minY);
xEnd=WorldToCellXOffsetAndClamped(maxX);
yEnd=WorldToCellYOffsetAndClamped(maxY);
intersectionList.Clear(true, _FILE_AND_LINE_);
for (xCur=xStart; xCur <= xEnd; ++xCur)
{
for (yCur=yStart; yCur <= yEnd; ++yCur)
{
cell = grid+yCur*gridCellWidthCount+xCur;
for (index=0; index < cell->Size(); ++index)
intersectionList.Insert(cell->operator [](index), _FILE_AND_LINE_);
}
}
}
示例6:
void FullyConnectedMesh2::GetParticipantList(DataStructures::List<RakNetGUID> &participantList)
{
participantList.Clear(true, _FILE_AND_LINE_);
unsigned int i;
for (i=0; i < fcm2ParticipantList.Size(); i++)
participantList.Push(fcm2ParticipantList[i].rakNetGuid, _FILE_AND_LINE_);
}
示例7: GetOverpopulatedTeams
void TeamBalancer::GetOverpopulatedTeams(DataStructures::List<TeamId> &overpopulatedTeams, int maxTeamSize)
{
overpopulatedTeams.Clear(true,_FILE_AND_LINE_);
for (TeamId i=0; i < teamMemberCounts.Size(); i++)
{
if (teamMemberCounts[i]>=maxTeamSize)
overpopulatedTeams.Push(i,_FILE_AND_LINE_);
}
}
示例8: GetJoinsInProgressIndex
void FullyConnectedMesh2::GetVerifiedJoinRequiredProcessingList(RakNetGUID host, DataStructures::List<SystemAddress> &addresses, DataStructures::List<RakNetGUID> &guids)
{
addresses.Clear(true, _FILE_AND_LINE_);
guids.Clear(true, _FILE_AND_LINE_);
unsigned int curIndex = GetJoinsInProgressIndex(host);
if (curIndex!=(unsigned int) -1)
{
VerifiedJoinInProgress *vjip = joinsInProgress[curIndex];
unsigned int j;
for (j=0; j < vjip->members.Size(); j++)
{
if (vjip->members[j].joinInProgressState==JIPS_PROCESSING)
{
addresses.Push(vjip->members[j].systemAddress, _FILE_AND_LINE_);
guids.Push(vjip->members[j].guid, _FILE_AND_LINE_);
}
}
}
}
示例9:
void NatPunchthrough::ConnectionRequest::GetAddressList(RakPeerInterface *rakPeer, DataStructures::List<SystemAddress> &fallbackAddresses, SystemAddress publicAddress, SystemAddress privateAddress, bool excludeConnected)
{
SystemAddress fallback;
fallbackAddresses.Clear(true);
fallback.binaryAddress=publicAddress.binaryAddress;
fallback.port=publicAddress.port;
if (excludeConnected==false || rakPeer->IsConnected(fallback,true)==false)
fallbackAddresses.Insert(fallback);
if (privateAddress!=publicAddress && privateAddress!=UNASSIGNED_SYSTEM_ADDRESS && (excludeConnected==false ||rakPeer->IsConnected(privateAddress,true)==false))
fallbackAddresses.Insert(privateAddress);
fallback.port=publicAddress.port+1;
if (excludeConnected==false || rakPeer->IsConnected(fallback,true)==false)
fallbackAddresses.Insert(fallback);
fallback.port=publicAddress.port+2;
if (excludeConnected==false || rakPeer->IsConnected(fallback,true)==false)
fallbackAddresses.Insert(fallback);
fallback.port=rakPeer->GetInternalID().port;
if (fallbackAddresses.GetIndexOf(fallback)==(unsigned) -1 && (excludeConnected==false || rakPeer->IsConnected(fallback,true)==false))
fallbackAddresses.Insert(fallback);
fallback.port=rakPeer->GetInternalID().port+1;
if (fallbackAddresses.GetIndexOf(fallback)==(unsigned) -1 && (excludeConnected==false || rakPeer->IsConnected(fallback,true)==false))
fallbackAddresses.Insert(fallback);
fallback.port=rakPeer->GetInternalID().port+2;
if (fallbackAddresses.GetIndexOf(fallback)==(unsigned) -1 && (excludeConnected==false || rakPeer->IsConnected(fallback,true)==false))
fallbackAddresses.Insert(fallback);
// Try to keep down the number of fallbacks or the router may run out of mappings
/*
fallback.port=publicAddress.port+3;
if (excludeConnected==false || rakPeer->IsConnected(fallback,true)==false)
fallbackAddresses.Insert(fallback);
fallback.port=publicAddress.port+4;
if (excludeConnected==false || rakPeer->IsConnected(fallback,true)==false)
fallbackAddresses.Insert(fallback);
fallback.port=rakPeer->GetInternalID().port+3;
if (fallbackAddresses.GetIndexOf(fallback)==(unsigned) -1 && (excludeConnected==false || rakPeer->IsConnected(fallback,true)==false))
fallbackAddresses.Insert(fallback);
fallback.port=rakPeer->GetInternalID().port+4;
if (fallbackAddresses.GetIndexOf(fallback)==(unsigned) -1 && (excludeConnected==false || rakPeer->IsConnected(fallback,true)==false))
fallbackAddresses.Insert(fallback);
*/
}
示例10: RemoveRowsFromIP
void LightweightDatabaseServer::RemoveRowsFromIP(SystemAddress systemAddress)
{
// Remove rows for tables that do so on a system disconnect
DatabaseTable *databaseTable;
DataStructures::List<unsigned> removeList;
DataStructures::Table::Row* row;
DataStructures::Page<unsigned, DataStructures::Table::Row*, _TABLE_BPLUS_TREE_ORDER> *cur;
unsigned i,j;
for (i=0; i < database.Size(); i++)
{
databaseTable=database[i];
if ((unsigned int) databaseTable->SystemAddressColumnIndex!=(unsigned int)-1)
{
const DataStructures::BPlusTree<unsigned, DataStructures::Table::Row*, _TABLE_BPLUS_TREE_ORDER> &rows = databaseTable->table.GetRows();
cur = rows.GetListHead();
while (cur)
{
// Mark dropped entities
for (j=0; j < (unsigned)cur->size; j++)
{
if (RowHasIP(cur->data[j], systemAddress, databaseTable->SystemAddressColumnIndex))
{
if (databaseTable->removeRowOnDisconnect)
{
removeList.Insert(cur->keys[j], __FILE__, __LINE__);
}
else if (databaseTable->removeRowOnPingFailure)
{
row = cur->data[j];
row->cells[databaseTable->nextPingSendColumnIndex]->i=(double)(RakNet::GetTime()+SEND_PING_INTERVAL+(randomMT()%1000));
}
}
}
cur=cur->next;
}
}
for (j=0; j < removeList.Size(); j++)
databaseTable->table.RemoveRow(removeList[j]);
removeList.Clear(true, __FILE__,__LINE__);
}
}
示例11: Update
void LightweightDatabaseServer::Update(void)
{
RakNetTime time=0;
DatabaseTable *databaseTable;
DataStructures::Page<unsigned, DataStructures::Table::Row*, _TABLE_BPLUS_TREE_ORDER> *cur;
unsigned i,j;
DataStructures::Table::Row* row;
DataStructures::List<unsigned> removeList;
SystemAddress systemAddress;
// periodic ping if removing system that do not respond to pings.
for (i=0; i < database.Size(); i++)
{
databaseTable=database[i];
if (databaseTable->removeRowOnPingFailure)
{
// Reading the time is slow - only do it once if necessary.
if (time==0)
time = RakNet::GetTime();
if (databaseTable->nextRowPingCheck < time)
{
databaseTable->nextRowPingCheck=time+1000+(randomMT()%1000);
const DataStructures::BPlusTree<unsigned, DataStructures::Table::Row*, _TABLE_BPLUS_TREE_ORDER> &rows = databaseTable->table.GetRows();
cur = rows.GetListHead();
while (cur)
{
// Mark dropped entities
for (j=0; j < (unsigned)cur->size; j++)
{
row = cur->data[j];
row->cells[databaseTable->SystemAddressColumnIndex]->Get((char*)&systemAddress, 0);
if (rakPeerInterface->IsConnected(systemAddress)==false)
{
if (time > time - (unsigned int) row->cells[databaseTable->lastPingResponseColumnIndex]->i &&
time - (unsigned int) row->cells[databaseTable->lastPingResponseColumnIndex]->i > (unsigned int) DROP_SERVER_INTERVAL)
{
removeList.Insert(cur->keys[j], __FILE__, __LINE__);
}
else
{
if (row->cells[databaseTable->nextPingSendColumnIndex]->i < (int) time)
{
char str1[64];
systemAddress.ToString(false, str1);
rakPeerInterface->Ping(str1, systemAddress.port, false);
row->cells[databaseTable->nextPingSendColumnIndex]->i=(double)(time+SEND_PING_INTERVAL+(randomMT()%1000));
}
}
}
}
cur=cur->next;
}
// Remove dropped entities
for (j=0; j < removeList.Size(); j++)
databaseTable->table.RemoveRow(removeList[i]);
removeList.Clear(true, __FILE__,__LINE__);
}
}
}
}
示例12: PQprepare
PGresult * PostgreSQLInterface::QueryVariadic( const char * input, ... )
{
RakNet::RakString query;
PGresult *result;
DataStructures::List<VariadicSQLParser::IndexAndType> indices;
if ( input==0 || input[0]==0 )
return 0;
// Lookup this query in the stored query table. If it doesn't exist, prepare it.
RakNet::RakString inputStr;
inputStr=input;
unsigned int preparedQueryIndex;
for (preparedQueryIndex=0; preparedQueryIndex < preparedQueries.Size(); preparedQueryIndex++)
{
if (preparedQueries[preparedQueryIndex].StrICmp(inputStr)==0)
break;
}
// Find out how many params there are
// Find out the type of each param (%f, %s)
indices.Clear(false, _FILE_AND_LINE_);
GetTypeMappingIndices( input, indices );
if (preparedQueryIndex==preparedQueries.Size())
{
// if (indices.Size()>0)
// query += " (";
RakNet::RakString formatCopy;
RakNet::RakString insertion;
formatCopy=input;
unsigned int i;
unsigned int indexOffset=0;
for (i=0; i < indices.Size(); i++)
{
// if (i!=0)
// query += ",";
// query+=typeMappings[indices[i].typeMappingIndex].type;
formatCopy.SetChar(indices[i].strIndex+indexOffset, '$');
// if (i < 9)
// formatCopy.SetChar(indices[i].strIndex+1, i+1+'0');
// else
insertion=RakNet::RakString("%i::%s", i+1, VariadicSQLParser::GetTypeMappingAtIndex(indices[i].typeMappingIndex));
formatCopy.SetChar(indices[i].strIndex+1+indexOffset, insertion);
indexOffset+=(unsigned int) insertion.GetLength()-1;
}
// if (indices.Size()>0)
// query += ")";
// query += " AS ";
query += formatCopy;
// query += ";\n";
formatCopy+= ";\n";
result = PQprepare(pgConn, RakNet::RakString("PGSQL_ExecuteVariadic_%i", preparedQueries.Size()), formatCopy.C_String(), indices.Size(), NULL);
if (IsResultSuccessful(result, false))
{
PQclear(result);
preparedQueries.Insert(inputStr, _FILE_AND_LINE_);
}
else
{
printf(formatCopy.C_String());
printf("\n");
printf(lastError);
RakAssert(0);
PQclear(result);
return 0;
}
}
// char *paramData[512];
// int paramLength[512];
// int paramFormat[512];
va_list argptr;
va_start(argptr, input);
char **paramData;
int *paramLength;
int *paramFormat;
ExtractArguments(argptr, indices, ¶mData, ¶mLength);
paramFormat=RakNet::OP_NEW_ARRAY<int>(indices.Size(),_FILE_AND_LINE_);
for (unsigned int i=0; i < indices.Size(); i++)
paramFormat[i]=PQEXECPARAM_FORMAT_BINARY;
result = PQexecPrepared(pgConn, RakNet::RakString("PGSQL_ExecuteVariadic_%i", preparedQueryIndex), indices.Size(), paramData, paramLength, paramFormat, PQEXECPARAM_FORMAT_BINARY );
VariadicSQLParser::FreeArguments(indices, paramData, paramLength);
RakNet::OP_DELETE_ARRAY(paramFormat,_FILE_AND_LINE_);
va_end(argptr);
if (IsResultSuccessful(result, false)==false)
{
printf(lastError);
PQclear(result);
return 0;
}
return result;
}
示例13: Update
void LightweightDatabaseServer::Update(RakPeerInterface *peer)
{
RakNetTime time=0;
DatabaseTable *databaseTable;
DataStructures::Page<unsigned, DataStructures::Table::Row*, _TABLE_BPLUS_TREE_ORDER> *cur;
unsigned i,j;
DataStructures::Table::Row* row;
DataStructures::List<unsigned> removeList;
PlayerID playerId;
// periodic ping if removing system that do not respond to pings.
for (i=0; i < database.Size(); i++)
{
databaseTable=database[i];
if (databaseTable->removeRowOnPingFailure)
{
// Reading the time is slow - only do it once if necessary.
if (time==0)
time = RakNet::GetTime();
if (databaseTable->nextRowPingCheck < time)
{
databaseTable->nextRowPingCheck=time+1000+(randomMT()%1000);
DataStructures::BPlusTree<unsigned, DataStructures::Table::Row*, _TABLE_BPLUS_TREE_ORDER> &rows = databaseTable->table.GetRows();
cur = rows.GetListHead();
while (cur)
{
// Mark dropped entities
for (j=0; j < (unsigned)cur->size; j++)
{
row = cur->data[j];
if (time - row->cells[databaseTable->lastPingResponseColumnIndex]->i > DROP_SERVER_INTERVAL)
removeList.Insert(cur->keys[j]);
}
cur=cur->next;
}
// Remove dropped entities
for (j=0; j < removeList.Size(); j++)
databaseTable->table.RemoveRow(removeList[i]);
removeList.Clear(true);
cur = rows.GetListHead();
// Ping remaining entities if they are not connected. If they are connected just increase the ping interval.
while (cur)
{
for (j=0; j < (unsigned)cur->size; j++)
{
row = cur->data[j];
if (row->cells[databaseTable->nextPingSendColumnIndex]->i < (int) time)
{
row->cells[databaseTable->systemIdColumnIndex]->Get((char*)&playerId, 0);
if (peer->GetIndexFromPlayerID(playerId)==-1)
{
peer->Ping(playerId.ToString(false), playerId.port, false);
}
else
{
// Consider the fact that they are connected to be a ping response
row->cells[databaseTable->lastPingResponseColumnIndex]->i=time;
}
row->cells[databaseTable->nextPingSendColumnIndex]->i=time+SEND_PING_INTERVAL+(randomMT()%1000);
}
}
cur=cur->next;
}
}
}
}
}
示例14: Update
//.........这里部分代码省略.........
{
ConnectionRequest *connectionRequest = connectionRequestList[i];
DataStructures::List<SystemAddress> fallbackAddresses;
// unsigned fallbackIndex;
RakNet::BitStream oob;
if (connectionRequest->receiverPublic!=UNASSIGNED_SYSTEM_ADDRESS)
{
// fallbackAddresses.Clear();
// connectionRequest->GetAddressList(peer, fallbackAddresses, connectionRequest->senderPublic, connectionRequest->senderPrivate, true);
// for (unsigned fallbackIndex=0; fallbackIndex < fallbackAddresses.Size(); fallbackIndex++)
// peer->Ping(fallbackAddresses[fallbackIndex].ToString(false),fallbackAddresses[fallbackIndex].port,false);
// Connect to this system.
LogOut(FormatString("Connecting to public address %s\n", connectionRequest->receiverPublic.ToString(true)));
rakPeer->Connect(connectionRequest->receiverPublic.ToString(false), connectionRequest->receiverPublic.port, connectionRequest->passwordData, connectionRequest->passwordDataLength);
connectionRequest->attemptedConnection=true;
/*
if (connectionRequestList[i]->receiverPrivate==connectionRequestList[i]->receiverPublic)
{
// Otherwise done with this connection, as it's a normal connection attempt
rakFree(connectionRequestList[i]->passwordData);
delete connectionRequestList[i];
connectionRequestList.RemoveAtIndex(i);
continue;
}
*/
}
else
{
RakAssert(connectionRequestList[i]->senderPublic!=UNASSIGNED_SYSTEM_ADDRESS);
// Send ID_NAT_ADVERTISE_RECIPIENT_PORT to all possible remote ports
fallbackAddresses.Clear();
connectionRequest->GetAddressList(peer, fallbackAddresses, connectionRequest->senderPublic, connectionRequest->senderPrivate, true);
/// 04/13/08 I think if I send to all possible fallbacks in order it starts reusing external ports or else assigns them in a random way
/// Sending 4X to each port in order did work however.
/// Timing matches that of RakPeer's failure notices and retries
if ((unsigned int) connectionRequestList[i]->recipientOfflineCount < fallbackAddresses.Size())
{
unsigned k;
//for (k=0; k < 4; k++)
for (k=0; k < (unsigned) connectionRequestList[i]->recipientOfflineCount && k < fallbackAddresses.Size(); k++)
{
oob.Write(ID_NAT_ADVERTISE_RECIPIENT_PORT);
oob.Write(rakPeer->GetExternalID(connectionRequest->facilitator));
// This is duplicated intentionally, since the first packet is often dropped
peer->SendOutOfBand(fallbackAddresses[k].ToString(false),fallbackAddresses[k].port,ID_OUT_OF_BAND_INTERNAL,(const char*) oob.GetData(),oob.GetNumberOfBytesUsed(),0);
peer->SendOutOfBand(fallbackAddresses[k].ToString(false),fallbackAddresses[k].port,ID_OUT_OF_BAND_INTERNAL,(const char*) oob.GetData(),oob.GetNumberOfBytesUsed(),0);
}
LogOut(FormatString("Recipient sending ID_OUT_OF_BAND_INTERNAL to %s\n", fallbackAddresses[connectionRequestList[i]->recipientOfflineCount].ToString(true)));
}
/*
for (fallbackIndex=0; fallbackIndex < fallbackAddresses.Size(); fallbackIndex++)
{
// This follows a similar path to the sender connecting to us.
// If this message arrives, it lets the sender know our external port.
// The sender can then use this port instead of just going down the fallbackAddresses guessing.
// This saves us if the recipient is impossible to connect to, but the sender is not.
oob.Reset();
oob.Write(ID_NAT_ADVERTISE_RECIPIENT_PORT);
oob.Write(rakPeer->GetExternalID(connectionRequest->facilitator));
peer->SendOutOfBand(fallbackAddresses[fallbackIndex].ToString(false),fallbackAddresses[fallbackIndex].port,ID_OUT_OF_BAND_INTERNAL,(const char*) oob.GetData(),oob.GetNumberOfBytesUsed(),0);
示例15: if
HTTPReadResult PHPDirectoryServer2::ProcessHTTPRead(RakNet::RakString httpRead)
{
const char *c = (const char*) httpRead.C_String(); // current position
HTTPReadResult resultCode=HTTP_RESULT_EMPTY;
lastDownloadedTable.Clear();
if (*c=='\n')
c++;
char buff[256];
int buffIndex;
bool isCommand=true;
DataStructures::List<RakNet::RakString> columns;
DataStructures::List<RakNet::RakString> values;
RakNet::RakString curString;
bool isComment=false;
buffIndex=0;
while(c && *c)
{
// 3 is comment
if (*c=='\003')
{
isComment=!isComment;
c++;
continue;
}
if (isComment)
{
c++;
continue;
}
// 1 or 2 separates fields
// 4 separates rows
if (*c=='\001')
{
if (isCommand)
{
buff[buffIndex]=0;
columns.Push(RakString::NonVariadic(buff), _FILE_AND_LINE_);
isCommand=false;
if (buff[0]!=0)
resultCode=HTTP_RESULT_GOT_TABLE;
}
else
{
buff[buffIndex]=0;
values.Push(RakString::NonVariadic(buff), _FILE_AND_LINE_);
isCommand=true;
}
buffIndex=0;
}
else if (*c=='\002')
{
buff[buffIndex]=0;
buffIndex=0;
values.Push(RakString::NonVariadic(buff), _FILE_AND_LINE_);
isCommand=true;
PushColumnsAndValues(columns, values);
columns.Clear(true, _FILE_AND_LINE_);
values.Clear(true, _FILE_AND_LINE_);
}
else
{
if (buffIndex<256-1)
buff[buffIndex++]=*c;
}
c++;
}
if (buff[0] && columns.Size()==values.Size()+1)
{
buff[buffIndex]=0;
values.Push(RakString::NonVariadic(buff), _FILE_AND_LINE_);
}
PushColumnsAndValues(columns, values);
return resultCode;
}