本文整理汇总了C++中Task::GetID方法的典型用法代码示例。如果您正苦于以下问题:C++ Task::GetID方法的具体用法?C++ Task::GetID怎么用?C++ Task::GetID使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Task
的用法示例。
在下文中一共展示了Task::GetID方法的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: 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;
}
示例3: RealizeTask
void RecurrenceManager::RealizeTask(MSXML2::IXMLDOMNode *pNode, unsigned __int64 templateId, unsigned __int64 parentId, unsigned __int64 start, int duration)
{
if(!FindTaskInstance(templateId, start))
{
TaskManager *pTaskManager = m_pDataManager->GetTaskManagerInstance();
BSTR title = 0;
HRESULT hr = XMLHelper::GetChildText(pNode, CTaskModel::TITLE, &title);
if(hr == S_OK && title)
{
BSTR desc = 0;
hr = XMLHelper::GetChildText(pNode, CTaskModel::DESCRIPTION, &desc);
//TODO: set task templateId
Task *pTask = pTaskManager->createTask(desc, title, 3, false, start, 0, parentId);
StringBuffer conv(32);
pTask->SetCustomAttribute(_T("recurrenceid"), ModelUtils::toHexString(templateId, conv));
TimeEntryManager *pTimeEntryManager = m_pDataManager->GetDayManagerInstance()->GetSpeculativeEntryManager();
pTimeEntryManager->CreateTimeEntry(pTask->GetID(), start, start + (duration * ModelUtils::UNITS_PER_MINUTE), pTask->GetTitle());
if(hr == S_OK && desc)SysFreeString(desc);
SysFreeString(title);
}
}
}