本文整理汇总了C++中Task::ToXMLString方法的典型用法代码示例。如果您正苦于以下问题:C++ Task::ToXMLString方法的具体用法?C++ Task::ToXMLString怎么用?C++ Task::ToXMLString使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Task
的用法示例。
在下文中一共展示了Task::ToXMLString方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: HandleUserSynch
void TaskSynch::HandleUserSynch(unsigned __int64 since, bool isResponse, unsigned long ip)
{
UserManager *pUserMan = m_pDataManager->GetUserManagerInstance();
User *pUser = pUserMan->FindUserFromIP(ip);
int len = 0;
if(pUser)
{
IterWrapper<Task> iter(pUser->IterateModifiedOrAssignedTasks(since));
char *pMsg = NULL;
Task *pTask = NULL;
while(iter.Next())
{
pTask= iter.Get();
unsigned long hashLen = 0;
StringBuffer sb(1024);
unsigned char *pSegHash = HashTaskTreeSeg(pTask->ToXMLString(sb), &hashLen);
#ifdef DEBUG
OutputDebugString(_T("Handle User Synch: "));
OutputDebugString(sb);
OutputDebugString(_T("\n"));
#endif
if(pSegHash)
{
pMsg = MakeTaskSynchTreeSegMsg(pSegHash, hashLen, pTask->GetID(), pTask->GetModifiedDate(), false, &len);
m_pNetwork->Send(pMsg, len, ip);
delete [] pSegHash;
}
}
}
if(!isResponse)
{
char *pMsg = MakeUserTaskSynchReq(0, true, &len);
m_pNetwork->Send(pMsg, len, ip);
}
}
示例2: iter
TCHAR * TaskSynch::GetGroupTasksXML(Group *pGroup, int *pCount, StringBuffer &sbGroupXML)
{
IterWrapper<Task> iter(pGroup->IterateTasks());
Task *pTask = NULL;
TCHAR *pXML = NULL;
while(iter.Next())
{
pTask = iter.Get();
pXML = pTask->ToXMLString();
sbGroupXML.append(pXML);
delete [] pXML;
*pCount += pTask->CompleteChildCount();
}
return sbGroupXML;
}
示例3: SynchTaskTreeSeg
void TaskSynch::SynchTaskTreeSeg(Task* pSrcTask, unsigned long ipAddr)
{
Task::TaskSet *pTaskSet = pSrcTask->getChildren();
IterWrapper<Task> iter(pTaskSet->Iterate());
Task *pTask = NULL;
while(iter.Next())
{
int msgLen = 0;
unsigned long hashLen = 0;
pTask = iter.Get();
unsigned char *pSegHash = HashTaskTreeSeg(pTask->ToXMLString(), &hashLen);
if(pSegHash)
{
char *pMsg = MakeTaskSynchTreeSegMsg(pSegHash, hashLen, pTask->GetID(), pTask->GetModifiedDate(), false, &msgLen);
m_pNetwork->Send(pMsg, msgLen, ipAddr);
delete [] pSegHash;
}
}
iter.Clean();
delete pTaskSet;
}